Bug 27618 - Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Summary: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 16274
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-04 08:18 UTC by Magnus Enger
Modified: 2021-02-12 14:22 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
This patch modifies the patron self-registration screen to improve usability when there is only one library defined in the PatronSelfRegistrationLibraryList system preference. In this situation the library will now display as text instead of a dropdown with only one option.
Version(s) released in:
21.05.00


Attachments
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library (4.77 KB, patch)
2021-02-04 12:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library (4.83 KB, patch)
2021-02-04 19:10 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library (4.88 KB, patch)
2021-02-06 22:42 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2021-02-04 08:18:03 UTC
If PatronSelfRegistrationLibraryList only has one library code in it, that one library is still shown as a dropdown with one choice. It would be better if the code was in a "hidden" form input and the "Home library" was just shown as text, or not shown at all.
Comment 1 Owen Leonard 2021-02-04 12:40:52 UTC
Created attachment 116314 [details] [review]
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library

This patch modifies the patron entry form in the OPAC so that if there
is only one library to choose from, the input is hidden and the single
library displays as text.

To test, apply the patch and enable PatronSelfRegistration.

- Modify the PatronSelfRegistrationLibraryList system preference to
  include only one library.
- Go to the self-registratoin page in the OPAC.
- Under "Home library," you should see the library name. If you inspect
  the source you should see the library branchcode in a hidden form.
- Confirm that the form submission includes the correct library
  information.
Comment 2 Lucas Gass 2021-02-04 19:10:59 UTC
Created attachment 116335 [details] [review]
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library

This patch modifies the patron entry form in the OPAC so that if there
is only one library to choose from, the input is hidden and the single
library displays as text.

To test, apply the patch and enable PatronSelfRegistration.

- Modify the PatronSelfRegistrationLibraryList system preference to
  include only one library.
- Go to the self-registratoin page in the OPAC.
- Under "Home library," you should see the library name. If you inspect
  the source you should see the library branchcode in a hidden form.
- Confirm that the form submission includes the correct library
  information.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Katrin Fischer 2021-02-06 22:42:24 UTC
Created attachment 116449 [details] [review]
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library

This patch modifies the patron entry form in the OPAC so that if there
is only one library to choose from, the input is hidden and the single
library displays as text.

To test, apply the patch and enable PatronSelfRegistration.

- Modify the PatronSelfRegistrationLibraryList system preference to
  include only one library.
- Go to the self-registratoin page in the OPAC.
- Under "Home library," you should see the library name. If you inspect
  the source you should see the library branchcode in a hidden form.
- Confirm that the form submission includes the correct library
  information.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-02-06 22:42:52 UTC
We've been asked to remove this input field too by libraries, so really in favor of this change :)
Comment 5 Jonathan Druart 2021-02-08 16:05:20 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-02-12 14:22:14 UTC
Enhancement not pushed to 20.11.x

I prefer not modify an OPAC feature behavior on stable branch.