From 4b239ed1950f9553d1d84e78698ab9ebc5af9d49 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Tue, 25 Jan 2022 18:49:43 +0300 Subject: [PATCH 1/2] Fix autocomplete attribute in PasswordInput --- src/bootstrap/PasswordInput.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/PasswordInput.js b/src/bootstrap/PasswordInput.js index ee93928..17cfbbd 100644 --- a/src/bootstrap/PasswordInput.js +++ b/src/bootstrap/PasswordInput.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) + * Copyright (C) 2019-2022 CZ.NIC z.s.p.o. (https://www.nic.cz/) * * This is free software, licensed under the GNU General Public License v3. * See /LICENSE for more information. @@ -21,14 +21,17 @@ PasswordInput.propTypes = { helpText: PropTypes.string, /** Use show/hide password button. */ withEye: PropTypes.bool, + /** Use new-password in autocomplete attribute. */ + newPass: PropTypes.bool, }; -export function PasswordInput({ withEye, ...props }) { +export function PasswordInput({ withEye, newPass, ...props }) { const [isHidden, setHidden] = useState(true); + return ( {withEye ? ( From 839e227febdbef6f740da6454f92f5730468a4e6 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Tue, 25 Jan 2022 20:38:02 +0300 Subject: [PATCH 2/2] Update Snapshots --- .../__tests__/__snapshots__/PasswordInput.test.js.snap | 2 +- .../__tests__/__snapshots__/WiFiSettings.test.js.snap | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/__tests__/__snapshots__/PasswordInput.test.js.snap b/src/bootstrap/__tests__/__snapshots__/PasswordInput.test.js.snap index 5022b37..0bbe9ea 100644 --- a/src/bootstrap/__tests__/__snapshots__/PasswordInput.test.js.snap +++ b/src/bootstrap/__tests__/__snapshots__/PasswordInput.test.js.snap @@ -13,7 +13,7 @@ exports[` Render password input 1`] = ` class="input-group" > Snapshot guest network. 1`] = ` + class=\\"input-group\\" + > + Snapshot one module enabled. 1`] = ` + class=\\"input-group\\" + > +