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 224-230 Link Here
224
                    </ul>
224
                    </ul>
225
                </div>
225
                </div>
226
            [% END %]
226
            [% END %]
227
228
            [% UNLESS ( multi_hold ) %]
227
            [% UNLESS ( multi_hold ) %]
229
                <h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2>
228
                <h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2>
230
            [% ELSE %]
229
            [% ELSE %]
Lines 1484-1489 Link Here
1484
    [% INCLUDE 'select2.inc' %]
1483
    [% INCLUDE 'select2.inc' %]
1485
    [% Asset.js("js/holds.js") | $raw%]
1484
    [% Asset.js("js/holds.js") | $raw%]
1486
    [% Asset.js("js/form-submit.js") | $raw%]
1485
    [% Asset.js("js/form-submit.js") | $raw%]
1486
    [% Asset.js("js/basket.js") | $raw %]
1487
1487
1488
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1488
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1489
    [% IF multi_hold %]
1489
    [% IF multi_hold %]
Lines 1492-1497 Link Here
1492
1492
1493
    <script>
1493
    <script>
1494
        $(document).ready(function () {
1494
        $(document).ready(function () {
1495
1495
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1496
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1496
            KohaTable("patron_holds_table", {
1497
            KohaTable("patron_holds_table", {
1497
                "bPaginate":false,
1498
                "bPaginate":false,
Lines 1881-1886 Link Here
1881
                });
1882
                });
1882
            [% END %]
1883
            [% END %]
1883
1884
1885
            [% IF successful_holds && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('staff').size %]
1886
                [% FOREACH biblionumber in successful_holds %]
1887
                    delSingleRecord('[% biblionumber | html %]');
1888
                [% END %]
1889
            [% END %]
1890
1884
            if(!localStorage.selectedHolds  || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) {
1891
            if(!localStorage.selectedHolds  || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) {
1885
                localStorage.selectedHolds = [];
1892
                localStorage.selectedHolds = [];
1886
            }
1893
            }
(-)a/reserve/placerequest.pl (-1 / +5 lines)
Lines 69-74 foreach my $bibnum ( @holdable_bibs ) { Link Here
69
69
70
if ( $op eq 'cud-placerequest' && $patron ) {
70
if ( $op eq 'cud-placerequest' && $patron ) {
71
    my %failed_holds;
71
    my %failed_holds;
72
    my @successful_biblionumbers;
72
    foreach my $biblionumber ( keys %bibinfos ) {
73
    foreach my $biblionumber ( keys %bibinfos ) {
73
74
74
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
75
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
Lines 104-109 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
104
                                non_priority     => $non_priority,
105
                                non_priority     => $non_priority,
105
                            }
106
                            }
106
                        );
107
                        );
108
                        push @successful_biblionumbers, $biblionumber;
107
109
108
                    } else {
110
                    } else {
109
                        $failed_holds{$can_item_be_reserved} = 1;
111
                        $failed_holds{$can_item_be_reserved} = 1;
Lines 130-135 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
130
                        non_priority     => $non_priority,
132
                        non_priority     => $non_priority,
131
                    }
133
                    }
132
                );
134
                );
135
                push @successful_biblionumbers, $biblionumber;
133
            }
136
            }
134
        } else {
137
        } else {
135
            # place a request on 1st available
138
            # place a request on 1st available
Lines 152-157 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
152
                            item_group_id    => $item_group_id,
155
                            item_group_id    => $item_group_id,
153
                        }
156
                        }
154
                    );
157
                    );
158
                push @successful_biblionumbers, $biblionumber;
155
                }
159
                }
156
            }
160
            }
157
        }
161
        }
Lines 164-170 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
164
    foreach my $msg ( keys %failed_holds ) {
168
    foreach my $msg ( keys %failed_holds ) {
165
        push( @failed_hold_msgs, $msg );
169
        push( @failed_hold_msgs, $msg );
166
    }
170
    }
167
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
171
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs, successful_holds => \@successful_biblionumbers, );
168
    print $input->redirect($redirect_url);
172
    print $input->redirect($redirect_url);
169
}
173
}
170
elsif ( $borrowernumber eq '' ) {
174
elsif ( $borrowernumber eq '' ) {
(-)a/reserve/request.pl (-3 / +2 lines)
Lines 89-95 my $messages; Link Here
89
my $exceeded_maxreserves;
89
my $exceeded_maxreserves;
90
my $exceeded_holds_per_record;
90
my $exceeded_holds_per_record;
91
my @failed_holds = $input->multi_param('failed_holds');
91
my @failed_holds = $input->multi_param('failed_holds');
92
92
my @successful_holds = $input->multi_param('successful_holds');
93
my $op = $input->param('op') || q{};
93
my $op = $input->param('op') || q{};
94
94
95
if ( $op eq 'cud-move' ) {
95
if ( $op eq 'cud-move' ) {
Lines 723-729 $template->param( pickup => $pickup || C4::Context->userenv->{branch} ); Link Here
723
723
724
$template->param(borrowernumber => $borrowernumber_hold);
724
$template->param(borrowernumber => $borrowernumber_hold);
725
725
726
$template->param( failed_holds => \@failed_holds );
726
$template->param( failed_holds => \@failed_holds, successful_holds => \@successful_holds );
727
727
728
# printout the page
728
# printout the page
729
output_html_with_http_headers $input, $cookie, $template->output;
729
output_html_with_http_headers $input, $cookie, $template->output;
730
- 

Return to bug 36868