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 82-87 Link Here
82
                    [% END %]
82
                    [% END %]
83
                    </select>
83
                    </select>
84
                [% END %]
84
                [% END %]
85
86
                [% IF cancel_notice_branches.size %]
87
                    [% SET bc = hold.patron.branchcode %]
88
                    [% SET all_bc = "" %]
89
                    [% UNLESS cancel_notice_branches.$bc || cancel_notice_branches.$all_bc %]
90
                        <span class="no-notice-warning text-warning">Cancellation will not recieve a notice.</span>
91
                    [% END %]
92
                [% END %]
85
            </td>
93
            </td>
86
            [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
94
            [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
87
            [%- UNLESS hold.found -%]
95
            [%- UNLESS hold.found -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-4 / +6 lines)
Lines 1015-1021 Link Here
1015
                            <input type="submit" name="submit" value="Update hold(s)" /> <button class="cancel_selected_holds" data-bulk="true"></button>
1015
                            <input type="submit" name="submit" value="Update hold(s)" /> <button class="cancel_selected_holds" data-bulk="true"></button>
1016
                        <fieldset id="cancellation-reason-fieldset" class="action">
1016
                        <fieldset id="cancellation-reason-fieldset" class="action">
1017
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1017
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1018
                            [% IF hold_cancellation.count %]
1018
                            [% IF hold_cancellation.count && cancel_notice_branches.size %]
1019
                                <label for="cancellation-reason">Cancellation reason: </label>
1019
                                <label for="cancellation-reason">Cancellation reason: </label>
1020
                                <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
1020
                                <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
1021
                                    <option value="">No reason given</option>
1021
                                    <option value="">No reason given</option>
Lines 1065-1071 Link Here
1065
                                                <div class="holds_by_library">
1065
                                                <div class="holds_by_library">
1066
                                                    <h4>[% Branches.GetName( b ) | html %]</h4>
1066
                                                    <h4>[% Branches.GetName( b ) | html %]</h4>
1067
1067
1068
                                                    [% INCLUDE holds_table.inc holds=holds_by_branch %]
1068
                                                    [% INCLUDE holds_table.inc holds=holds_by_branch cancel_notice_branches=cancel_notice_branches %]
1069
                                                </div>
1069
                                                </div>
1070
                                            [% END # /FOREACh b %]
1070
                                            [% END # /FOREACh b %]
1071
                                        [% END # /IF ( branchcodes.empty ) %]
1071
                                        [% END # /IF ( branchcodes.empty ) %]
Lines 1204-1210 Link Here
1204
1204
1205
                    <fieldset class="action">
1205
                    <fieldset class="action">
1206
                        [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1206
                        [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1207
                        [% IF hold_cancellation.count %]
1207
                        [% IF hold_cancellation.count && cancel_notice_branches.size %]
1208
                            <label for="cancellation-reason">Cancellation reason: </label>
1208
                            <label for="cancellation-reason">Cancellation reason: </label>
1209
                            <select class="cancellation-reason" name="modal-cancellation-reason" id="modal-cancellation-reason">
1209
                            <select class="cancellation-reason" name="modal-cancellation-reason" id="modal-cancellation-reason">
1210
                                <option value="">No reason given</option>
1210
                                <option value="">No reason given</option>
Lines 1271-1282 Link Here
1271
        $.fn.select2.defaults.set("dropdownAutoWidth", true );
1271
        $.fn.select2.defaults.set("dropdownAutoWidth", true );
1272
1272
1273
        $(document).ready(function() {
1273
        $(document).ready(function() {
1274
            $('#cancellation-reason-fieldset').hide();
1274
            $('#cancellation-reason-fieldset, .no-notice-warning').hide();
1275
            $('.rank-request').on('change', function() {
1275
            $('.rank-request').on('change', function() {
1276
                if ( $(".rank-request option:selected[value='del']").length ) {
1276
                if ( $(".rank-request option:selected[value='del']").length ) {
1277
                    $('#cancellation-reason-fieldset').show();
1277
                    $('#cancellation-reason-fieldset').show();
1278
                    $('.no-notice-warning').show();
1278
                } else {
1279
                } else {
1279
                    $('#cancellation-reason-fieldset').hide();
1280
                    $('#cancellation-reason-fieldset').hide();
1281
                    $('.no-notice-warning').hide();
1280
                }
1282
                }
1281
            });
1283
            });
1282
1284
(-)a/reserve/request.pl (-1 / +7 lines)
Lines 722-728 if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { Link Here
722
    $template->param( reserve_in_future => 1 );
722
    $template->param( reserve_in_future => 1 );
723
}
723
}
724
724
725
my $cancel_notify_templates = Koha::Notice::Templates->search({ module => 'reserves', code => 'HOLD_CANCELLATION' });
726
my $cancel_notice_branches;
727
while ( my $notice = $cancel_notify_templates->next ) {
728
    $cancel_notice_branches->{$notice->branchcode} = 1;
729
}
730
725
$template->param(
731
$template->param(
732
    cancel_notice_branches => $cancel_notice_branches,
726
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
733
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
727
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
734
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
728
    borrowernumber => $borrowernumber_hold,
735
    borrowernumber => $borrowernumber_hold,
729
- 

Return to bug 26282