Lines 265-274
Link Here
|
265 |
[% IF ( OpacHoldNotes ) %] |
265 |
[% IF ( OpacHoldNotes ) %] |
266 |
<li> |
266 |
<li> |
267 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
267 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
268 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
268 |
<label for="holdnotes_[% bibitemloo.biblionumber %]">Hold notes:</label> |
269 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
269 |
[% IF bibitemloo.reqholdnotes %] |
270 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
270 |
<span id="reqholdnotes_[% bibitemloo.biblionumber %]">Please enter additional information about the requested item:</span> |
271 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
271 |
[% END %] |
|
|
272 |
<textarea id="holdnotes_[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]" >[% bibitemloo.holdnotes %]</textarea> |
272 |
</div> |
273 |
</div> |
273 |
</li> |
274 |
</li> |
274 |
[% END # / IF OpacHoldNotes %] |
275 |
[% END # / IF OpacHoldNotes %] |
Lines 418-427
Link Here
|
418 |
<script type="text/javascript"> |
419 |
<script type="text/javascript"> |
419 |
// <![CDATA[ |
420 |
// <![CDATA[ |
420 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
421 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
421 |
var ForceHoldNotesReasons=new Array( |
|
|
422 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."), |
423 |
"*** Add a new reason above this line ***" ); |
424 |
// NOTE: Do not renumber reasons; this will affect use of existing ones. |
425 |
|
422 |
|
426 |
// Clear the contents of an input field |
423 |
// Clear the contents of an input field |
427 |
$(".clearfield").on("click",function(e){ |
424 |
$(".clearfield").on("click",function(e){ |
Lines 481-497
Link Here
|
481 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
478 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
482 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
479 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
483 |
[% END %] |
480 |
[% END %] |
|
|
481 |
[% IF bibitemloo.reqholdnotes %] |
482 |
$("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); |
483 |
[% END %] |
484 |
[% END %] |
484 |
[% END %] |
485 |
|
485 |
|
486 |
// Insert reasons for forced hold notes |
|
|
487 |
$(".forcenotesreason").each(function(){ |
488 |
biblioNum = suffixOf($(this).attr("id"), "_"); |
489 |
var j=$("#notesmandatory_"+biblioNum).val(); |
490 |
if(j>0) { |
491 |
$(this).html(ForceHoldNotesReasons[j-1]); |
492 |
} |
493 |
}); |
494 |
|
495 |
$(".date-format").each(function(){ |
486 |
$(".date-format").each(function(){ |
496 |
if($(this).hasClass("to")){ var op = "to"; } |
487 |
if($(this).hasClass("to")){ var op = "to"; } |
497 |
if($(this).hasClass("from")){ var op = "from"; } |
488 |
if($(this).hasClass("from")){ var op = "from"; } |
Lines 601-611
Link Here
|
601 |
biblionumbers += biblioNum + "/"; |
592 |
biblionumbers += biblioNum + "/"; |
602 |
selections += biblioNum + "/"; |
593 |
selections += biblioNum + "/"; |
603 |
|
594 |
|
|
|
595 |
// If required hold note is empty, make it visible |
596 |
if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { |
597 |
if( !$("#hold-options-"+biblioNum).is(':visible')) { |
598 |
$("#toggle-hold-options-"+biblioNum).click(); |
599 |
} |
600 |
} |
601 |
|
604 |
// If the 'specific copy' radio button is checked |
602 |
// If the 'specific copy' radio button is checked |
605 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
603 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
606 |
// Find the selected copy |
604 |
// Find the selected copy |
607 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
605 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
608 |
if ($(item).size() == 0) { |
606 |
if ($(item).size() == 0) { |
|
|
607 |
alert(MSG_NO_ITEM_SELECTED); |
609 |
badBib = biblioNum; |
608 |
badBib = biblioNum; |
610 |
return false; |
609 |
return false; |
611 |
} else { |
610 |
} else { |
Lines 623-630
Link Here
|
623 |
return true; |
622 |
return true; |
624 |
}); |
623 |
}); |
625 |
|
624 |
|
626 |
if (badBib) { |
625 |
if (badBib) { // alert has been raised already |
627 |
alert(MSG_NO_ITEM_SELECTED); |
|
|
628 |
return false; |
626 |
return false; |
629 |
} |
627 |
} |
630 |
|
628 |
|