Last change
on this file since 26069 was
26069,
checked in by mistic100, 10 years ago
|
try to simplify integration of captchas
|
File size:
1.2 KB
|
Rev | Line | |
---|
[24215] | 1 | <tr> |
---|
| 2 | {include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl'} |
---|
| 3 | |
---|
| 4 | {* <!-- DRAG & DROP --> *} |
---|
[26025] | 5 | {if $EASYCAPTCHA.challenge == 'drag'} |
---|
[26069] | 6 | <td class="title"></td> |
---|
| 7 | <td> |
---|
| 8 | {'To verify you are a human, please place the <b>%s</b> in the most right box bellow.'|translate:$EASYCAPTCHA.drag.text} |
---|
| 9 | {$smarty.capture.easycaptcha} |
---|
| 10 | </td> |
---|
[24215] | 11 | |
---|
| 12 | {footer_script} |
---|
| 13 | var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha"]')[0], {ldelim} onlyOnSubmit: true }); |
---|
| 14 | captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Pleaser answer'|translate}" }); |
---|
| 15 | {/footer_script} |
---|
| 16 | |
---|
| 17 | {* <!-- TIC TAC TOE --> *} |
---|
[26069] | 18 | {else if $EASYCAPTCHA.challenge == 'tictac'} |
---|
| 19 | <td class="title"></td> |
---|
| 20 | <td> |
---|
| 21 | {'You are player X, click on the right case to complete the line.'|translate} |
---|
| 22 | {$smarty.capture.easycaptcha} |
---|
| 23 | </td> |
---|
[24215] | 24 | |
---|
| 25 | {footer_script} |
---|
| 26 | var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha_key"]')[0], {ldelim} onlyOnSubmit: true }); |
---|
| 27 | captcha_code.add(Validate.Custom, {ldelim} |
---|
| 28 | failureMessage: "{'Pleaser answer'|translate}", |
---|
| 29 | against: function() {ldelim} |
---|
| 30 | return jQuery('input[name="easycaptcha"]:checked').length != 0; |
---|
| 31 | } |
---|
| 32 | }); |
---|
| 33 | {/footer_script} |
---|
| 34 | |
---|
| 35 | {/if} |
---|
[26069] | 36 | </tr> |
---|
Note: See
TracBrowser
for help on using the repository browser.