From 53e073f740b11b9514d0dcead7004ac3839c6a47 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 15 Jul 2025 16:35:21 +0000 Subject: [PATCH] Bug 24949: Provide password visibility toggle / icon to unmask password on staff login screen This patch adapts the work on Bug 34778 to the staff client, adding a "Show password" checkbox to the login form. To test, apply the batch and go to the staff client login screen. - You should see a "Show password" checkbox under the password field. - Type something in the password field. It should be masked (****). - Click the "Show password" label or check the checkbox. - The password field should now show the text you entered. - Confirm that you can log in successfully whether or not the password is visible. - `prove t/db_dependent/selenium/authentication.t` should pass. Sponsored-by: Athens County Public Libraries --- koha-tmpl/intranet-tmpl/prog/css/login.css | 9 ++++ .../intranet-tmpl/prog/en/modules/auth.tt | 9 ++-- .../prog/js/show-password-toggle.js | 44 +++++++++++++++++++ t/db_dependent/selenium/authentication.t | 18 +++++++- 4 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/show-password-toggle.js diff --git a/koha-tmpl/intranet-tmpl/prog/css/login.css b/koha-tmpl/intranet-tmpl/prog/css/login.css index d41928c236d..0957a5af18d 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/login.css +++ b/koha-tmpl/intranet-tmpl/prog/css/login.css @@ -158,3 +158,12 @@ input[type="password"] { font-size: 1.7em; width: 97%; } + +.show-password-toggle { + margin: .7rem 0; +} + +input.show-password-toggle-checkbox { + float: left; + margin: 0 .5rem 0 0; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 4a0a2109049..142b98fba4e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -169,12 +169,12 @@ [% NEXT IF INPUT.name == "branch" %] [% END %] -

+

+

-

+

+

@@ -291,6 +291,7 @@ [% MACRO jsinclude BLOCK %] + [% Asset.js("js/show-password-toggle.js") | $raw %]