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