From 9439c9a36e36cb0cd6617e2eef97abd902afee2e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 1 Feb 2024 09:36:03 -0500 Subject: [PATCH] Bug 34478: Manual fix - add ops / change confirmation forms to get - waiting_holds.inc / waitingreserves.tt Signed-off-by: Jonathan Druart --- circ/waitingreserves.pl | 8 ++++---- .../intranet-tmpl/prog/en/includes/waiting_holds.inc | 1 + .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 8 +++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 26924f27fd..0ffebe1b24 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -35,12 +35,12 @@ use Koha::BackgroundJob::BatchCancelHold; my $input = CGI->new; +my $op = $input->param('op') || q{}; my $item = $input->param('itemnumber'); my $borrowernumber = $input->param('borrowernumber'); my $fbr = $input->param('fbr') || ''; my $tbr = $input->param('tbr') || ''; my $all_branches = $input->param('allbranches') || ''; -my $cancelall = $input->param('cancelall'); my $tab = $input->param('tab'); my $cancelBulk = $input->param('cancelBulk'); @@ -60,7 +60,7 @@ $template->param( TransferWhenCancelAllWaitingHolds => 1 ) if $transfer_when_can my @cancel_result; # if we have a return from the form we cancel the holds -if ($item) { +if ( $op eq 'cud-cancel' && $item) { my $res = cancel( $item, $borrowernumber, $fbr, $tbr ); push @cancel_result, $res if $res; } @@ -103,7 +103,7 @@ while ( my $hold = $holds->next ) { my $calcDate = Date_to_Days( $expire_year, $expire_month, $expire_day ); if ($today > $calcDate) { - if ($cancelall) { + if ( $op eq 'cud-cancelall' ) { my $res = cancel( $hold->item->itemnumber, $hold->borrowernumber, $hold->item->holdingbranch, $hold->item->homebranch, !$transfer_when_cancel_all ); push @cancel_result, $res if $res; next; @@ -136,7 +136,7 @@ $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ) if ($item && $tab eq 'holdsover' && !@cancel_result) { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); -} elsif ($cancelall) { +} elsif ( $op eq 'cud-cancelall' ) { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl"); } else { output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc index 03644ba2b3..f654f50c29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc @@ -68,6 +68,7 @@
[% INCLUDE 'csrf-token.inc' %] + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index 8d83be76d2..3af7bf9861 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -69,8 +69,7 @@

[% nextreservtitle | html %] is on hold for [% nextreservsurname | html %], [% nextreservfirstname | html %]. Please retain this item and check it in to process the hold.

- - [% INCLUDE 'csrf-token.inc' %] +
@@ -81,8 +80,7 @@

[% nextreservtitle | html %] is on hold for [% nextreservsurname | html %], [% nextreservfirstname | html %]. Please retain this item and check it in to process the hold.

-
- [% INCLUDE 'csrf-token.inc' %] +
@@ -128,7 +126,7 @@
[% INCLUDE 'csrf-token.inc' %] - + [% IF TransferWhenCancelAllWaitingHolds %] -- 2.39.5