From bc1155c378dc017710e8b9644bb13992d8fbd352 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 Signed-off-by: Michaela Sieber Signed-off-by: Pedro Amorim --- 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 8046026ea50..6880eaa3c08 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 55afc39ff05..735e5e0af7d 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 %] +