Bug 39265

Summary: Self registration: Hide library from the form if there is only one library
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: OPACAssignee: Lari Taskula <lari.taskula>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 27618, 29859    
Bug Blocks:    
Attachments: Bug 39265: Hide library drop-down from opac-memberentry if there is only one library
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library

Description Lari Taskula 2025-03-06 12:39:30 UTC
In a single-branch Koha installation it makes no sense to have library selection dropdown in the self registration form.
Comment 2 Lari Taskula 2025-03-06 13:39:30 UTC
Created attachment 179017 [details] [review]
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library

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 3 Owen Leonard 2025-03-06 13:58:20 UTC
Created attachment 179018 [details] [review]
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library

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: Owen Leonard <oleonard@myacpl.org>
Comment 4 Jonathan Druart 2025-03-11 13:37:23 UTC
Created attachment 179166 [details] [review]
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library

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: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Katrin Fischer 2025-03-19 10:37:04 UTC
(In reply to Lari Taskula from comment #1)
> The drop-down was hidden in Bug 27618 but reintroduced by regression from
> Bug 29859.
> 
> https://github.com/Koha-Community/Koha/commit/
> d02e91f2694b7642282e124a871a8b6ebcde1055#diff-
> d9a6af2df2cc64675ffd2b565a4dcc7865d4be977545d5dd2b5ad1b4c4532b80L248

Thanks for this detective work! I had a feeling we had this before, this really helps.
Comment 6 Katrin Fischer 2025-03-19 10:56:32 UTC
Pushed for 25.05!

Well done everyone, thank you!