From 0fdcd75b9fcf91e53a9a56923ec58162892d53ba Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 8 Feb 2024 12:06:55 +0100 Subject: [PATCH] Bug 34478: Add 'op' to circ/branchtransfers Signed-off-by: Jonathan Druart --- circ/branchtransfers.pl | 11 +++++------ .../prog/en/modules/circ/branchtransfers.tt | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index c8f7eb691c..b3b07ed0b1 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -76,7 +76,7 @@ my $reqmessage; my $cancelled; my $settransit; -my $request = $query->param('cud-request') || ''; +my $op = $query->param('op') || ''; my $borrowernumber = $query->param('borrowernumber') || 0; my $tobranchcd = $query->param('tobranchcd') || ''; my $trigger = 'Manual'; @@ -84,7 +84,7 @@ my $trigger = 'Manual'; my $ignoreRs = 0; ############ # Deal with the requests.... -if ( $request eq "KillWaiting" ) { +if ( $op eq "cud-KillWaiting" ) { my $item = $query->param('itemnumber'); my $holds = Koha::Holds->search({ itemnumber => $item, @@ -96,7 +96,7 @@ if ( $request eq "KillWaiting" ) { $reqmessage = 1; } # FIXME else? } -elsif ( $request eq "SetTransit" ) { +elsif ( $op eq "cud-SetTransit" ) { my $item = $query->param('itemnumber'); my $reserve_id = $query->param('reserve_id'); ModReserveAffect( $item, $borrowernumber, 1, $reserve_id ); @@ -105,7 +105,7 @@ elsif ( $request eq "SetTransit" ) { $reqmessage = 1; $trigger = 'Reserve'; } -elsif ( $request eq 'KillReserved' ) { +elsif ( $op eq 'cud-KillReserved' ) { my $biblionumber = $query->param('biblionumber'); my $reserve_id = $query->param('reserve_id'); my $hold = Koha::Holds->find({ reserve_id => $reserve_id }); @@ -122,8 +122,7 @@ my $transferred; my $barcode = $query->param('barcode'); # remove leading/trailing whitespace $barcode = barcodedecode($barcode) if $barcode; -# warn "barcode : $barcode"; -if ($barcode) { +if ($op eq 'cud-transfer' && $barcode) { ( $transferred, $messages ) = transferbook({ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt index 2f206ce951..1a1963ff0b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -77,11 +77,11 @@ [% IF ( waiting or transferred or processing ) %] - + [% END %] [% IF ( reserved ) %] - + [% END %] @@ -103,7 +103,7 @@ - + @@ -112,8 +112,7 @@ Ignore and return to transfers: -
- [% INCLUDE 'csrf-token.inc' %] + [% FOREACH trsfitemloo IN trsfitemloop %] @@ -200,6 +199,7 @@ [% END %] +
-- 2.39.5