Bugzilla – Attachment 171803 Details for
Bug 30088
Improve forgotten password form to be more obvious that only one field must be filled out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30088: (follow-up) Improve behavior when email is ambiguous
Bug-30088-follow-up-Improve-behavior-when-email-is.patch (text/plain), 7.95 KB, created by
Laura Escamilla
on 2024-09-19 19:46:09 UTC
(
hide
)
Description:
Bug 30088: (follow-up) Improve behavior when email is ambiguous
Filename:
MIME Type:
Creator:
Laura Escamilla
Created:
2024-09-19 19:46:09 UTC
Size:
7.95 KB
patch
obsolete
>From 1d194e46e2d99cb9daa45609e4a13af4202f189b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 7 Aug 2024 18:47:02 +0000 >Subject: [PATCH] Bug 30088: (follow-up) Improve behavior when email is > ambiguous > >This patch makes a few changes to the way the form appears when you >submit an email which is attached to more than one patron account. > >Apply the patch and rebuild the OPAC CSS. > >- If you submit an email address which isn't unique, the "enter your > login or your email address" message is hidden. >- The login and email fields are marked as required. > >This patch also changes the behavior of the "I know my..." buttons >so that they change style when clicked. > >Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> >--- > .../opac-tmpl/bootstrap/css/src/opac.scss | 22 ++++++++-- > .../en/modules/opac-password-recovery.tt | 42 ++++++++++++------- > 2 files changed, 47 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 8a10f52252..a2a2d6b397 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -794,7 +794,6 @@ th { > color: #C00; > display: block; > font-size: 95%; >- margin-left: 10rem; > margin-top: 3px; > } > } >@@ -1018,6 +1017,12 @@ fieldset { > display: block; > margin-left: 10rem; > } >+ >+ .required_label { >+ &.required { >+ margin-left: 10rem; >+ } >+ } > } > > div { >@@ -1680,6 +1685,12 @@ nav { > margin-bottom: 1rem; > } > >+#password_recovery_login, >+#password_recovery_email, >+#password_recovery_submit { >+ padding: 1rem; >+} >+ > #password_recovery_options { > background-color: #F0F3F3; > display: flex; >@@ -1688,8 +1699,8 @@ nav { > padding: 1rem; > } > >-#use_login a, >-#use_email a { >+#use_login, >+#use_email { > background-color: #FFF; > border: 1px solid #0074AD; > border-radius: 10px; >@@ -1697,6 +1708,11 @@ nav { > font-size: 130%; > padding: 1rem; > white-space: nowrap; >+ >+ &.select-login-active { >+ background-color: #0074AD; >+ color: #FFF; >+ } > } > > #renewcontrols { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >index f7cbf9df6d..b811df7f01 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >@@ -88,29 +88,39 @@ > [% INCLUDE 'csrf-token.inc' %] > <legend class="sr-only">Password recovery</legend> > <input type="hidden" name="koha_login_context" value="opac" /> >- <p>To reset your password, enter your login or your email address.</p> >+ [% UNLESS ( errMultipleAccountsForEmail ) %] >+ <p id="password_recovery_msg">To reset your password, enter your login or your email address.</p> >+ [% END %] > <fieldset class="brief"> > > <div id="password_recovery_options"> >- <div id="use_login"> >- <a href="#"><i class="fa fa-user" aria-hidden="true"></i> I know my login</a> >- </div> >- <div id="use_email"> >- <a href="#"><i class="fa fa-envelope" aria-hidden="true"></i> I know my email address</a> >- </div> >+ <a id="use_login" href="#"><i class="fa fa-user" aria-hidden="true"></i> I know my login</a> >+ <a id="use_email" href="#"><i class="fa fa-envelope" aria-hidden="true"></i> I know my email address</a> > </div> > > <div class="form-row" id="password_recovery_login" style="display:none"> > <div class="col-md-6"> >- <label for="username">Login:</label> >- <input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> >+ [% IF ( errMultipleAccountsForEmail ) %] >+ <label for="username" class="required">Login:</label> >+ <input class="form-control required" required="required" type="text" id="username" size="40" name="username" value="[% username | html %]" /> >+ <div class="required_label required">Required</div> >+ [% ELSE %] >+ <label for="username">Login:</label> >+ <input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> >+ [% END %] > </div> > </div> > > <div class="form-row" id="password_recovery_email" style="display:none"> > <div class="col-md-6"> >- <label for="email">Email:</label> >- <input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" /> >+ [% IF ( errMultipleAccountsForEmail ) %] >+ <label for="email" class="required">Email:</label> >+ <input class="form-control required" required="required" type="text" id="email" size="40" name="email" value="[% email | html %]" /> >+ <div class="required_label required">Required</div> >+ [% ELSE %] >+ <label for="email">Email:</label> >+ <input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" /> >+ [% END %] > </div> > </div> > <fieldset class="action" id="password_recovery_submit" style="display:none"> >@@ -209,21 +219,25 @@ > [% END %] > > $("#use_email").on("click", function(){ >+ $("#use_login").removeClass("select-login-active"); >+ $(this).addClass("select-login-active"); > $("#username").val(""); >- $("#password_recovery_login").hide(); >+ $("#password_recovery_login, #password_recovery_msg").hide(); > $("#password_recovery_email, #password_recovery_submit").show(); > $("#email").focus(); > }); > > $("#use_login").on("click", function(){ >+ $("#use_email").removeClass("select-login-active"); >+ $(this).addClass("select-login-active"); > $("#email").val(""); >- $("#password_recovery_email").hide(); >+ $("#password_recovery_email, #password_recovery_msg").hide(); > $("#password_recovery_login, #password_recovery_submit").show(); > $("#username").focus(); > }); > > $(".password_recovery_cancel").on("click", function(){ >- $("#password_recovery_options").show(); >+ $("#password_recovery_options, #password_recovery_msg").show(); > $("#password_recovery_login, #password_recovery_email, #password_recovery_submit").hide(); > }); > }) >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30088
:
134654
|
167642
|
167675
|
170146
|
171802
| 171803