Fix solution implement in last commit

This commit is contained in:
Benjamin Renard 2019-03-08 11:26:54 +01:00
parent 6f30c6cbe7
commit dbfc8506d5
2 changed files with 7 additions and 3 deletions

View file

@ -1249,9 +1249,11 @@ class LSsession {
LStemplate :: assign('recoverpasswordform_label_submit',_('Validate'));
LStemplate :: assign('recoverpasswordform_label_back',_('Back'));
$recoverpassword_step = 'start';
$recoverpassword_msg = _('Please fill the identifier field to proceed recovery procedure');
if (isset($recoveryPasswordInfos['recoveryHashMail'])) {
$recoverpassword_step = 'token_sent';
$recoverpassword_msg = getFData(
_("An email has been sent to %{mail}. " .
"Please follow the instructions on it."),
@ -1260,12 +1262,14 @@ class LSsession {
}
if (isset($recoveryPasswordInfos['newPasswordMail'])) {
$recoverpassword_step = 'new_password_sent';
$recoverpassword_msg = getFData(
_("Your new password has been sent to %{mail}. "),
$recoveryPasswordInfos['newPasswordMail']
);
}
LStemplate :: assign('recoverpassword_step',$recoverpassword_step);
LStemplate :: assign('recoverpassword_msg',$recoverpassword_msg);
self :: setTemplate('recoverpassword.tpl');

View file

@ -15,7 +15,7 @@
<div class='recoverpasswordform'>
<img src='{img name='logo'}' alt='Logo' id='recoverpasswordform_logo' />
<div id='loading_zone'></div>
{if !isset($recoverpassword_msg)}
{if $recoverpassword_step == 'start'}
<form action='{$recoverpasswordform_action}' method='post'>
<dl class='recoverpasswordform'>
<dt {$recoverpasswordform_ldapserver_style}>{$recoverpasswordform_label_ldapserver|escape:"htmlall"}</dt>
@ -27,9 +27,9 @@
<dd><input type='submit' value='{$recoverpasswordform_label_submit|escape:"htmlall"}' /></dd>
</dl>
</form>
{else}
<p id='recoverpassword_msg'>{$recoverpassword_msg|escape:"htmlall"}</p>
{/if}
<p id='recoverpassword_msg'>{$recoverpassword_msg|escape:"htmlall"}</p>
<span>{$lang_label|escape:"htmlall"} : <img id='LSlang' src='{img name=$LSlang}' alt='{$LSlang|escape:"htmlall"}' title='{$LSlang|escape:"htmlall"}'/></span>
<a href='index.php' id='recoverpassword_back'>{$recoverpasswordform_label_back|escape:"htmlall"}</a>
</div>