Bug 36868: (follow-up) Fix variable names
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d0e2ee1cac
commit
fac6a1adfe
|
|
@ -2033,8 +2033,8 @@
|
|||
if (!localStorage.selectedHolds || document.referrer.replace(/\?.*/, "") !== document.location.origin + document.location.pathname) {
|
||||
localStorage.selectedHolds = [];
|
||||
}
|
||||
[% IF successful_holds && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('staff').size %]
|
||||
[% FOREACH success IN successful_holds.split('\|') %]
|
||||
[% IF successful_biblionumbers && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('staff').size %]
|
||||
[% FOREACH success IN successful_biblionumbers.split('\|') %]
|
||||
delSingleRecord('[% success | html %]');
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -1092,8 +1092,8 @@
|
|||
[% END %]
|
||||
</script>
|
||||
<script nonce="[% Koha.CSPNonce | $raw %]">
|
||||
[% IF successful_holds && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('opac').size %]
|
||||
[% FOREACH success IN successful_holds.split('\|') %]
|
||||
[% IF successful_biblionumbers && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('opac').size %]
|
||||
[% FOREACH success IN successful_biblionumbers.split('\|') %]
|
||||
delSingleRecord('[% success | html %]');
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ if ( $op eq 'cud-place_reserve' ) {
|
|||
|
||||
my @failed_holds;
|
||||
my @successful_hold_ids;
|
||||
my @successful_holds;
|
||||
my @successful_biblionumbers;
|
||||
while (@selectedItems) {
|
||||
my $biblioNum = shift(@selectedItems);
|
||||
my $itemNum = shift(@selectedItems);
|
||||
|
|
@ -311,8 +311,8 @@ if ( $op eq 'cud-place_reserve' ) {
|
|||
);
|
||||
if ($reserve_id) {
|
||||
++$reserve_cnt;
|
||||
push @successful_hold_ids, $reserve_id;
|
||||
push @successful_holds, $biblioNum;
|
||||
push @successful_hold_ids, $reserve_id;
|
||||
push @successful_biblionumbers, $biblioNum;
|
||||
} else {
|
||||
push @failed_holds, 'not_placed';
|
||||
}
|
||||
|
|
@ -321,10 +321,14 @@ if ( $op eq 'cud-place_reserve' ) {
|
|||
|
||||
$patron->create_hold_group( \@successful_hold_ids ) if $add_to_hold_group;
|
||||
|
||||
print $query->redirect( "/cgi-bin/koha/opac-user.pl?"
|
||||
. ( @failed_holds ? "failed_holds=" . join( '|', @failed_holds ) : q|| )
|
||||
. ( @successful_holds ? "successful_holds=" . join( '|', @successful_holds ) : q|| )
|
||||
. "&opac-user-holds=1" );
|
||||
print $query->redirect(
|
||||
"/cgi-bin/koha/opac-user.pl?"
|
||||
. ( @failed_holds ? "failed_holds=" . join( '|', @failed_holds ) : q|| )
|
||||
. (
|
||||
@successful_biblionumbers ? "&successful_biblionumbers=" . join( '|', @successful_biblionumbers ) : q||
|
||||
)
|
||||
. "&tab=opac-user-holds"
|
||||
);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ $template->param(
|
|||
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
|
||||
OpacHoldNotes => C4::Context->preference('OpacHoldNotes'),
|
||||
failed_holds => scalar $query->param('failed_holds'),
|
||||
successful_holds => scalar $query->param('successful_holds'),
|
||||
successful_biblionumbers => scalar $query->param('successful_biblionumbers'),
|
||||
opac_user_holds => scalar $query->param('opac-user-holds') || 0,
|
||||
opac_user_overdues => scalar $query->param('opac-user-overdues') || 0,
|
||||
opac_user_article_requests => scalar $query->param('opac-user-article-requests') || 0,
|
||||
|
|
|
|||
|
|
@ -198,8 +198,15 @@ if ( $op eq 'cud-placerequest' && $patron ) {
|
|||
foreach my $msg ( keys %failed_holds ) {
|
||||
push( @failed_hold_msgs, $msg );
|
||||
}
|
||||
$redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
|
||||
$redirect_url .= "&successful_holds=" . join( '|', @successful_biblionumbers );
|
||||
$redirect_url->query_form(
|
||||
biblionumber => [@biblionumbers],
|
||||
failed_holds => \@failed_hold_msgs,
|
||||
(
|
||||
@successful_biblionumbers
|
||||
? ( successful_biblionumbers => join( '|', @successful_biblionumbers ) )
|
||||
: ()
|
||||
),
|
||||
);
|
||||
print $input->redirect($redirect_url);
|
||||
} elsif ( $borrowernumber eq '' ) {
|
||||
print $input->header();
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ my $exceeded_holds_per_record;
|
|||
my @failed_holds = $input->multi_param('failed_holds');
|
||||
my $form_submitted = $input->param('form_submitted');
|
||||
|
||||
my @successful_holds = $input->multi_param('successful_holds');
|
||||
my $op = $input->param('op') || q{};
|
||||
my $successful_biblionumbers = $input->param('successful_biblionumbers');
|
||||
my $op = $input->param('op') || q{};
|
||||
|
||||
if ( $op eq 'cud-move' ) {
|
||||
my $where = $input->param('where');
|
||||
|
|
@ -804,7 +804,7 @@ $template->param( biblionumbers => \@biblionumbers );
|
|||
$template->param( pickup => $pickup || C4::Context->userenv->{branch} );
|
||||
|
||||
$template->param( borrowernumber => $borrowernumber_hold );
|
||||
$template->param( failed_holds => \@failed_holds, successful_holds => @successful_holds );
|
||||
$template->param( failed_holds => \@failed_holds, successful_biblionumbers => $successful_biblionumbers );
|
||||
|
||||
# printout the page
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
|
|||
Loading…
Reference in New Issue