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