From ae67fcfe40c7fdc1930595c13ca60026bdb9bf10 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 <> Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass (cherry picked from commit 646109833fd98c91dcc6275c25dbfac4f16423e2) Signed-off-by: Paul Derscheid --- .../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 1e50498d74..5668c4fa13 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 @@ -2451,7 +2451,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();