Lines 501-510
Link Here
|
501 |
[% INCLUDE 'calendar.inc' %] |
501 |
[% INCLUDE 'calendar.inc' %] |
502 |
[% INCLUDE 'datatables.inc' %] |
502 |
[% INCLUDE 'datatables.inc' %] |
503 |
<script> |
503 |
<script> |
504 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
|
|
505 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
506 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
507 |
|
508 |
$(document).ready(function() { |
504 |
$(document).ready(function() { |
509 |
|
505 |
|
510 |
$(".toggle_unholdable").click(function(e){ |
506 |
$(".toggle_unholdable").click(function(e){ |
Lines 670-682
Link Here
|
670 |
} |
666 |
} |
671 |
|
667 |
|
672 |
if( $(".holddatefrom").prop('required') && $("#from"+ biblioNum).val() == '' ) { |
668 |
if( $(".holddatefrom").prop('required') && $("#from"+ biblioNum).val() == '' ) { |
673 |
alert(MSG_EMPTY_START_DATE); |
669 |
alert( _("Hold start date should be filled.") ); |
674 |
badBib = biblioNum; |
670 |
badBib = biblioNum; |
675 |
if( $("#from"+biblioNum).parent(":hidden").length ) $("#toggle-hold-options-"+biblioNum).trigger('click'); |
671 |
if( $("#from"+biblioNum).parent(":hidden").length ) $("#toggle-hold-options-"+biblioNum).trigger('click'); |
676 |
$("#from"+biblioNum).siblings('.flatpickr_wrapper').find('.flatpickr-input').trigger('focus'); |
672 |
$("#from"+biblioNum).siblings('.flatpickr_wrapper').find('.flatpickr-input').trigger('focus'); |
677 |
return false; |
673 |
return false; |
678 |
} else if( $(".futuredate").prop('required') && $("#to"+ biblioNum).val() == '' ) { |
674 |
} else if( $(".futuredate").prop('required') && $("#to"+ biblioNum).val() == '' ) { |
679 |
alert(MSG_EMPTY_END_DATE); |
675 |
alert( _("Hold expiration date should be filled.") ); |
680 |
badBib = biblioNum; |
676 |
badBib = biblioNum; |
681 |
if( $("#to"+biblioNum).parent(":hidden").length ) $("#toggle-hold-options-"+biblioNum).trigger('click'); |
677 |
if( $("#to"+biblioNum).parent(":hidden").length ) $("#toggle-hold-options-"+biblioNum).trigger('click'); |
682 |
$("#to"+biblioNum).siblings('.flatpickr_wrapper').find('.flatpickr-input').trigger('focus'); |
678 |
$("#to"+biblioNum).siblings('.flatpickr_wrapper').find('.flatpickr-input').trigger('focus'); |
Lines 688-694
Link Here
|
688 |
// Find the selected copy |
684 |
// Find the selected copy |
689 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
685 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
690 |
if ($(item).size() == 0) { |
686 |
if ($(item).size() == 0) { |
691 |
alert(MSG_NO_ITEM_SELECTED); |
687 |
alert( _("Expecting a specific item selection.") ); |
692 |
badBib = biblioNum; |
688 |
badBib = biblioNum; |
693 |
return false; |
689 |
return false; |
694 |
} else { |
690 |
} else { |