mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
n°524 - password policy
- ajax message is now translated in the user's language - prevent the form submission if the password policy is not respected
This commit is contained in:
@@ -1064,6 +1064,9 @@ class LoginWebPage extends NiceWebPage
|
||||
}
|
||||
else if ($operation == 'check_pwd_policy')
|
||||
{
|
||||
$sAuthUser = $_SESSION['auth_user'];
|
||||
UserRights::Login($sAuthUser); // Set the user's language
|
||||
|
||||
$aPwdMap = array();
|
||||
|
||||
foreach (array('new_pwd', 'retype_new_pwd') as $postedPwd)
|
||||
|
||||
@@ -82,11 +82,13 @@ $(function() {
|
||||
if (oResponse[sPwdField].isValid || oField.val() == '')
|
||||
{
|
||||
oDiv.removeClass('invalid');
|
||||
$('#login-submit .login-submit-primary').prop('disabled', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
oDiv.addClass('invalid');
|
||||
oMessage.append(oResponse[sPwdField].message);
|
||||
$('#login-submit .login-submit-primary').prop('disabled', true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user