Changeset 27214


Ignore:
Timestamp:
Feb 5, 2014, 6:27:20 PM (10 years ago)
Author:
mistic100
Message:

compatibility with GuestBook

Location:
extensions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/template/guestbook.tpl

    r26072 r27214  
    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>
     1<div class="col-50">
     2  <label for="captcha">{if $CRYPTO.captcha_type=='string'}{'Enter code'|translate}{else}{'Solve equation'|translate}{/if}</label>
     3  <input type="text" name="captcha_code" id="captcha_code" style="width:{$CRYPTO.code_length}em" maxlength="{$CRYPTO.code_length}">
     4</div>
     5<div class="col-50">
     6  <img id="captcha" src="{$CRYPTO_PATH}securimage/securimage_show.php" alt="CAPTCHA Image" style="vertical-align:top;">
     7  <a href="#" id="captcha_refresh" onclick="document.getElementById('captcha').src = '{$CRYPTO_PATH}securimage/securimage_show.php?'+Math.random(); return false;">
     8    <img src="{$CRYPTO_PATH}template/refresh_{$CRYPTO.button_color}.png" style="vertical-align:bottom;"></a>
     9</div>
    1110
    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>
     11{footer_script}
     12var captcha_code = new LiveValidation("captcha_code", {ldelim} onlyOnSubmit: true });
     13captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Invalid Captcha'|translate}" });
     14{/footer_script}
  • extensions/EasyCaptcha/template/guestbook.tpl

    r26923 r27214  
    1 <tr>
    2   {include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl'}
     1{include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl'}
    32
    4   {* <!-- DRAG & DROP --> *}
    5   {if $EASYCAPTCHA.challenge == 'drag'}
    6   <td colspan=2><label class="easycaptcha_hint">{'To verify you are a human, please place the <b>%s</b> in the most right box bellow.'|translate:$EASYCAPTCHA.drag.text}</label></td>
     3{* <!-- DRAG & DROP --> *}
     4{if $EASYCAPTCHA.challenge == 'drag'}
     5<div class="col-100"><label class="easycaptcha_hint">{'To verify you are a human, please place the <b>%s</b> in the most right box bellow.'|translate:$EASYCAPTCHA.drag.text}</label></div>
    76
    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}
     7{footer_script}
     8var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha"]')[0], {ldelim} onlyOnSubmit: true });
     9captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Pleaser answer'|translate}" });
     10{/footer_script}
    1211
    13   {* <!-- TIC TAC TOE --> *}
    14   {else if $EASYCAPTCHA.challenge == 'tictac'}
    15   <td colspan=2><label class="easycaptcha_hint">{'You are player X, click on the right case to complete the line.'|translate}</label></td>
     12{* <!-- TIC TAC TOE --> *}
     13{else if $EASYCAPTCHA.challenge == 'tictac'}
     14<div class="col-100"><label class="easycaptcha_hint">{'You are player X, click on the right case to complete the line.'|translate}</label></div>
    1615
    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}
     16{footer_script}
     17var captcha_code = new LiveValidation(jQuery('input[name="easycaptcha_key"]')[0], {ldelim} onlyOnSubmit: true });
     18captcha_code.add(Validate.Custom, {ldelim}
     19  failureMessage: "{'Pleaser answer'|translate}",
     20  against: function() {ldelim}
     21      return jQuery('input[name="easycaptcha"]:checked').length != 0;
     22  }
     23});
     24{/footer_script}
    2625
    27   {/if}
    28 </tr>
    29 <tr>
    30   <td colspan=2 style="text-align:center;">
    31     {$smarty.capture.easycaptcha}
    32   </td>
    33 </tr>
     26{/if}
     27
     28<div class="col-100" style="text-align:center;">
     29  {$smarty.capture.easycaptcha}
     30</div>
Note: See TracChangeset for help on using the changeset viewer.