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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (+8 lines)
Lines 93-98 Link Here
93
                        <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
93
                        <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
94
                        [% hold.priority | html %]
94
                        [% hold.priority | html %]
95
                    [% END %]
95
                    [% END %]
96
97
                    [% IF cancel_notice_branches.size %]
98
                        [% SET bc = hold.patron.branchcode %]
99
                        [% SET all_bc = "" %]
100
                        [% UNLESS cancel_notice_branches.$bc || cancel_notice_branches.$all_bc %]
101
                            <span class="no-notice-warning text-warning">Cancellation will not recieve a notice.</span>
102
                        [% END %]
103
                    [% END %]
96
                </td>
104
                </td>
97
                [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
105
                [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
98
                [%- UNLESS hold.found -%]
106
                [%- UNLESS hold.found -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-4 / +6 lines)
Lines 1256-1262 Link Here
1256
                            </div>
1256
                            </div>
1257
                        <fieldset id="cancellation-reason-fieldset" class="action" style="display:none">
1257
                        <fieldset id="cancellation-reason-fieldset" class="action" style="display:none">
1258
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1258
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1259
                            [% IF hold_cancellation.count %]
1259
                            [% IF hold_cancellation.count && cancel_notice_branches.size %]
1260
                                <label for="cancellation-reason">Cancellation reason: </label>
1260
                                <label for="cancellation-reason">Cancellation reason: </label>
1261
                                <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
1261
                                <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
1262
                                    <option value="">No reason given</option>
1262
                                    <option value="">No reason given</option>
Lines 1307-1313 Link Here
1307
                                                <div class="holds_by_library">
1307
                                                <div class="holds_by_library">
1308
                                                    <h4>[% Branches.GetName( b ) | html %]</h4>
1308
                                                    <h4>[% Branches.GetName( b ) | html %]</h4>
1309
1309
1310
                                                    [% INCLUDE holds_table.inc holds=holds_by_branch %]
1310
                                                    [% INCLUDE holds_table.inc holds=holds_by_branch cancel_notice_branches=cancel_notice_branches %]
1311
                                                </div>
1311
                                                </div>
1312
                                            [% END # /FOREACh b %]
1312
                                            [% END # /FOREACh b %]
1313
                                        [% END # /IF ( branchcodes.empty ) %]
1313
                                        [% END # /IF ( branchcodes.empty ) %]
Lines 1453-1459 Link Here
1453
                        <div id="cancel_hold_alert" class="alert alert-danger" style="display:none;"></div>
1453
                        <div id="cancel_hold_alert" class="alert alert-danger" style="display:none;"></div>
1454
                        <fieldset class="action">
1454
                        <fieldset class="action">
1455
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1455
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1456
                            [% IF hold_cancellation.count %]
1456
                            [% IF hold_cancellation.count && cancel_notice_branches.size %]
1457
                                <label for="cancellation-reason">Cancellation reason: </label>
1457
                                <label for="cancellation-reason">Cancellation reason: </label>
1458
                                <select class="cancellation-reason" name="cancellation-reason" id="modal-cancellation-reason">
1458
                                <select class="cancellation-reason" name="cancellation-reason" id="modal-cancellation-reason">
1459
                                    <option value="">No reason given</option>
1459
                                    <option value="">No reason given</option>
Lines 1537-1548 Link Here
1537
        $.fn.select2.defaults.set("dropdownAutoWidth", true );
1537
        $.fn.select2.defaults.set("dropdownAutoWidth", true );
1538
1538
1539
        $(document).ready(function() {
1539
        $(document).ready(function() {
1540
            $('#cancellation-reason-fieldset').hide();
1540
            $('#cancellation-reason-fieldset, .no-notice-warning').hide();
1541
            $('.rank-request').on('change', function() {
1541
            $('.rank-request').on('change', function() {
1542
                if ( $(".rank-request option:selected[value='del']").length ) {
1542
                if ( $(".rank-request option:selected[value='del']").length ) {
1543
                    $('#cancellation-reason-fieldset').show();
1543
                    $('#cancellation-reason-fieldset').show();
1544
                    $('.no-notice-warning').show();
1544
                } else {
1545
                } else {
1545
                    $('#cancellation-reason-fieldset').hide();
1546
                    $('#cancellation-reason-fieldset').hide();
1547
                    $('.no-notice-warning').hide();
1546
                }
1548
                }
1547
            });
1549
            });
1548
1550
(-)a/reserve/request.pl (-1 / +10 lines)
Lines 726-731 $template->param(borrowernumber => $borrowernumber_hold); Link Here
726
726
727
$template->param( failed_holds => \@failed_holds );
727
$template->param( failed_holds => \@failed_holds );
728
728
729
# Show hold cancelation reason only if notice exists
730
my $cancel_notify_templates = Koha::Notice::Templates->search({ module => 'reserves', code => 'HOLD_CANCELLATION' });
731
my $cancel_notice_branches;
732
while ( my $notice = $cancel_notify_templates->next ) {
733
    $cancel_notice_branches->{$notice->branchcode} = 1;
734
}
735
$template->param(
736
    cancel_notice_branches => $cancel_notice_branches,
737
);
738
729
# printout the page
739
# printout the page
730
output_html_with_http_headers $input, $cookie, $template->output;
740
output_html_with_http_headers $input, $cookie, $template->output;
731
741
732
- 

Return to bug 26282