{include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl'}
{* *}
{if $EASYCAPTCHA.challenge == 'drag'}
|
{'To verify you are a human, please place the %s in the most right box bellow.'|translate:$EASYCAPTCHA.drag.text}
{$smarty.capture.easycaptcha}
|
{footer_script}
var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha"]')[0], {ldelim} onlyOnSubmit: true });
captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Pleaser answer'|translate}" });
{/footer_script}
{* *}
{else if $EASYCAPTCHA.challenge == 'tictac'}
|
{'You are player X, click on the right case to complete the line.'|translate}
{$smarty.capture.easycaptcha}
|
{footer_script}
var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha_key"]')[0], {ldelim} onlyOnSubmit: true });
captcha_code.add(Validate.Custom, {ldelim}
failureMessage: "{'Pleaser answer'|translate}",
against: function() {ldelim}
return jQuery('input[name="easycaptcha"]:checked').length != 0;
}
});
{/footer_script}
{/if}