Lines 237-246
Link Here
|
237 |
[% IF ( OpacHoldNotes ) %] |
237 |
[% IF ( OpacHoldNotes ) %] |
238 |
<li> |
238 |
<li> |
239 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
239 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
240 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
240 |
<label for="holdnotes_[% bibitemloo.biblionumber %]">Hold notes:</label> |
241 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
241 |
[% IF bibitemloo.reqholdnotes %] |
242 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
242 |
<span id="reqholdnotes_[% bibitemloo.biblionumber %]">Please enter additional information about the requested item:</span> |
243 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
243 |
[% END %] |
|
|
244 |
<textarea id="holdnotes_[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]" >[% bibitemloo.holdnotes %]</textarea> |
244 |
</div> |
245 |
</div> |
245 |
</li> |
246 |
</li> |
246 |
[% END # / IF OpacHoldNotes %] |
247 |
[% END # / IF OpacHoldNotes %] |
Lines 392-401
Link Here
|
392 |
<script type="text/javascript"> |
393 |
<script type="text/javascript"> |
393 |
// <![CDATA[ |
394 |
// <![CDATA[ |
394 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
395 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
395 |
var ForceHoldNotesReasons=new Array( |
|
|
396 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."), |
397 |
"*** Add a new reason above this line ***" ); |
398 |
// NOTE: Do not renumber reasons; this will affect use of existing ones. |
399 |
|
396 |
|
400 |
// Clear the contents of an input field |
397 |
// Clear the contents of an input field |
401 |
$(".clearfield").on("click",function(e){ |
398 |
$(".clearfield").on("click",function(e){ |
Lines 455-471
Link Here
|
455 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
452 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
456 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
453 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
457 |
[% END %] |
454 |
[% END %] |
|
|
455 |
[% IF bibitemloo.reqholdnotes %] |
456 |
$("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); |
457 |
[% END %] |
458 |
[% END %] |
458 |
[% END %] |
459 |
|
459 |
|
460 |
// Insert reasons for forced hold notes |
|
|
461 |
$(".forcenotesreason").each(function(){ |
462 |
biblioNum = suffixOf($(this).attr("id"), "_"); |
463 |
var j=$("#notesmandatory_"+biblioNum).val(); |
464 |
if(j>0) { |
465 |
$(this).html(ForceHoldNotesReasons[j-1]); |
466 |
} |
467 |
}); |
468 |
|
469 |
$(".date-format").each(function(){ |
460 |
$(".date-format").each(function(){ |
470 |
if($(this).hasClass("to")){ var op = "to"; } |
461 |
if($(this).hasClass("to")){ var op = "to"; } |
471 |
if($(this).hasClass("from")){ var op = "from"; } |
462 |
if($(this).hasClass("from")){ var op = "from"; } |
Lines 575-585
Link Here
|
575 |
biblionumbers += biblioNum + "/"; |
566 |
biblionumbers += biblioNum + "/"; |
576 |
selections += biblioNum + "/"; |
567 |
selections += biblioNum + "/"; |
577 |
|
568 |
|
|
|
569 |
// If required hold note is empty, make it visible |
570 |
if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { |
571 |
if( !$("#hold-options-"+biblioNum).is(':visible')) { |
572 |
$("#toggle-hold-options-"+biblioNum).click(); |
573 |
} |
574 |
} |
575 |
|
578 |
// If the 'specific copy' radio button is checked |
576 |
// If the 'specific copy' radio button is checked |
579 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
577 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
580 |
// Find the selected copy |
578 |
// Find the selected copy |
581 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
579 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
582 |
if ($(item).size() == 0) { |
580 |
if ($(item).size() == 0) { |
|
|
581 |
alert(MSG_NO_ITEM_SELECTED); |
583 |
badBib = biblioNum; |
582 |
badBib = biblioNum; |
584 |
return false; |
583 |
return false; |
585 |
} else { |
584 |
} else { |
Lines 597-604
Link Here
|
597 |
return true; |
596 |
return true; |
598 |
}); |
597 |
}); |
599 |
|
598 |
|
600 |
if (badBib) { |
599 |
if (badBib) { // alert has been raised already |
601 |
alert(MSG_NO_ITEM_SELECTED); |
|
|
602 |
return false; |
600 |
return false; |
603 |
} |
601 |
} |
604 |
|
602 |
|