Bug 34478: Fix link to batch patron mod from reports

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-13 09:06:47 +01:00
parent cf445df109
commit 21fa3f64c3
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 10 additions and 4 deletions

View file

@ -996,12 +996,16 @@
</form>
<form method="get" action="/cgi-bin/koha/tools/modborrowers.pl" id="batch_patron_modification" target="_blank">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="op" value="show" />
[% # Preserve the whitespace of the following textarea in order to format the values correctly %]
<textarea style="display:none" name="cardnumberlist" id="cardnumberlist">
[%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %][% IF cardnumbers %][% SET batch_cardnumbers = 1 %][% cardnumbers | html %][% END -%]
</textarea>
[%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %]
[% IF cardnumbers %]
[% SET batch_cardnumbers = cardnumbers.length %]
[% FOR b IN cardnumbers.split("\n") %]
<input type="hidden" name="cardnumber" value="[% b | uri %]" />
[% END -%]
[% END %]
</form>
<form action="/cgi-bin/koha/patroncards/edit-batch.pl" id="patron_card_creator" method="post" target="_blank">

View file

@ -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)';