Skip to content

Commit

Permalink
Admin: Allow to show/hide password in add/edit forms
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Jan 27, 2025
1 parent e3c621d commit c3f6949
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions public/main/admin/user_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ function updateStatus(){
'id' => 'password',
'autocomplete' => 'off',
'onkeydown' => 'javascript: password_switch_radio_button();',
'show_hide' => true,
//'required' => 'required'
]
);
Expand Down
5 changes: 4 additions & 1 deletion public/main/admin/user_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ function confirmation(name) {
'password',
'password',
null,
['onkeydown' => 'javascript: password_switch_radio_button();']
[
'onkeydown' => 'javascript: password_switch_radio_button();',
'show_hide' => true,
]
);

$form->addGroup($group, 'password', null, null, false);
Expand Down
9 changes: 8 additions & 1 deletion public/main/auth/reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
$form = new FormValidator('reset', 'POST', api_get_self().'?token='.$token);
$form->addElement('header', get_lang('Reset password'));
$form->addHidden('token', $token);
$form->addElement('password', 'pass1', get_lang('Password'));
$form->addElement(
'password',
'pass1',
get_lang('Password'),
[
'show_hide' => true,
]
);
$form->addElement(
'password',
'pass2',
Expand Down

0 comments on commit c3f6949

Please # to comment.