Browse Source

Bug 14695 [QA Followup] - Disable "Holds to place (count)" unless "Hold next available item" is checked

Signed-off-by: Jason M. Burds <JBurds@dubuque.lib.ia.us>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
16.11.x
Kyle Hall 6 years ago
parent
commit
e1775fe1d5
  1. 12
      koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

12
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 %]

Loading…
Cancel
Save