Bugzilla – Attachment 174278 Details for
Bug 37354
Bookings should respect circulation rules for max loan periods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37354: (QA follow-up) Reset periodPicker on rule change
Bug-37354-QA-follow-up-Reset-periodPicker-on-rule-.patch (text/plain), 2.25 KB, created by
Martin Renvoize (ashimema)
on 2024-11-08 15:29:19 UTC
(
hide
)
Description:
Bug 37354: (QA follow-up) Reset periodPicker on rule change
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-11-08 15:29:19 UTC
Size:
2.25 KB
patch
obsolete
>From 6e362c18923ced30b9b8130eff4093ceb0edb79d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 23 Oct 2024 13:08:22 +0100 >Subject: [PATCH] Bug 37354: (QA follow-up) Reset periodPicker on rule change > >This patch clears the periodPicker values when the applied circulation >rules change. This prevents selection of one booking period against one >set of rules and then a change of item to an itemtype where different >rules should apply but the old selected period remaining and thus 'rule >breaking' being allowed. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >index 27d271f5703..8d5e0943744 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >@@ -156,6 +156,10 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > }, > success: function (response) { > let rules = response[0]; >+ let changed = >+ issueLength !== rules.issuelength || >+ renewalsAllowed !== rules.renewalsallowed || >+ renewalLength !== rules.renewalperiod; > issueLength = rules.issuelength; > renewalsAllowed = rules.renewalsallowed; > renewalLength = rules.renewalperiod; >@@ -163,6 +167,9 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > trailDays = rules.bookings_trail_period; > > // redraw pariodPicker taking selected item into account >+ if (changed) { >+ periodPicker.clear(); >+ } > periodPicker.redraw(); > > // Enable flatpickr now we have data we need >@@ -175,6 +182,7 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > }, > }); > } else { >+ periodPicker.clear(); > $("#period_fields :input").prop("disabled", true); > } > } >-- >2.47.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37354
:
168950
|
168964
|
168965
|
168966
|
168967
|
169008
|
169009
|
169590
|
169591
|
169685
|
169686
|
170066
|
170067
|
172890
|
172891
|
173137
|
173210
|
173620
|
173621
|
173622
|
173623
|
174275
|
174276
|
174277
| 174278 |
174279