source: extensions/EasyCaptcha/template/common.inc.tpl @ 26025

Last change on this file since 26025 was 26025, checked in by mistic100, 7 years ago

update for 2.6

File size: 2.9 KB
Line 
1{* <!-- DRAG & DROP --> *}
2{if $EASYCAPTCHA.challenge == 'drag'}
3{combine_script id='jquery.event.drag' load='footer' require='jquery' path=$EASYCAPTCHA_PATH|cat:'template/jquery.events/jquery.event.drag-2.2.js'}
4{combine_script id='jquery.event.drop' load='footer' require='jquery' path=$EASYCAPTCHA_PATH|cat:'template/jquery.events/jquery.event.drop-2.2.js'}
5
6{combine_script id='easycaptcha.drag' load='footer' require='jquery.event.drag,jquery.event.drop' path=$EASYCAPTCHA_PATH|cat:'template/drag.js'}
7{combine_css id='easycaptcha.drag' path=$EASYCAPTCHA_PATH|cat:'template/drag.css' template=true version=$EASYCAPTCHA.lastmod}
8
9{capture name=easycaptcha}
10<noscript id="easycaptcha_noscript">
11  {'You must activate JavaScript in your browser in order to be able to add a comment, sorry for the inconvenience.'|translate}
12</noscript>
13
14<div id="easycaptcha" style="display:none;">
15{counter start=0 assign=i}
16{foreach from=$EASYCAPTCHA.drag.selection item=image}
17  <div class="drag_item" style="left:{math equation='10+(x+5)*y' x=$EASYCAPTCHA.drag.size y=$i}px;" data-id="{$image}">
18    <img src="{$ROOT_URL}{$EASYCAPTCHA_PATH}drag/get.php?{$EASYCAPTCHA.drag.theme}&amp;{$image}">
19  </div>
20  {counter}
21{/foreach}
22  <div class="drop_zone">{'Drop'|translate}</div>
23</div>
24
25{* <!-- fields are not type "hidden" for LiveValidation in GuestBook and ContactForm --> *}
26<input type="text" name="easycaptcha" value="" style="display:none;">
27<input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;">
28{/capture}
29
30
31{* <!-- TIC TAC TOE --> *}
32{else if $EASYCAPTCHA.challenge == 'tictac'}
33{combine_css id='easycaptcha.tictac' path=$EASYCAPTCHA_PATH|cat:'template/tictac.css' template=true version=$EASYCAPTCHA.lastmod}
34
35{footer_script require='jquery'}
36(function($){
37$('#easycaptcha input').on('change', function() {
38    $('#easycaptcha label').removeClass('selected');
39    $(this).parent('label').addClass('selected');
40});
41}(jQuery));
42{/footer_script}
43
44{capture name=easycaptcha}
45<div id="easycaptcha">
46  <table>
47    <tr>
48      <td><label><input type="radio" name="easycaptcha" value="00"></label></td>
49      <td><label><input type="radio" name="easycaptcha" value="10"></label></td>
50      <td><label><input type="radio" name="easycaptcha" value="20"></label></td>
51    </tr>
52    <tr>
53      <td><label><input type="radio" name="easycaptcha" value="01"></label></td>
54      <td><label><input type="radio" name="easycaptcha" value="11"></label></td>
55      <td><label><input type="radio" name="easycaptcha" value="21"></label></td>
56    </tr>
57    <tr>
58      <td><label><input type="radio" name="easycaptcha" value="02"></label></td>
59      <td><label><input type="radio" name="easycaptcha" value="12"></label></td>
60      <td><label><input type="radio" name="easycaptcha" value="22"></label></td>
61    </tr>
62  </table>
63</div>
64
65<input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;">
66{/capture}
67
68{/if}
Note: See TracBrowser for help on using the repository browser.