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 75-80 Link Here
75
75
76
                    <option value="del">del</option>
76
                    <option value="del">del</option>
77
                </select>
77
                </select>
78
79
                [% IF cancel_notice_branches.size %]
80
                    [% SET bc = hold.patron.branchcode %]
81
                    [% SET all_bc = "" %]
82
                    [% UNLESS cancel_notice_branches.$bc || cancel_notice_branches.$all_bc %]
83
                        <span class="no-notice-warning text-warning">Cancellation will not recieve a notice.</span>
84
                    [% END %]
85
                [% END %]
78
            </td>
86
            </td>
79
87
80
            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
88
            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-4 / +6 lines)
Lines 879-885 Link Here
879
                            <input type="submit" name="submit" value="Update hold(s)" />
879
                            <input type="submit" name="submit" value="Update hold(s)" />
880
                        <fieldset id="cancellation-reason-fieldset" class="action">
880
                        <fieldset id="cancellation-reason-fieldset" class="action">
881
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
881
                            [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
882
                            [% IF hold_cancellation %]
882
                            [% IF hold_cancellation && cancel_notice_branches.size %]
883
                                <label for="cancellation-reason">Cancellation reason: </label>
883
                                <label for="cancellation-reason">Cancellation reason: </label>
884
                                <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
884
                                <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
885
                                    <option value="">No reason given</option>
885
                                    <option value="">No reason given</option>
Lines 921-927 Link Here
921
                                        [% END %]
921
                                        [% END %]
922
                                        <fieldset>
922
                                        <fieldset>
923
                                            <legend>[% Branches.GetName( b ) | html %]</legend>
923
                                            <legend>[% Branches.GetName( b ) | html %]</legend>
924
                                            [% INCLUDE holds_table.inc holds=holds_by_branch %]
924
                                            [% INCLUDE holds_table.inc holds=holds_by_branch cancel_notice_branches=cancel_notice_branches %]
925
                                        </fieldset>
925
                                        </fieldset>
926
                                    [% END # /FOREACh b %]
926
                                    [% END # /FOREACh b %]
927
                                [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
927
                                [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
Lines 1032-1038 Link Here
1032
1032
1033
                    <fieldset class="action">
1033
                    <fieldset class="action">
1034
                        [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1034
                        [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
1035
                        [% IF hold_cancellation %]
1035
                        [% IF hold_cancellation && cancel_notice_branches.size %]
1036
                            <label for="cancellation-reason">Cancellation reason: </label>
1036
                            <label for="cancellation-reason">Cancellation reason: </label>
1037
                            <select class="cancellation-reason" name="modal-cancellation-reason" id="modal-cancellation-reason">
1037
                            <select class="cancellation-reason" name="modal-cancellation-reason" id="modal-cancellation-reason">
1038
                                <option value="">No reason given</option>
1038
                                <option value="">No reason given</option>
Lines 1092-1103 Link Here
1092
        $.fn.select2.defaults.set("dropdownAutoWidth", true );
1092
        $.fn.select2.defaults.set("dropdownAutoWidth", true );
1093
1093
1094
        $(document).ready(function() {
1094
        $(document).ready(function() {
1095
            $('#cancellation-reason-fieldset').hide();
1095
            $('#cancellation-reason-fieldset, .no-notice-warning').hide();
1096
            $('.rank-request').on('change', function() {
1096
            $('.rank-request').on('change', function() {
1097
                if ( $(".rank-request option:selected[value='del']").length ) {
1097
                if ( $(".rank-request option:selected[value='del']").length ) {
1098
                    $('#cancellation-reason-fieldset').show();
1098
                    $('#cancellation-reason-fieldset').show();
1099
                    $('.no-notice-warning').show();
1099
                } else {
1100
                } else {
1100
                    $('#cancellation-reason-fieldset').hide();
1101
                    $('#cancellation-reason-fieldset').hide();
1102
                    $('.no-notice-warning').hide();
1101
                }
1103
                }
1102
            });
1104
            });
1103
1105
(-)a/reserve/request.pl (-1 / +7 lines)
Lines 769-775 if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { Link Here
769
    $template->param( reserve_in_future => 1 );
769
    $template->param( reserve_in_future => 1 );
770
}
770
}
771
771
772
my $cancel_notify_templates = Koha::Notice::Templates->search({ module => 'reserves', code => 'HOLD_CANCELLATION' });
773
my $cancel_notice_branches;
774
while ( my $notice = $cancel_notify_templates->next ) {
775
    $cancel_notice_branches->{$notice->branchcode} = 1;
776
}
777
772
$template->param(
778
$template->param(
779
    cancel_notice_branches => $cancel_notice_branches,
773
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
780
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
774
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
781
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
775
);
782
);
776
- 

Return to bug 26282