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

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

add extension EasyCaptcha

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