Fix indicator for password rules in auth/profile - refs BT#20083

pull/4399/head
Angel Fernando Quiroz Campos 3 years ago
parent 19bed63b77
commit 23312bdbf4
  1. 24
      main/auth/profile.php

@ -329,18 +329,34 @@ if ($showPassword &&
is_profile_editable() && is_profile_editable() &&
api_get_setting('profile', 'password') === 'true' api_get_setting('profile', 'password') === 'true'
) { ) {
$form->addElement('password', 'password0', [get_lang('Pass'), get_lang('TypeCurrentPassword')], ['size' => 40]); $form->addElement(
'password',
'password0',
[get_lang('Pass'), get_lang('TypeCurrentPassword')],
[
'size' => 40,
'show_hide' => true,
]
);
$form->addElement( $form->addElement(
'password', 'password',
'password1', 'password1',
[get_lang('NewPass'), get_lang('EnterYourNewPassword')], get_lang('NewPass'),
['id' => 'password1', 'size' => 40] [
'id' => 'password1',
'size' => 40,
'show_hide' => true,
'placeholder' => get_lang('EnterYourNewPassword'),
]
); );
$form->addElement( $form->addElement(
'password', 'password',
'password2', 'password2',
[get_lang('Confirmation'), get_lang('RepeatYourNewPassword')], [get_lang('Confirmation'), get_lang('RepeatYourNewPassword')],
['size' => 40] [
'size' => 40,
'show_hide' => true,
]
); );
// user must enter identical password twice so we can prevent some user errors // user must enter identical password twice so we can prevent some user errors
$form->addRule(['password1', 'password2'], get_lang('PassTwo'), 'compare'); $form->addRule(['password1', 'password2'], get_lang('PassTwo'), 'compare');

Loading…
Cancel
Save