From 7e4a53ea0776bba18713c110b35fd0f8d19d9926 Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Tue, 16 Sep 2025 17:47:20 +0000 Subject: [PATCH] Bug 40819: Only initialize select2 for #report_param_form This patch makes the the css selector specifically target the report_param_form in guided reports To test: 1. Go to Reports > Create guided report 2. Click Next >> 3. Click Next >> 3. Notice the form has been initialized as select2 4. Apply patch and refresh the page 5. Confirm the select column form is back to normal 6. Confirm select2 is still initialized for SQL reports example: select * from items where homebranch IN <> --- .../prog/en/modules/reports/guided_reports_start.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 57e7a1d74c..d8be142676 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -2475,7 +2475,7 @@ }); // Apply select2 to all select fields having a "multiple" attribute - let selectFields = document.querySelectorAll('select[multiple]'); + let selectFields = document.querySelectorAll('#report_param_form select[multiple]'); selectFields.forEach((selectField) => { selectField.style.minWidth = '320px'; $(selectField).select2(); -- 2.39.5