From e1775fe1d5ffae3411d64c4d69fca75ad5641293 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 29 Apr 2016 17:34:48 +0000 Subject: [PATCH] Bug 14695 [QA Followup] - Disable "Holds to place (count)" unless "Hold next available item" is checked Signed-off-by: Jason M. Burds Signed-off-by: Benjamin Rokseth --- .../intranet-tmpl/prog/en/modules/reserve/request.tt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 64fa1e84bc..85c79a8fea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -27,6 +27,18 @@ var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items."); $(document).ready(function() { + function ToggleHoldsToPlace() { + if ( $("#requestany").prop('checked') ) { + $("#holds_to_place_count").prop('disabled', false); + } else { + $("#holds_to_place_count").prop('disabled', true); + } + } + ToggleHoldsToPlace(); + $("#requestany").on('change', function(){ + ToggleHoldsToPlace(); + }); + [% IF AutoResumeSuspendedHolds %] $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1); [% END %] -- 2.39.5