source: extensions/CryptograPHP/template/guestbook.tpl @ 26413

Last change on this file since 26413 was 26072, checked in by mistic100, 10 years ago

try to simplify integration of captchas

File size: 932 bytes
Line 
1<tr>
2  <td>
3    <label for="captcha">{if $CRYPTO.captcha_type=='string'}{'Enter code'|translate}{else}{'Solve equation'|translate}{/if}</label>
4    <input type="text" name="captcha_code" id="captcha_code" style="width:{$CRYPTO.code_length}em" maxlength="{$CRYPTO.code_length}" />
5  </td>
6  <td>
7    <img id="captcha" src="{$CRYPTO_PATH}securimage/securimage_show.php" alt="CAPTCHA Image" style="vertical-align:top;">
8    <a href="#" id="captcha_refresh" onclick="document.getElementById('captcha').src = '{$CRYPTO_PATH}securimage/securimage_show.php?'+Math.random(); return false;">
9      <img src="{$CRYPTO_PATH}template/refresh_{$CRYPTO.button_color}.png" style="vertical-align:bottom;"></a>
10  </td>
11
12  {footer_script}
13  var captcha_code = new LiveValidation("captcha_code", {ldelim} onlyOnSubmit: true });
14  captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Invalid Captcha'|translate}" });
15  {/footer_script}
16</tr>
Note: See TracBrowser for help on using the repository browser.