From: Scott Date: Wed, 1 Mar 2023 17:12:29 +0000 (-0600) Subject: LP1977554 - Add Password visibility toggle on login screens X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=ef82f4be79e9e518d40c767b83a9b64e8c4f3da1 LP1977554 - Add Password visibility toggle on login screens Added an icon to each login input of a closed eye when input type is set to password. If you click the icon it switches to an open eye and the input type is set to text. It's a pretty standard way to allow people to view their password before submitting it. Signed-off-by: Scott Signed-off-by: Stephanie Leary Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/login.component.ts b/Open-ILS/src/eg2/src/app/staff/login.component.ts index 02d6580..8baf99b 100644 --- a/Open-ILS/src/eg2/src/app/staff/login.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/login.component.ts @@ -78,6 +78,8 @@ export class StaffLoginComponent implements OnInit { handleSubmit() { + this.passwordVisible = false; + // post-login URL let url: string = this.routeTo || '/staff/splash'; diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 index bff11bd..0e8d2b1 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 @@ -73,6 +73,10 @@ input.type == 'password' ? [input.type = 'text', icon.setAttribute('class','fas fa-eye')] : [input.type = 'password', icon.setAttribute('class', 'fas fa-eye-slash')]; input.focus(); }); + let loginForm = document.getElementById('login_form'); + loginForm.addEventListener('submit', ()=>{ + input.type = 'password'; + }); }); diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/login/form.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/login/form.tt2 index b9a09bd..7659464 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/login/form.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/login/form.tt2 @@ -3,7 +3,7 @@

[% l('Log in to Your Account') %]

-
+
[%# INCLUDE "opac/parts/login/help.tt2" %]
[% IF ctx.login_failed_event %]
@@ -39,7 +39,7 @@
- +
diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/login/login_modal.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/login/login_modal.tt2 index bbbb560..5a958e3 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/login/login_modal.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/login/login_modal.tt2 @@ -1,7 +1,7 @@