View | Details | Raw Unified | Return to bug 36868
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +8 lines)
Lines 284-290 Link Here
284
            </ul>
284
            </ul>
285
        </div>
285
        </div>
286
    [% END %]
286
    [% END %]
287
288
    [% UNLESS ( multi_hold ) %]
287
    [% UNLESS ( multi_hold ) %]
289
        <h2>Place hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2>
288
        <h2>Place hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2>
290
    [% ELSE %]
289
    [% ELSE %]
Lines 1574-1579 Link Here
1574
    [% INCLUDE 'select2.inc' %]
1573
    [% INCLUDE 'select2.inc' %]
1575
    [% Asset.js("js/holds.js") | $raw %]
1574
    [% Asset.js("js/holds.js") | $raw %]
1576
    [% Asset.js("js/hold-group.js") | $raw %]
1575
    [% Asset.js("js/hold-group.js") | $raw %]
1576
    [% Asset.js("js/basket.js") | $raw %]
1577
1577
1578
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1578
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1579
    [% IF multi_hold %]
1579
    [% IF multi_hold %]
Lines 1581-1586 Link Here
1581
    [% END %]
1581
    [% END %]
1582
    <script>
1582
    <script>
1583
        $(document).ready(function () {
1583
        $(document).ready(function () {
1584
1584
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1585
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1585
            $("#patron_holds_table").kohaTable(
1586
            $("#patron_holds_table").kohaTable(
1586
                {
1587
                {
Lines 1978-1983 Link Here
1978
                });
1979
                });
1979
            [% END %]
1980
            [% END %]
1980
1981
1982
            [% IF successful_holds && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('staff').size %]
1983
                [% FOREACH success IN successful_holds.split('\|') %]
1984
                    delSingleRecord('[% success | html %]');
1985
                [% END %]
1986
            [% END %]
1987
1981
            $(".hold-arrow").click(function(e) {
1988
            $(".hold-arrow").click(function(e) {
1982
                e.preventDefault();
1989
                e.preventDefault();
1983
                let arrowForm = $("#hold-actions-form").attr({
1990
                let arrowForm = $("#hold-actions-form").attr({
(-)a/reserve/placerequest.pl (+5 lines)
Lines 70-75 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
70
    my %failed_holds;
70
    my %failed_holds;
71
    my @successful_hold_ids;
71
    my @successful_hold_ids;
72
72
73
    my @successful_biblionumbers;
73
    foreach my $biblionumber ( keys %bibinfos ) {
74
    foreach my $biblionumber ( keys %bibinfos ) {
74
75
75
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
76
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
Lines 108-113 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
108
                                non_priority     => $non_priority,
109
                                non_priority     => $non_priority,
109
                            }
110
                            }
110
                        );
111
                        );
112
                        push @successful_biblionumbers, $biblionumber;
111
113
112
                        push @successful_hold_ids, $reserve_id;
114
                        push @successful_hold_ids, $reserve_id;
113
                        $hold_priority++;
115
                        $hold_priority++;
Lines 138-143 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
138
                    }
140
                    }
139
                );
141
                );
140
                push @successful_hold_ids, $reserve_id;
142
                push @successful_hold_ids, $reserve_id;
143
                push @successful_biblionumbers, $biblionumber;
141
            }
144
            }
142
        } else {
145
        } else {
143
146
Lines 162-167 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
162
                        }
165
                        }
163
                    );
166
                    );
164
                    push @successful_hold_ids, $reserve_id;
167
                    push @successful_hold_ids, $reserve_id;
168
                    push @successful_biblionumbers, $biblionumber;
165
                }
169
                }
166
            }
170
            }
167
        }
171
        }
Lines 177-182 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
177
        push( @failed_hold_msgs, $msg );
181
        push( @failed_hold_msgs, $msg );
178
    }
182
    }
179
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
183
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
184
    $redirect_url .= "&successful_holds=" . join( '|', @successful_biblionumbers );
180
    print $input->redirect($redirect_url);
185
    print $input->redirect($redirect_url);
181
} elsif ( $borrowernumber eq '' ) {
186
} elsif ( $borrowernumber eq '' ) {
182
    print $input->header();
187
    print $input->header();
(-)a/reserve/request.pl (-4 / +3 lines)
Lines 91-97 my $exceeded_holds_per_record; Link Here
91
my @failed_holds   = $input->multi_param('failed_holds');
91
my @failed_holds   = $input->multi_param('failed_holds');
92
my $form_submitted = $input->param('form_submitted');
92
my $form_submitted = $input->param('form_submitted');
93
93
94
my $op = $input->param('op') || q{};
94
my @successful_holds = $input->multi_param('successful_holds');
95
my $op               = $input->param('op') || q{};
95
96
96
if ( $op eq 'cud-move' ) {
97
if ( $op eq 'cud-move' ) {
97
    my $where           = $input->param('where');
98
    my $where           = $input->param('where');
Lines 803-810 $template->param( biblionumbers => \@biblionumbers ); Link Here
803
$template->param( pickup => $pickup || C4::Context->userenv->{branch} );
804
$template->param( pickup => $pickup || C4::Context->userenv->{branch} );
804
805
805
$template->param( borrowernumber => $borrowernumber_hold );
806
$template->param( borrowernumber => $borrowernumber_hold );
806
807
$template->param( failed_holds   => \@failed_holds, successful_holds => @successful_holds );
807
$template->param( failed_holds => \@failed_holds );
808
808
809
# printout the page
809
# printout the page
810
output_html_with_http_headers $input, $cookie, $template->output;
810
output_html_with_http_headers $input, $cookie, $template->output;
811
- 

Return to bug 36868