Bug 33820: Add hints to warn the librarian that they will be logged out if they chang...
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 24 May 2023 07:31:05 +0000 (09:31 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 21 Jun 2023 16:20:32 +0000 (13:20 -0300)
commit8e611b79f18d829a5aa70c18a50ca20438d0413a
tree04b5615e08689e871afb17f9c1380450c08d7839
parenta3a0aaec102b05fc5a5b0573e1888facd22a731f
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt