use new input addon to make password visible

This commit is contained in:
Uwe Steinmann 2025-12-03 07:42:49 +01:00
parent 282df2a886
commit 594d2796f3

View File

@ -267,9 +267,30 @@ $(document).ready( function() {
'value'=>($currUser ? htmlspecialchars($currUser->getLogin()) : '')
)
);
if ($currUser && $currUser->isGuest()) {
$this->formField(
getMLText("clear_password"),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'clearpwd',
'value'=>1,
)
);
}
$this->formField(
getMLText("password"),
'<input type="password" class="pwd form-control" rel="strengthbar'.($currUser ? $currUser->getID() : "0").'" name="pwd" id="pwd">'.(($currUser && $currUser->isGuest()) ? ' <input type="checkbox" name="clearpwd" value="1" /> '.getMLText('clear_password') : '')
array(
'element'=>'input',
'type'=>'password',
'id'=>'pwd',
'name'=>'pwd',
'class'=>'pwd',
'autocomplete'=>'off',
'required'=>true,
'attributes'=>[['rel', 'strengthbar'.($currUser ? $currUser->getID() : "0")]],
'addon'=>'<i class="fa fa-eye-slash"></i>'
)
);
if($passwordstrength > 0) {
$this->formField(
@ -284,6 +305,8 @@ $(document).ready( function() {
'type'=>'password',
'id'=>'pwdconf',
'name'=>'pwdconf',
'autocomplete'=>'off',
'addon'=>'<i class="fa fa-eye-slash"></i>'
)
);
if($passwordexpiration > 0 && (!$currUser || !$currUser->isAdmin())) {
@ -618,4 +641,3 @@ $(document).ready( function() {
$this->htmlEndPage();
} /* }}} */
}
?>