From eb959e00d4ec67494d98bd7b49883090b69cd068 Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Wed, 29 Jan 2025 20:27:27 +0000 Subject: [PATCH] Bug 37050: Add select2 to SQL reports multiselect This patch adds select 2 to multi-select parameter fields in SQL reports. If no selections are made for a multi-select all authorised values will be used by default. This allows reports to be written where a multi select parameter is optional. To test: 1. Apply patch 2. Go to Reports and create a report from SQL select * from items where homebranch in <> and itype in <> 3. Run the report making multiple selections for each parameter and making single selections for each parameter 4. Run the report making multiple selections for one parameter and no selections in another parameter 5. Check that the results are as you would expect 6. On the results page click 'Show SQL code' 7. Confirm that the codes are included according to your selections 8. Note that when no selections are made for a parameter all codes are used by defaut Sponsored-by: CLAMS --- koha-tmpl/intranet-tmpl/prog/css/select2.css | 5 +++ .../modules/reports/guided_reports_start.tt | 39 +++++++++++-------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/select2.css b/koha-tmpl/intranet-tmpl/prog/css/select2.css index 8046026ea5..6880eaa3c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/select2.css +++ b/koha-tmpl/intranet-tmpl/prog/css/select2.css @@ -44,3 +44,8 @@ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { margin-right: 3px; } + +.select2-container--default .select2-selection--multiple .select2-selection__rendered li { + clear: none; + width: auto; +} \ No newline at end of file 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 55afc39ff0..735e5e0af7 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 @@ -907,10 +907,12 @@ [% ELSE %]
  • - + + [% ELSE %] +