Changeset 9271

Show
Ignore:
Timestamp:
08/16/08 06:58:01 (4 months ago)
Author:
afz
Message:

Add captcha code to forget password action

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jaws/html/gadgets/Users/HTML.php

    r9218 r9271  
    120120        $tpl->SetVariable('email', _t('GLOBAL_EMAIL')); 
    121121        $tpl->SetVariable('remember', _t('USERS_FORGOT_REMEMBER')); 
    122         $GLOBALS['app']->Registry->LoadFile('Policy'); 
    123         $_captcha = $GLOBALS['app']->Registry->Get('/gadgets/Policy/captcha'); 
    124         if ($_captcha != 'DISABLED') { 
     122 
     123         $GLOBALS['app']->Registry->LoadFile('Policy'); 
     124         $_captcha = $GLOBALS['app']->Registry->Get('/gadgets/Policy/captcha'); 
     125         if ($_captcha != 'DISABLED') { 
    125126            require_once JAWS_PATH . 'gadgets/Policy/captchas/' . $_captcha . '.php'; 
    126127            $captcha = new $_captcha(); 
    127128            $captchaRes = $captcha->Get(); 
    128129            $tpl->SetBlock('forgot/captcha'); 
    129             $tpl->SetVariable('captcha_msg', _t('GLOBAL_CAPTCHA')); 
    130             $tpl->SetVariable('captcha_code_msg', _t('GLOBAL_CAPTCHA_CODE')); 
     130            $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE')); 
    131131            $tpl->SetVariable('captcha', $captchaRes['captcha']->Get()); 
    132132            if (!empty($captchaRes['entry'])) { 
    133133                $tpl->SetVariable('captchavalue', $captchaRes['entry']->Get()); 
    134134            } 
    135             $tpl->SetVariable('message', _t('GLOBAL_CAPTCHA_CODE_DESC')); 
     135            $tpl->SetVariable('captcha_msg', _t('GLOBAL_CAPTCHA_CODE_DESC')); 
    136136            $tpl->ParseBlock('forgot/captcha'); 
    137137        } 
     138 
    138139        if ($response = $GLOBALS['app']->Session->PopSimpleResponse()) { 
    139140            $tpl->SetBlock('forgot/response'); 
  • trunk/jaws/html/gadgets/Users/templates/ForgotPassword.html

    r9073 r9271  
    1313       <input name="email" id="forgot_email" type="text" value="" /> 
    1414    </p> 
     15    <!-- BEGIN captcha --> 
     16    <p><label>{lbl_captcha}:</label><span>{captcha}<small>{captcha_msg}</small></span>{captchavalue}</p> 
     17    <!-- END captcha --> 
    1518  </div> 
    1619  <div class="actions"><button type="submit" value="{remember}">{remember}</button></div>