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 a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2>
288
        <h2>Place a 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 73-78 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
73
        $hold_group = Koha::HoldGroup->new->store;
73
        $hold_group = Koha::HoldGroup->new->store;
74
    }
74
    }
75
75
76
    my @successful_biblionumbers;
76
    foreach my $biblionumber ( keys %bibinfos ) {
77
    foreach my $biblionumber ( keys %bibinfos ) {
77
78
78
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
79
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
Lines 112-117 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
112
                                hold_group_id    => $hold_group ? $hold_group->id : undef,
113
                                hold_group_id    => $hold_group ? $hold_group->id : undef,
113
                            }
114
                            }
114
                        );
115
                        );
116
                        push @successful_biblionumbers, $biblionumber;
115
117
116
                        $hold_priority++;
118
                        $hold_priority++;
117
119
Lines 141-146 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
141
                        hold_group_id    => $hold_group ? $hold_group->id : undef,
143
                        hold_group_id    => $hold_group ? $hold_group->id : undef,
142
                    }
144
                    }
143
                );
145
                );
146
                push @successful_biblionumbers, $biblionumber;
144
            }
147
            }
145
        } else {
148
        } else {
146
149
Lines 165-170 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
165
                            hold_group_id    => $hold_group ? $hold_group->id : undef,
168
                            hold_group_id    => $hold_group ? $hold_group->id : undef,
166
                        }
169
                        }
167
                    );
170
                    );
171
                    push @successful_biblionumbers, $biblionumber;
168
                }
172
                }
169
            }
173
            }
170
        }
174
        }
Lines 178-183 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
178
        push( @failed_hold_msgs, $msg );
182
        push( @failed_hold_msgs, $msg );
179
    }
183
    }
180
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
184
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
185
    $redirect_url .= "&successful_holds=" . join( '|', @successful_biblionumbers );
181
    print $input->redirect($redirect_url);
186
    print $input->redirect($redirect_url);
182
} elsif ( $borrowernumber eq '' ) {
187
} elsif ( $borrowernumber eq '' ) {
183
    print $input->header();
188
    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