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}&{$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 | {html_style} |
---|
36 | #easycaptcha table { |
---|
37 | background: url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?t={$smarty.now}') no-repeat; |
---|
38 | } |
---|
39 | {/html_style} |
---|
40 | |
---|
41 | {footer_script require='jquery'} |
---|
42 | (function($){ |
---|
43 | $('#easycaptcha input').on('change', function() { |
---|
44 | $('#easycaptcha label').removeClass('selected'); |
---|
45 | $(this).parent('label').addClass('selected'); |
---|
46 | }); |
---|
47 | }(jQuery)); |
---|
48 | {/footer_script} |
---|
49 | |
---|
50 | {capture name=easycaptcha} |
---|
51 | <div id="easycaptcha"> |
---|
52 | <table> |
---|
53 | <tr> |
---|
54 | <td><label><input type="radio" name="easycaptcha" value="00"></label></td> |
---|
55 | <td><label><input type="radio" name="easycaptcha" value="10"></label></td> |
---|
56 | <td><label><input type="radio" name="easycaptcha" value="20"></label></td> |
---|
57 | </tr> |
---|
58 | <tr> |
---|
59 | <td><label><input type="radio" name="easycaptcha" value="01"></label></td> |
---|
60 | <td><label><input type="radio" name="easycaptcha" value="11"></label></td> |
---|
61 | <td><label><input type="radio" name="easycaptcha" value="21"></label></td> |
---|
62 | </tr> |
---|
63 | <tr> |
---|
64 | <td><label><input type="radio" name="easycaptcha" value="02"></label></td> |
---|
65 | <td><label><input type="radio" name="easycaptcha" value="12"></label></td> |
---|
66 | <td><label><input type="radio" name="easycaptcha" value="22"></label></td> |
---|
67 | </tr> |
---|
68 | </table> |
---|
69 | </div> |
---|
70 | |
---|
71 | <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;"> |
---|
72 | {/capture} |
---|
73 | |
---|
74 | {/if} |
---|