Bugzilla – Attachment 151717 Details for
Bug 33820
Add hints to warn the librarian that they will be logged out if they change their username
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33820: Add hints to warn the librarian that they will be logged out if they change their username
Bug-33820-Add-hints-to-warn-the-librarian-that-the.patch (text/plain), 2.23 KB, created by
David Cook
on 2023-05-26 00:11:03 UTC
(
hide
)
Description:
Bug 33820: Add hints to warn the librarian that they will be logged out if they change their username
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-05-26 00:11:03 UTC
Size:
2.23 KB
patch
obsolete
>From df6fca8a7b1501f46fac349bd4fa212246cc503e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 24 May 2023 09:31:05 +0200 >Subject: [PATCH] Bug 33820: Add hints to warn the librarian that they will be > logged out if they change their username > >This patch adds some JavaScript to the patron entry form which adds a >hint if the logged-in librarian tries to change their own username. It >warns them that they will be logged out. > >To test, apply the patch and log into the staff interface. > >- Locate and edit your own patron record. >- In the "OPAC/Staff interface login" section, change the value in the > username field. When focus leaves that form field a hint should > appear, "You will be logged out if you modify your username." >- Change the username field back to your original username. The hint > should disappear. >- Confirm that submitting a username change works correctly: You should > be logged out, and when you log in again your username should be > updated. > >Signed-off-by: Sam Lau <samalau@gmail.com> >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > .../prog/en/modules/members/memberentrygen.tt | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index d587f115d7..35a0778aed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1867,6 +1867,16 @@ legend:hover { > $("#categorycode_entry").on("change", function(){ > update_category_code(this); > }); >+ >+ [% IF logged_in_user.borrowernumber == borrowernumber %] >+ $("#userid").on("change", function(){ >+ $(this).parent().find("div.hint").remove(); >+ if ( "[% borrower_data.userid | html %]" != $(this).val() ) { >+ $(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username"))); >+ } >+ }); >+ [% END %] >+ > }); > > [% IF quickadd && opadd && !check_member %] >-- >2.30.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 33820
:
151639
|
151640
|
151685
|
151686
| 151717 |
151718