From a5320fb3ea4606a324b24ceb68d3a73373a8a8d8 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 22 Oct 2024 03:11:58 +0000 Subject: [PATCH] Bug 34778: Add a 'Show password' toggle when logging into the OPAC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Apply the patch 2. perl build-resources.PL 3. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl 4. Type "ABC" into the "Password" box and click "Show password" 5. Note that the password is now visible. Click again to hide password. 6. Click "Log in to your account" 7. Type "123" into the "Password" box and click "Show password" 8. Note that the password is now visible. Click again to hide password. 9. Note that the password on the main screen wasn't affected by the "Show password" in the modal 10. Repeat the above process on http://localhost:8080/cgi-bin/koha/opac-user.pl Signed-off-by: Emmanuel Bétemps Signed-off-by: Lucas Gass Signed-off-by: Emmanuel Bétemps --- koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 5 +++++ .../bootstrap/en/includes/masthead.inc | 1 + .../bootstrap/en/includes/opac-bottom.inc | 1 + .../en/includes/show-password-toggle.inc | 4 ++++ .../opac-tmpl/bootstrap/en/modules/opac-auth.tt | 1 + .../opac-tmpl/bootstrap/en/modules/opac-main.tt | 1 + .../bootstrap/js/show-password-toggle.js | 17 +++++++++++++++++ 7 files changed, 30 insertions(+) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/show-password-toggle.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/show-password-toggle.js diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index bc94fd539f..959bda1e27 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2970,4 +2970,9 @@ $star-selected: #EDB867; } } +#loginModal .local-login input.show-password-toggle-checkbox { + width: inherit; + display: inline; +} + @import "responsive"; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 70713da7f0..ae9e5e110b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -441,6 +441,7 @@