|
Lines 293-298
Link Here
|
| 293 |
<label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label> |
293 |
<label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label> |
| 294 |
<input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" data-start_for="to[% bibitemloo.biblionumber | html %]" size="10" class="flatpickr holddatefrom" /> |
294 |
<input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" data-start_for="to[% bibitemloo.biblionumber | html %]" size="10" class="flatpickr holddatefrom" /> |
| 295 |
<span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> |
295 |
<span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> |
|
|
296 |
<div class="required_label" style="display:none;">Required</div> |
| 296 |
</li> |
297 |
</li> |
| 297 |
[% END %] |
298 |
[% END %] |
| 298 |
|
299 |
|
|
Lines 300-305
Link Here
|
| 300 |
<label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label> |
301 |
<label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label> |
| 301 |
<input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="flatpickr futuredate" /> |
302 |
<input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="flatpickr futuredate" /> |
| 302 |
<span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> |
303 |
<span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> |
|
|
304 |
<div class="required_label" style="display:none;">Required</div> |
| 303 |
</li> |
305 |
</li> |
| 304 |
|
306 |
|
| 305 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
307 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
|
Lines 519-534
Link Here
|
| 519 |
$(".toggle-hold-options").show(); |
521 |
$(".toggle-hold-options").show(); |
| 520 |
$(".hold-options").hide(); |
522 |
$(".hold-options").hide(); |
| 521 |
var OPACMandatoryHoldDates = "[% Koha.Preference('OPACMandatoryHoldDates') | html %]"; |
523 |
var OPACMandatoryHoldDates = "[% Koha.Preference('OPACMandatoryHoldDates') | html %]"; |
| 522 |
var requiredDiv = "<div class=\"required_label required\">" + _("Required") + "</div>"; |
524 |
if( OPACMandatoryHoldDates == "start" || OPACMandatoryHoldDates == "both" ) { |
| 523 |
if( OPACMandatoryHoldDates ) { |
525 |
$(".holddatefrom").prop( 'required', true ).siblings(".required_label").addClass('required').show(); |
| 524 |
if( OPACMandatoryHoldDates == "start" || OPACMandatoryHoldDates == "both" ) { |
526 |
} |
| 525 |
$(".holddatefrom").prop( 'required', true ); |
527 |
if( OPACMandatoryHoldDates == "end" || OPACMandatoryHoldDates == "both" ) { |
| 526 |
$(".holddatefrom").parent().append(requiredDiv); |
528 |
$(".futuredate").prop( 'required', true ).siblings(".required_label").addClass('required').show(); |
| 527 |
} |
|
|
| 528 |
if( OPACMandatoryHoldDates == "end" || OPACMandatoryHoldDates == "both" ) { |
| 529 |
$(".futuredate").prop( 'required', true ); |
| 530 |
$(".futuredate").parent().append(requiredDiv); |
| 531 |
} |
| 532 |
} |
529 |
} |
| 533 |
|
530 |
|
| 534 |
$(".checkitem").parent().click(function(e){ |
531 |
$(".checkitem").parent().click(function(e){ |
|
Lines 564-570
Link Here
|
| 564 |
|
561 |
|
| 565 |
[% FOREACH bibitemloo IN bibitemloop %] |
562 |
[% FOREACH bibitemloo IN bibitemloop %] |
| 566 |
[% IF bibitemloo.force_hold %] |
563 |
[% IF bibitemloo.force_hold %] |
| 567 |
if( $("#to[% bibitemloo.biblionumber | html %]:hidden").length ) |
564 |
if( $("#to[% bibitemloo.biblionumber | html %]").parent(":hidden").length ) |
| 568 |
$("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click(); |
565 |
$("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click(); |
| 569 |
$("#reqspecific_[% bibitemloo.biblionumber | html %]").click(); |
566 |
$("#reqspecific_[% bibitemloo.biblionumber | html %]").click(); |
| 570 |
$("#copiesrow_[% bibitemloo.biblionumber | html %]").show(); |
567 |
$("#copiesrow_[% bibitemloo.biblionumber | html %]").show(); |
|
Lines 676-689
Link Here
|
| 676 |
if( $(".holddatefrom").prop('required') && $("#from"+ biblioNum).val() == '' ) { |
673 |
if( $(".holddatefrom").prop('required') && $("#from"+ biblioNum).val() == '' ) { |
| 677 |
alert(MSG_EMPTY_START_DATE); |
674 |
alert(MSG_EMPTY_START_DATE); |
| 678 |
badBib = biblioNum; |
675 |
badBib = biblioNum; |
| 679 |
if( $("#from"+biblioNum+":hidden").length ) $("#toggle-hold-options-"+biblioNum).click(); |
676 |
if( $("#from"+biblioNum).parent(":hidden").length ) $("#toggle-hold-options-"+biblioNum).trigger('click'); |
| 680 |
$("#from"+ biblioNum).focus(); |
677 |
$("#from"+biblioNum).siblings('.flatpickr_wrapper').find('.flatpickr-input').trigger('focus'); |
| 681 |
return false; |
678 |
return false; |
| 682 |
} else if( $(".futuredate").prop('required') && $("#to"+ biblioNum).val() == '' ) { |
679 |
} else if( $(".futuredate").prop('required') && $("#to"+ biblioNum).val() == '' ) { |
| 683 |
alert(MSG_EMPTY_END_DATE); |
680 |
alert(MSG_EMPTY_END_DATE); |
| 684 |
badBib = biblioNum; |
681 |
badBib = biblioNum; |
| 685 |
if( $("#to"+biblioNum+":hidden").length ) $("#toggle-hold-options-"+biblioNum).click(); |
682 |
if( $("#to"+biblioNum).parent(":hidden").length ) $("#toggle-hold-options-"+biblioNum).trigger('click'); |
| 686 |
$("#to"+ biblioNum).focus(); |
683 |
$("#to"+biblioNum).siblings('.flatpickr_wrapper').find('.flatpickr-input').trigger('focus'); |
| 687 |
return false; |
684 |
return false; |
| 688 |
} |
685 |
} |
| 689 |
|
686 |
|
| 690 |
- |
|
|