From 21fa3f64c31dad23e50e633a6f51f98c8f7ade12 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 13 Feb 2024 09:06:47 +0100 Subject: [PATCH] Bug 34478: Fix link to batch patron mod from reports Signed-off-by: Jonathan Druart --- .../prog/en/modules/reports/guided_reports_start.tt | 12 ++++++++---- tools/modborrowers.pl | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) 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 193c7884fe..c2a40a2270 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 @@ -996,12 +996,16 @@
- [% INCLUDE 'csrf-token.inc' %] [% # Preserve the whitespace of the following textarea in order to format the values correctly %] - + [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %] + [% IF cardnumbers %] + [% SET batch_cardnumbers = cardnumbers.length %] + [% FOR b IN cardnumbers.split("\n") %] + + [% END -%] + [% END %] +
diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 0d15e256e7..2a6e7c07d8 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -66,6 +66,8 @@ if ( $op eq 'cud-show' ) { if( my $cardnumberlist = $input->param('cardnumberlist') ){ # User submitted a list of card numbers push @patronidnumbers, split( /\s\n/, $cardnumberlist ); + } elsif ( my @cardnumbers = $input->multi_param('cardnumber') ) { + @patronidnumbers = @cardnumbers; } elsif ( my $cardnumberuploadfile = $input->param('cardnumberuploadfile') ){ # User uploaded a file of card numbers binmode $cardnumberuploadfile, ':encoding(UTF-8)'; -- 2.39.5