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

(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js (-1 / +8 lines)
Lines 156-161 $("#placeBookingModal").on("show.bs.modal", function (e) { Link Here
156
                },
156
                },
157
                success: function (response) {
157
                success: function (response) {
158
                    let rules = response[0];
158
                    let rules = response[0];
159
                    let changed =
160
                        issueLength !== rules.issuelength ||
161
                        renewalsAllowed !== rules.renewalsallowed ||
162
                        renewalLength !== rules.renewalperiod;
159
                    issueLength = rules.issuelength;
163
                    issueLength = rules.issuelength;
160
                    renewalsAllowed = rules.renewalsallowed;
164
                    renewalsAllowed = rules.renewalsallowed;
161
                    renewalLength = rules.renewalperiod;
165
                    renewalLength = rules.renewalperiod;
Lines 163-168 $("#placeBookingModal").on("show.bs.modal", function (e) { Link Here
163
                    trailDays = rules.bookings_trail_period;
167
                    trailDays = rules.bookings_trail_period;
164
168
165
                    // redraw pariodPicker taking selected item into account
169
                    // redraw pariodPicker taking selected item into account
170
                    if (changed) {
171
                        periodPicker.clear();
172
                    }
166
                    periodPicker.redraw();
173
                    periodPicker.redraw();
167
174
168
                    // Enable flatpickr now we have data we need
175
                    // Enable flatpickr now we have data we need
Lines 175-180 $("#placeBookingModal").on("show.bs.modal", function (e) { Link Here
175
                },
182
                },
176
            });
183
            });
177
        } else {
184
        } else {
185
            periodPicker.clear();
178
            $("#period_fields :input").prop("disabled", true);
186
            $("#period_fields :input").prop("disabled", true);
179
        }
187
        }
180
    }
188
    }
181
- 

Return to bug 37354