n°524 - password policy

- "password reset" workflow now handle gracefully the policy enforcement.
This commit is contained in:
bruno DA SILVA
2019-11-28 08:51:42 +01:00
parent fe0bd1a4b8
commit 267cdd2aee
3 changed files with 44 additions and 28 deletions

View File

@@ -7,36 +7,39 @@
<div id="login-content">
<div id="login-title">
<h1>{{ 'UI:ResetPwd-Title'|dict_s }}</h1>
{% if bNoUser %}
{% if bNoUser and sErrorMessage is null %}
<p>{{ 'UI:ResetPwd-Error-WrongLogin'|dict_format(sAuthUser) }}</p>
{% elseif bBadToken %}
{% elseif bBadToken and sErrorMessage is null %}
<p>{{ 'UI:ResetPwd-Error-InvalidToken'|dict_s }}</p>
{% else %}
<p>{{ 'UI:ResetPwd-Error-EnterPassword'|dict_format(sUserName) }}</p>
</div>
<div id="login-form">
<form method="post">
<div id="login-form-content">
<div id="login-input">
<div>
<label for="new_pwd">{{ 'UI:Login:NewPasswordPrompt'|dict_s }}:</label>
<input type="password" id="new_pwd" name="new_pwd" value="" />
{% if sErrorMessage is not null %}
<p class="hilite">{{ sErrorMessage|raw }}</p>
{% endif %}
<p>{{ 'UI:ResetPwd-Error-EnterPassword'|dict_format(sUserName) }}</p>
</div>
<div id="login-form">
<form method="post">
<div id="login-form-content">
<div id="login-input">
<div>
<label for="new_pwd">{{ 'UI:Login:NewPasswordPrompt'|dict_s }}:</label>
<input type="password" id="new_pwd" name="new_pwd" value="" />
</div>
<div>
<label for="retype_new_pwd">{{ 'UI:Login:RetypeNewPasswordPrompt'|dict_s }}:</label>
<input type="password" id="retype_new_pwd" name="retype_new_pwd" value="" />
</div>
</div>
<div>
<label for="retype_new_pwd">{{ 'UI:Login:RetypeNewPasswordPrompt'|dict_s }}:</label>
<input type="password" id="retype_new_pwd" name="retype_new_pwd" value="" />
<div id="login-submit">
<div>
<input type="submit" onClick="return DoCheckPwd();" value="{{ 'UI:Button:ChangePassword'|dict_s }}" />
</div>
</div>
</div>
<div id="login-submit">
<div>
<input type="submit" onClick="return DoCheckPwd();" value="{{ 'UI:Button:ChangePassword'|dict_s }}" />
</div>
</div>
</div>
<input type="hidden" name="loginop" value="do_reset_pwd" />
<input type="hidden" name="auth_user" value="{{ sAuthUser }}" />
<input type="hidden" name="token" value="{{ sToken }}" />
</form>
</div>
<input type="hidden" name="loginop" value="do_reset_pwd" />
<input type="hidden" name="auth_user" value="{{ sAuthUser }}" />
<input type="hidden" name="token" value="{{ sToken }}" />
</form>
{% endif %}
</div>
</div>