Bugzilla – Attachment 160880 Details for
Bug 35746
Multiple selections for parameters used in the IN function
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35746: add multiselect to report dropdowns
Bug-35746-add-multiselect-to-report-dropdowns.patch (text/plain), 3.51 KB, created by
Brendan Lawlor
on 2024-01-11 16:50:14 UTC
(
hide
)
Description:
Bug 35746: add multiselect to report dropdowns
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-01-11 16:50:14 UTC
Size:
3.51 KB
patch
obsolete
>From 8e01d3e98716be689043a6c1f98db32a430049f2 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Thu, 11 Jan 2024 16:31:26 +0000 >Subject: [PATCH] Bug 35746: add multiselect to report dropdowns > >--- > C4/Reports/Guided.pm | 2 +- > .../prog/en/modules/reports/guided_reports_start.tt | 2 +- > reports/guided_reports.pl | 6 ++++-- > 3 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index a55cd17743..1d8b195b3c 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -974,7 +974,7 @@ sub GetParametersFromSQL { > > for ( my $i = 0; $i < ($#split/2) ; $i++ ) { > my ($name,$authval) = split(/\|/,$split[$i*2+1]); >- $authval =~ s/\:all$// if $authval; >+ $authval =~ s/\:all$|\:in$// if $authval; > push @sql_parameters, { 'name' => $name, 'authval' => $authval }; > } > >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 74d9315a4e..e2a3990566 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 >@@ -883,7 +883,7 @@ > [% ELSE %] > <li> > <label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> >- <select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]"> >+ <select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" [% IF (sql_param.select_multiple) %]multiple[% END %]> > [% IF (sql_param.include_all) %] > <option value="%">All</option> > [% END %] >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 85b42c4efb..016214e4a7 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -710,7 +710,9 @@ elsif ($phase eq 'Run this report'){ > if( defined $uniq_params{$text.$sep.$authorised_value_all} ){ > next; > } else { $uniq_params{$text.$sep.$authorised_value_all} = "$i"; } >- my ($authorised_value, $all) = split /:/, $authorised_value_all; >+ my ($authorised_value, $options) = split /:/, $authorised_value_all; >+ my $all = $options if $options eq "all"; >+ my $multiple = $options if $options eq "in"; > my $input; > my $labelid; > if ( not defined $authorised_value ) { >@@ -829,7 +831,7 @@ elsif ($phase eq 'Run this report'){ > }; > } > >- push @tmpl_parameters, {'entry' => $text, 'input' => $input, 'labelid' => $labelid, 'name' => $text.$sep.$authorised_value_all, 'include_all' => $all }; >+ push @tmpl_parameters, {'entry' => $text, 'input' => $input, 'labelid' => $labelid, 'name' => $text.$sep.$authorised_value_all, 'include_all' => $all, select_multiple => $multiple }; > } > $template->param('sql' => $sql, > 'name' => $name, >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35746
:
160880
|
160995
|
161224
|
161247
|
161248
|
162300
|
162303
|
163875
|
163920
|
163921
|
165276
|
165333
|
165334
|
165345
|
165659
|
165660