@@ -, +, @@ --- circ/waitingreserves.pl | 10 +++++----- .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) --- a/circ/waitingreserves.pl +++ a/circ/waitingreserves.pl @@ -43,12 +43,12 @@ use Koha::Patrons; my $input = new CGI; +my $op = $input->param('op') || ''; 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 ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( @@ -69,7 +69,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 'cancel_reserve' and $item) { my $res = cancel( $item, $borrowernumber, $fbr, $tbr ); push @cancel_result, $res if $res; } @@ -138,7 +138,7 @@ foreach my $num (@getreserves) { } if ($today > $calcDate) { - if ($cancelall) { + if ($op eq 'cancel_all') { my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); push @cancel_result, $res if $res; next; @@ -167,9 +167,9 @@ $template->param( # Checking if there is a Fast Cataloging Framework $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); -if ($item && $tab eq 'holdsover' && !@cancel_result) { +if ($op eq 'cancel_reserve' && $tab eq 'holdsover' && !@cancel_result) { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); -} elsif ($cancelall) { +} elsif ($op eq 'cancel_all') { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl"); } else { output_html_with_http_headers $input, $cookie, $template->output; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -115,6 +115,7 @@ [% reserveloo.enumchron %]
+ @@ -125,7 +126,7 @@ [% ELSE %] [% END %] -
+ [% END %] @@ -138,7 +139,7 @@ [% IF ( ReservesMaxPickUpDelay ) %]

Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.

[% END %] [% IF ( overloop ) %]
- + [% IF TransferWhenCancelAllWaitingHolds %] @@ -182,6 +183,7 @@ [% overloo.copynumber %] [% overloo.enumchron %] + --