Skip to content

Commit

Permalink
Forms: Don't autocomplete password elements
Browse files Browse the repository at this point in the history
- Setting `autocomplete` to `off` does not work, but `new-password` does.
  • Loading branch information
sukhwinder33445 committed Sep 5, 2023
1 parent 8da6c2e commit 47a1c2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions application/forms/RedisConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public function createElements(array $formData)
'description' => t('Redis Password'),
'label' => t('Redis Password'),
'renderPassword' => true,
'autocomplete' => 'new-password'
]);

$this->addDisplayGroup(
Expand Down Expand Up @@ -182,6 +183,7 @@ public function createElements(array $formData)
'description' => t('Redis Password'),
'label' => t('Redis Password'),
'renderPassword' => true,
'autocomplete' => 'new-password'
]);

$this->addDisplayGroup(
Expand Down
3 changes: 2 additions & 1 deletion library/Icingadb/Setup/ApiTransportPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function createElements(array $formData)
$this->addElement('password', 'password', [
'required' => true,
'renderPassword' => true,
'label' => t('API Password')
'label' => t('API Password'),
'autocomplete' => 'new-password'
]);
}

Expand Down

0 comments on commit 47a1c2f

Please sign in to comment.