From 47a1c2f07e24d8bfa60201b6b8d8da9f2e0d1b8e Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 31 Aug 2023 15:28:02 +0200 Subject: [PATCH] Forms: Don't `autocomplete` password elements - Setting `autocomplete` to `off` does not work, but `new-password` does. --- application/forms/RedisConfigForm.php | 2 ++ library/Icingadb/Setup/ApiTransportPage.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/application/forms/RedisConfigForm.php b/application/forms/RedisConfigForm.php index c27737b49..47b5c41d9 100644 --- a/application/forms/RedisConfigForm.php +++ b/application/forms/RedisConfigForm.php @@ -144,6 +144,7 @@ public function createElements(array $formData) 'description' => t('Redis Password'), 'label' => t('Redis Password'), 'renderPassword' => true, + 'autocomplete' => 'new-password' ]); $this->addDisplayGroup( @@ -182,6 +183,7 @@ public function createElements(array $formData) 'description' => t('Redis Password'), 'label' => t('Redis Password'), 'renderPassword' => true, + 'autocomplete' => 'new-password' ]); $this->addDisplayGroup( diff --git a/library/Icingadb/Setup/ApiTransportPage.php b/library/Icingadb/Setup/ApiTransportPage.php index 310933ae0..e727e9977 100644 --- a/library/Icingadb/Setup/ApiTransportPage.php +++ b/library/Icingadb/Setup/ApiTransportPage.php @@ -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' ]); }