Lines 276-285
Link Here
|
276 |
[% IF ( OpacHoldNotes ) %] |
276 |
[% IF ( OpacHoldNotes ) %] |
277 |
<li> |
277 |
<li> |
278 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
278 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
279 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
279 |
<label for="holdnotes_[% bibitemloo.biblionumber %]">Hold notes:</label> |
280 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
280 |
[% IF bibitemloo.reqholdnotes %] |
281 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
281 |
<span id="reqholdnotes_[% bibitemloo.biblionumber %]">Please enter additional information about the requested item:</span> |
282 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
282 |
[% END %] |
|
|
283 |
<textarea id="holdnotes_[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]" >[% bibitemloo.holdnotes %]</textarea> |
283 |
</div> |
284 |
</div> |
284 |
</li> |
285 |
</li> |
285 |
[% END # / IF OpacHoldNotes %] |
286 |
[% END # / IF OpacHoldNotes %] |
Lines 431-440
Link Here
|
431 |
<script type="text/javascript"> |
432 |
<script type="text/javascript"> |
432 |
// <![CDATA[ |
433 |
// <![CDATA[ |
433 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
434 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
434 |
var ForceHoldNotesReasons=new Array( |
|
|
435 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."), |
436 |
"*** Add a new reason above this line ***" ); |
437 |
// NOTE: Do not renumber reasons; this will affect use of existing ones. |
438 |
|
435 |
|
439 |
// Clear the contents of an input field |
436 |
// Clear the contents of an input field |
440 |
$(".clearfield").on("click",function(e){ |
437 |
$(".clearfield").on("click",function(e){ |
Lines 494-510
Link Here
|
494 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
491 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
495 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
492 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
496 |
[% END %] |
493 |
[% END %] |
|
|
494 |
[% IF bibitemloo.reqholdnotes %] |
495 |
$("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); |
496 |
[% END %] |
497 |
[% END %] |
497 |
[% END %] |
498 |
|
498 |
|
499 |
// Insert reasons for forced hold notes |
|
|
500 |
$(".forcenotesreason").each(function(){ |
501 |
biblioNum = suffixOf($(this).attr("id"), "_"); |
502 |
var j=$("#notesmandatory_"+biblioNum).val(); |
503 |
if(j>0) { |
504 |
$(this).html(ForceHoldNotesReasons[j-1]); |
505 |
} |
506 |
}); |
507 |
|
508 |
$(".date-format").each(function(){ |
499 |
$(".date-format").each(function(){ |
509 |
if($(this).hasClass("to")){ var op = "to"; } |
500 |
if($(this).hasClass("to")){ var op = "to"; } |
510 |
if($(this).hasClass("from")){ var op = "from"; } |
501 |
if($(this).hasClass("from")){ var op = "from"; } |
Lines 614-624
Link Here
|
614 |
biblionumbers += biblioNum + "/"; |
605 |
biblionumbers += biblioNum + "/"; |
615 |
selections += biblioNum + "/"; |
606 |
selections += biblioNum + "/"; |
616 |
|
607 |
|
|
|
608 |
// If required hold note is empty, make it visible |
609 |
if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { |
610 |
if( !$("#hold-options-"+biblioNum).is(':visible')) { |
611 |
$("#toggle-hold-options-"+biblioNum).click(); |
612 |
} |
613 |
} |
614 |
|
617 |
// If the 'specific copy' radio button is checked |
615 |
// If the 'specific copy' radio button is checked |
618 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
616 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
619 |
// Find the selected copy |
617 |
// Find the selected copy |
620 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
618 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
621 |
if ($(item).size() == 0) { |
619 |
if ($(item).size() == 0) { |
|
|
620 |
alert(MSG_NO_ITEM_SELECTED); |
622 |
badBib = biblioNum; |
621 |
badBib = biblioNum; |
623 |
return false; |
622 |
return false; |
624 |
} else { |
623 |
} else { |
Lines 636-643
Link Here
|
636 |
return true; |
635 |
return true; |
637 |
}); |
636 |
}); |
638 |
|
637 |
|
639 |
if (badBib) { |
638 |
if (badBib) { // alert has been raised already |
640 |
alert(MSG_NO_ITEM_SELECTED); |
|
|
641 |
return false; |
639 |
return false; |
642 |
} |
640 |
} |
643 |
|
641 |
|