From 38cb536fd4e750595d4b7aebeeb569d53a00f3b4 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Wed, 2 Jul 2025 17:56:36 -0600 Subject: [PATCH] Bug 40298 - define select2 parent in patron search modal Content-Type: text/plain; charset="utf-8" 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. --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 60b4afe949..d440fa60bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -316,8 +316,8 @@ [% END %] $(document).on("shown.bs.modal", function(){ - $('select[name="sort1_filter"]').select2({allowClear:true}); - $('select[name="sort2_filter"]').select2({allowClear:true}); + $('select[name="sort1_filter"]').select2({allowClear:true,dropdownParent:$('#patron_search_modal')}); + $('select[name="sort2_filter"]').select2({allowClear:true,dropdownParent:$('#patron_search_modal')}); }).on("hidden.bs.modal", function(){ ["sort1_filter", "sort2_filter"].forEach(function(item){ if( $('select[name=' + item + ']').data("select2") ){ -- 2.43.0