[24215] | 1 | {* <!-- DRAG & DROP --> *} |
---|
[26025] | 2 | {if $EASYCAPTCHA.challenge == 'drag'} |
---|
[24215] | 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'} |
---|
[26025] | 7 | {combine_css id='easycaptcha.drag' path=$EASYCAPTCHA_PATH|cat:'template/drag.css' template=true version=$EASYCAPTCHA.lastmod} |
---|
[24215] | 8 | |
---|
| 9 | {capture name=easycaptcha} |
---|
| 10 | <noscript id="easycaptcha_noscript"> |
---|
[24234] | 11 | {'You must activate JavaScript in your browser in order to be able to add a comment, sorry for the inconvenience.'|translate} |
---|
[24215] | 12 | </noscript> |
---|
| 13 | |
---|
| 14 | <div id="easycaptcha" style="display:none;"> |
---|
| 15 | {counter start=0 assign=i} |
---|
[26025] | 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}"> |
---|
[24215] | 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;"> |
---|
[26025] | 27 | <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;"> |
---|
[24215] | 28 | {/capture} |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | {* <!-- TIC TAC TOE --> *} |
---|
[26025] | 32 | {else if $EASYCAPTCHA.challenge == 'tictac'} |
---|
| 33 | {combine_css id='easycaptcha.tictac' path=$EASYCAPTCHA_PATH|cat:'template/tictac.css' template=true version=$EASYCAPTCHA.lastmod} |
---|
[24215] | 34 | |
---|
[26867] | 35 | {html_style} |
---|
| 36 | #easycaptcha table { |
---|
[26868] | 37 | background: url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?t={$smarty.now}') no-repeat; |
---|
[26867] | 38 | } |
---|
| 39 | {/html_style} |
---|
| 40 | |
---|
[26025] | 41 | {footer_script require='jquery'} |
---|
[24215] | 42 | (function($){ |
---|
| 43 | $('#easycaptcha input').on('change', function() { |
---|
| 44 | $('#easycaptcha label').removeClass('selected'); |
---|
| 45 | $(this).parent('label').addClass('selected'); |
---|
| 46 | }); |
---|
| 47 | }(jQuery)); |
---|
[26025] | 48 | {/footer_script} |
---|
[24215] | 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 | |
---|
[26025] | 71 | <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;"> |
---|
[24215] | 72 | {/capture} |
---|
| 73 | |
---|
| 74 | {/if} |
---|