source: extensions/EasyCaptcha/template/guestbook.tpl @ 24215

Last change on this file since 24215 was 24215, checked in by mistic100, 11 years ago

add extension EasyCaptcha

File size: 1.1 KB
Line 
1<tr>
2  {include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl'}
3
4  {* <!-- DRAG & DROP --> *}
5  {if $EASYCAPTCHA_CHALLENGE == 'drag'}
6  <td colspan=2><label>{'easycaptcha_drag_%s'|translate|sprintf:$EASYCAPTCHA_CONF.text}</label></td>
7
8  {footer_script}
9  var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha"]')[0], {ldelim} onlyOnSubmit: true });
10  captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Pleaser answer'|translate}" });
11  {/footer_script}
12
13  {* <!-- TIC TAC TOE --> *}
14  {else if $EASYCAPTCHA_CHALLENGE == 'tictac'}
15  <td colspan=2><label>{'easycaptcha_tictac'|translate}</label></td>
16
17  {footer_script}
18  var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha_key"]')[0], {ldelim} onlyOnSubmit: true });
19  captcha_code.add(Validate.Custom, {ldelim}
20    failureMessage: "{'Pleaser answer'|translate}",
21    against: function() {ldelim}
22        return jQuery('input[name="easycaptcha"]:checked').length != 0;
23    }
24  });
25  {/footer_script}
26
27  {/if}
28</tr>
29<tr>
30  <td colspan=2 style="text-align:center;">
31    {$smarty.capture.easycaptcha}
32  </td>
33</tr>
Note: See TracBrowser for help on using the repository browser.