From 87a5eb86e359e0234851f54342f7793f266fd121 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 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 --- 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 @@
[% PROCESS login_label for="muserid" %] + [% INCLUDE 'show-password-toggle.inc' checkbox_id_suffix='modal' %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 50d78ea97b..d58340f1bd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -162,6 +162,7 @@ [% END %] [% Asset.js("lib/js-cookie/js.cookie-3.0.1.min.js") | $raw %] +[% Asset.js("bootstrap/js/show-password-toggle.js") | $raw %]