Bug 40298

Summary: A select2 in a bootstrap modal, like in the patron card batch patron search modal, needs it's parent defined
Product: Koha Reporter: Michael Hafen <michael.hafen>
Component: Label/patron card printingAssignee: Michael Hafen <michael.hafen>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low    
Version: 25.05   
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:
Circulation function:
Attachments: Bug 40298 - define select2 parent in patron search modal
Bug 40298: define select2 parent in patron search modal

Description Michael Hafen 2025-07-02 23:56:02 UTC
A select2 in a bootstrap modal, like the sort1 and sort2 fields in the patron card -> new batch -> patron search modal, needs it's parent defined.  Otherwise the "dropdown" is anchored to the body, and is stuck behind the modal.
Comment 1 Michael Hafen 2025-07-02 23:59:46 UTC
Created attachment 183721 [details] [review]
Bug 40298 - define select2 parent in patron search modal

The patron search modal in the patron card creator -> new batch -> patron
search has two select2 modals, sort1 and sort2.  If these are not anchored
to the modal they will be anchored to the body element and appear behind the
modal.

Trivial patch so no test plan.
Comment 2 Owen Leonard 2025-07-03 12:04:07 UTC
Created attachment 183751 [details] [review]
Bug 40298: define select2 parent in patron search modal

The patron search modal in the patron card creator -> new batch ->
patron search has two select2 modals, sort1 and sort2.  If these are not
anchored to the modal they will be anchored to the body element and
appear behind the modal.

To test, apply the patch and go to Tools -> Patron card creator -> New
-> Card batch.

- Click "Add patron(s)"
- Test the "Sort 1" and "Sort 2" dropdowns. They should work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>