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 220-226 Link Here
220
            </ul>
220
            </ul>
221
        </div>
221
        </div>
222
    [% END %]
222
    [% END %]
223
224
    [% UNLESS ( multi_hold ) %]
223
    [% UNLESS ( multi_hold ) %]
225
        <h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2>
224
        <h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2>
226
    [% ELSE %]
225
    [% ELSE %]
Lines 1427-1432 Link Here
1427
    [% INCLUDE 'select2.inc' %]
1426
    [% INCLUDE 'select2.inc' %]
1428
    [% Asset.js("js/holds.js") | $raw %]
1427
    [% Asset.js("js/holds.js") | $raw %]
1429
    [% Asset.js("js/form-submit.js") | $raw %]
1428
    [% Asset.js("js/form-submit.js") | $raw %]
1429
    [% Asset.js("js/basket.js") | $raw %]
1430
1430
1431
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1431
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1432
    [% IF multi_hold %]
1432
    [% IF multi_hold %]
Lines 1434-1439 Link Here
1434
    [% END %]
1434
    [% END %]
1435
    <script>
1435
    <script>
1436
        $(document).ready(function () {
1436
        $(document).ready(function () {
1437
1437
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1438
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1438
            KohaTable("patron_holds_table", {
1439
            KohaTable("patron_holds_table", {
1439
                "bPaginate":false,
1440
                "bPaginate":false,
Lines 1816-1821 Link Here
1816
                });
1817
                });
1817
            [% END %]
1818
            [% END %]
1818
1819
1820
            [% IF successful_holds && Koha.Preference('AutoDeleteFromCartWhenHoldPlaced').grep('staff').size %]
1821
                [% FOREACH biblionumber in successful_holds %]
1822
                    delSingleRecord('[% biblionumber | html %]');
1823
                [% END %]
1824
            [% END %]
1825
1819
            if(!localStorage.selectedHolds  || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) {
1826
            if(!localStorage.selectedHolds  || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) {
1820
                localStorage.selectedHolds = [];
1827
                localStorage.selectedHolds = [];
1821
            }
1828
            }
(-)a/reserve/placerequest.pl (-1 / +8 lines)
Lines 66-71 foreach my $bibnum (@holdable_bibs) { Link Here
66
66
67
if ( $op eq 'cud-placerequest' && $patron ) {
67
if ( $op eq 'cud-placerequest' && $patron ) {
68
    my %failed_holds;
68
    my %failed_holds;
69
    my @successful_biblionumbers;
69
    foreach my $biblionumber ( keys %bibinfos ) {
70
    foreach my $biblionumber ( keys %bibinfos ) {
70
71
71
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
72
        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
                        $hold_priority++;
110
                        $hold_priority++;
109
111
Lines 132-137 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
132
                        non_priority     => $non_priority,
134
                        non_priority     => $non_priority,
133
                    }
135
                    }
134
                );
136
                );
137
                push @successful_biblionumbers, $biblionumber;
135
            }
138
            }
136
        } else {
139
        } else {
137
140
Lines 155-160 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
155
                            item_group_id    => $item_group_id,
158
                            item_group_id    => $item_group_id,
156
                        }
159
                        }
157
                    );
160
                    );
161
                    push @successful_biblionumbers, $biblionumber;
158
                }
162
                }
159
            }
163
            }
160
        }
164
        }
Lines 167-173 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
167
    foreach my $msg ( keys %failed_holds ) {
171
    foreach my $msg ( keys %failed_holds ) {
168
        push( @failed_hold_msgs, $msg );
172
        push( @failed_hold_msgs, $msg );
169
    }
173
    }
170
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
174
    $redirect_url->query_form(
175
        biblionumber     => [@biblionumbers], failed_holds => \@failed_hold_msgs,
176
        successful_holds => \@successful_biblionumbers,
177
    );
171
    print $input->redirect($redirect_url);
178
    print $input->redirect($redirect_url);
172
} elsif ( $borrowernumber eq '' ) {
179
} elsif ( $borrowernumber eq '' ) {
173
    print $input->header();
180
    print $input->header();
(-)a/reserve/request.pl (-3 / +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 738-744 $template->param( pickup => $pickup || C4::Context->userenv->{branch} ); Link Here
738
739
739
$template->param( borrowernumber => $borrowernumber_hold );
740
$template->param( borrowernumber => $borrowernumber_hold );
740
741
741
$template->param( failed_holds => \@failed_holds );
742
$template->param( failed_holds => \@failed_holds, successful_holds => \@successful_holds );
742
743
743
# printout the page
744
# printout the page
744
output_html_with_http_headers $input, $cookie, $template->output;
745
output_html_with_http_headers $input, $cookie, $template->output;
745
- 

Return to bug 36868