Bug 39265 - Self registration: Hide library from the form if there is only one library
Summary: Self registration: Hide library from the form if there is only one library
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on: 27618 29859
Blocks:
  Show dependency treegraph
 
Reported: 2025-03-06 12:39 UTC by Lari Taskula
Modified: 2025-03-19 10:56 UTC (History)
0 users

See Also:
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:


Attachments
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library (1.72 KB, patch)
2025-03-06 13:39 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library (1.77 KB, patch)
2025-03-06 13:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 39265: Hide library drop-down from opac-memberentry if there is only one library (1.84 KB, patch)
2025-03-11 13:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!