do not show password forgotten form when we sent the mail

This commit is contained in:
Christian Weiske 2010-07-09 21:55:37 +02:00
parent cecf6d349a
commit bf9b3f98a7
2 changed files with 28 additions and 24 deletions

View File

@ -1,5 +1,7 @@
<?php <?php
$this->includeTemplate($GLOBALS['top_include']); $this->includeTemplate($GLOBALS['top_include']);
if (isset($form)) {
?> ?>
<p><?php echo sprintf(T_('If you have forgotten your password, %s can generate a new one. Enter the username and e-mail address of your account into the form below and we will e-mail your new password to you.'), $GLOBALS['sitename']); ?></p> <p><?php echo sprintf(T_('If you have forgotten your password, %s can generate a new one. Enter the username and e-mail address of your account into the form below and we will e-mail your new password to you.'), $GLOBALS['sitename']); ?></p>
@ -27,5 +29,6 @@ $this->includeTemplate($GLOBALS['top_include']);
</form> </form>
<?php <?php
}
$this->includeTemplate($GLOBALS['bottom_include']); $this->includeTemplate($GLOBALS['bottom_include']);
?> ?>

View File

@ -157,8 +157,7 @@ if ($form->validate()) {
$arValues['email'] $arValues['email']
); );
} }
} } else {
HTML_QuickForm2_Renderer::register( HTML_QuickForm2_Renderer::register(
'coolarray', 'coolarray',
'SemanticScuttle_QuickForm2_Renderer_CoolArray' 'SemanticScuttle_QuickForm2_Renderer_CoolArray'
@ -173,8 +172,6 @@ $renderer->setOption(
); );
$tplVars['form'] = $form->render($renderer); $tplVars['form'] = $form->render($renderer);
$tplVars['loadjs'] = true;
$tplVars['subtitle'] = T_('Forgotten Password');
//fscking form error is not in form|errors //fscking form error is not in form|errors
$tplVars['error'] .= implode( $tplVars['error'] .= implode(
'<br/>', '<br/>',
@ -185,5 +182,9 @@ $tplVars['error'] .= implode(
) )
) )
); );
}
$tplVars['loadjs'] = true;
$tplVars['subtitle'] = T_('Forgotten Password');
$templateservice->loadTemplate('password.tpl', $tplVars); $templateservice->loadTemplate('password.tpl', $tplVars);
?> ?>