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>
This commit is contained in:
Kyle M Hall 2016-04-29 17:34:48 +00:00
parent 8e22663fcd
commit e1775fe1d5
1 changed files with 12 additions and 0 deletions

View File

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