Bug 27618

Summary: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Product: Koha Reporter: Magnus Enger <magnus>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
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
Bug Depends on: 16274    
Bug Blocks:    
Attachments: Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library

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.