6 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Placing a hold › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
13 [% INCLUDE 'bodytag.inc' bodyid='opac-holds' %]
14 [% INCLUDE 'masthead.inc' %]
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
18 <ol class="breadcrumb">
19 <li class="breadcrumb-item">
20 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
22 <li class="breadcrumb-item active">
23 <a href="#" aria-current="page">Placing a hold</a>
26 </nav> <!-- /#breadcrumbs -->
28 <div class="container">
29 <div id="holds" class="maincontent">
30 <h1>Placing a hold</h1>
32 <div id="holdmessages" class="alert">
33 <p>Sorry, you cannot place holds.</p>
37 According to our records, we don't have up-to-date contact information. Please contact the library.
38 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
39 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
45 Your library card has been marked as lost or stolen.<br />
46 <em>If this is an error, please take your library card to the circulation desk at your local library and the error will be corrected.</em>
52 Your account has been frozen.
53 [% IF debarred_comment %]
55 <span id="userdebarred_comment">
57 [% IF debarred_comment.search('OVERDUES_PROCESS') %]
58 Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %]
60 [% debarred_comment | html_line_break %]
66 [% IF debarred_date && debarred_date != '9999-12-31' %]
68 <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>
70 <br /><em>Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a>
74 [% IF ( too_much_oweing ) %]
75 <li id="too_much_oweing">
76 You have unpaid fines. Amount: [% too_much_oweing | $Price %].
80 [% IF ( too_many_reserves ) %]
81 <li id="too_many_reserves">
82 Sorry, you cannot place more than [% too_many_reserves | html %] holds.
86 [% IF ( bad_biblionumber ) %]
87 <li id="bad_biblionumber">
88 ERROR: No record found for record id [% bad_biblionumber | html %].
92 [% IF ( no_items_selected ) %]
93 <li id="no_items_selected">
94 You must select at least one item.
98 [% IF ( no_branch_selected ) %]
99 <li id="no_branch_selected">
100 You must select a library for pickup.
104 [% IF ( no_biblionumber ) %]
105 <li id="no_biblionumber">
106 ERROR: No record id specified.
110 [% IF ( bad_data ) %]
112 ERROR: Internal error: incomplete hold request.
116 [% IF ( expired_patron ) %]
117 <li id="expired_patron">
118 Your library card has expired. Please contact your librarian if you wish to renew your card.
122 [% IF ( no_pickup_locations ) %]
123 <li id="no_pickup_locations">
124 None of the libraries are available for pickup location.
128 </div> <!-- /.message -->
129 [% ELSE # /IF message %]
131 [% IF ( none_available && multi_hold ) %]
132 <div id="none_available" class="alert">
133 Sorry, none of these titles can be placed on hold.
137 [% END # / IF message %]
139 [% UNLESS ( message ) %]
140 [% UNLESS ( none_available ) %]
141 <h2>Confirm holds for:[% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h2>
142 [% END # / UNLESS none_available %]
144 [% IF (RESERVE_CHARGE) %]
145 <div class="alert" id="reserve_fee">
146 [% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %]
147 You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] when you collect this item
149 You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] for placing this hold
154 [% IF ( new_reserves_allowed ) %]
155 <div id="new_reserves_allowed" class="alert">
156 <strong>Sorry,</strong> you can only place [% new_reserves_allowed | html %] more holds. Please uncheck the checkboxes for the items you wish to not place holds on.
160 <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
161 <legend class="sr-only">Hold requests</legend>
162 <input type="hidden" name="place_reserve" value="1"/>
163 <!-- These values are set dynamically by js -->
164 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
165 <input type="hidden" name="selecteditems" id="selections"/>
168 [% FOREACH bibitemloo IN bibitemloop %]
169 <div class="holdrow">
170 [% IF bibitemloo.forced_hold_level %]
171 <div class="alert alert-info forced_hold_level">
172 [% IF bibitemloo.forced_hold_level == 'item' %]
173 You already have at least one item level hold on this title.
174 All further holds must be item level.
176 You already have at least one record level hold on this title.
177 All further holds must be record level.
182 [% IF ( bibitemloo.holdable ) %]
183 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
184 <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]"/>
185 <span class="confirmjs_hold" title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"></span>
186 <span class="confirm_nonjs">
187 <input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" name="[% bibitemloo.biblionumber | html %]" checked="checked" id="single_[% bibitemloo.biblionumber | html %]" value="any" />
188 <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label>
190 [% END # / bibitemloo.holdable %]
192 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber | html %]">
193 [% INCLUDE 'biblio-title.inc' biblio=bibitemloo %]
195 [% IF ( bibitemloo.author ) %], by [% bibitemloo.author | html %][% END %]
198 [% UNLESS ( bibitemloo.holdable ) %]
199 [% IF ( bibitemloo.ageRestricted ) %]
200 <div class="alert alert-warning">Sorry, you are too young to reserve this material.</div>
202 [% IF ( bibitemloo.already_reserved ) %]
203 <div class="alert alert-warning">You have already requested this title.</div>
205 [% IF ( bibitemloo.already_patron_possession ) %]
206 <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div>
208 [% UNLESS ( bibitemloo.bib_available ) %]
209 <div class="alert">There are no items that can be placed on hold.</div>
211 <div class="alert">This title cannot be requested.</div>
213 [% END # / UNLESS bibitemloo.already_patron_possession %]
214 [% END # / IF bibitemloo.already_reserved %]
215 [% END # / UNLESS bibitemloo.holdable %]
217 [% IF ( bibitemloo.holdable ) %]
218 <fieldset class="rows">
221 [% UNLESS ( item_level_itypes ) %]
223 <span class="label">Item type: </span>
224 [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
225 [% bibitemloo.translated_description | html %]
229 [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
230 [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
231 <li class="priority">
232 <span class="label">Your priority: </span>
233 [% bibitemloo.rank | html %]
237 [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
238 <li class="holds-count">
239 <span class="label">Number of holds: </span>
240 [% bibitemloo.reservecount | html %]
244 [% UNLESS ( singleBranchMode ) %]
245 [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %]
247 <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label>
248 [% UNLESS ( bibitemloo.holdable ) %]
249 <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled">
250 [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
253 [% SET at_least_one_library_not_available_for_pickup = 0 %]
254 <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]">
255 [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
256 [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %]
257 [% IF library.selected AND pickup_available_at %]
258 <option value="[% library.branchcode | html %]" selected="selected" >[% library.branchname | html %]</option>
259 [% ELSIF pickup_available_at %]
260 <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option>
262 [% SET at_least_one_library_not_available_for_pickup = 1 %]
263 <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library">[% library.branchname | html %]</option>
267 [% IF at_least_one_library_not_available_for_pickup %]
268 <div class="at_least_one_library_not_available_note">Note: Library policy does not allow hold/pickup of an item available locally. Please come to the library to retrieve these items</div>
270 [% END # / UNLESS bibitemloo.holdable %]
272 [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %]
273 [% END # / UNLESS singleBranchMode %]
276 <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a>
278 <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options">
281 [% IF ( reserve_in_future ) %]
283 <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label>
284 <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" size="10" class="holddatefrom"/>
285 <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
290 <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label>
291 <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="holddateto" />
292 <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
295 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
297 [% FOREACH item IN bibitemloo.itemLoop %]
298 [% itemtypes.push( item.itype ) %]
301 <label for="itemtype">Request specific item type:</label>
302 <select name="itemtype" id="itemtype">
303 <option value="">Any item type</option>
304 [% FOREACH i IN itemtypes.unique.sort %]
305 <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option>
311 [% IF ( OpacHoldNotes ) %]
313 <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]">
314 <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label>
315 [% IF bibitemloo.reqholdnotes %]
316 <span id="reqholdnotes_[% bibitemloo.biblionumber | html %]">Please enter additional information about the requested item:</span>
318 <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]" >[% bibitemloo.holdnotes | html %]</textarea>
321 [% END # / IF OpacHoldNotes %]
323 [% IF bibitemloo.itemholdable %]
325 <li class="lradio place_on_type" style="display:none;">
326 [% IF NOT bibitemloo.force_hold %]
327 <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label>
328 <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
329 id="reqany_[% bibitemloo.biblionumber | html %]"
335 <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label>
336 <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
337 id="reqspecific_[% bibitemloo.biblionumber | html %]"
338 class="selectspecific"
342 [% END # / IF bibitemloo.itemholdable %]
345 [% IF bibitemloo.itemholdable %]
346 <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html %]">
347 <caption>Select a specific item:</caption>
350 [% IF ( item_level_itypes ) %]
354 [% UNLESS ( singleBranchMode ) %]
355 <th>Home library</th>
356 <th>Last location</th>
358 [% IF ( itemdata_ccode ) %]
362 [% IF ( itemdata_enumchron ) %]
368 [% FOREACH itemLoo IN bibitemloo.itemLoop %]
369 <tr class="[% itemLoo.backgroundcolor | html %]">
370 <td class="copynumber">
371 [% IF ( itemLoo.available ) %]
372 <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" />
374 <input disabled="disabled" type="radio" aria-label="Cannot be put on hold" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]"
375 style="display:none;" />
376 <i class="fa fa-remove danger" aria-hidden="true" title="Cannot be put on hold"></i>
379 [% IF ( itemLoo.copynumber ) %]
380 [% itemLoo.copynumber | html %]
384 [% IF ( item_level_itypes ) %]
386 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
387 [% IF ( itemLoo.imageurl ) %]
388 <img src="[% itemLoo.imageurl | html %]" alt="" />
391 [% itemLoo.translated_description | html %]
395 <td class="barcode">[% itemLoo.barcode | html %]</td>
396 [% UNLESS ( singleBranchMode ) %]
397 <td class="homebranch">[% Branches.GetName( itemLoo.homeBranchName ) | html %]</td>
398 <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingBranchName ) | html %]</td>
400 [% IF ( itemdata_ccode ) %]
401 <td class="ccode"> [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td>
403 <td class="call_no">[% itemLoo.callNumber | html %]</td>
404 [% IF ( itemdata_enumchron ) %]
405 <td class="vol_info">[% itemLoo.enumchron | html %]</td>
407 <td class="information">
408 [% IF ( itemLoo.dateDue ) %]
409 <span class="checkedout">Due [% itemLoo.dateDue | html %]</span>
410 [% ELSIF ( itemLoo.transfertwhen ) %]
411 <span class="intransit">In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | html %]</span>
414 [% IF ( itemLoo.message ) %]
415 <span class="lost">Unavailable (lost or missing)</span>
418 [% IF ( itemLoo.notforloan ) %]
419 <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue | html %])</span>
422 [% IF ( itemLoo.reservedate ) %]
423 <span class="waiting">
424 [% IF ( itemLoo.waitingdate ) %]
430 [% IF ( itemLoo.waitingdate ) %]
435 [% itemLoo.ExpectedAtLibrary | html %] since
436 [% IF ( itemLoo.waitingdate ) %]
437 [% itemLoo.waitingdate | $KohaDates %]
439 [% IF ( itemLoo.reservedate ) %]
440 [% itemLoo.reservedate | html %]
445 <span class="notonhold">Not on hold</span>
446 [% END # / IF ( itemLoo.reservedate )%]
449 [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%]
450 </table> <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] -->
451 [% END # / IF ( bibitemloo.itemholdable )%]
452 </div> <!-- / #hold-options-[% bibitemloo.biblionumber | html %] -->
454 [% END # / IF ( bibitemloo.holdable ) %]
455 </div> <!-- / .holdrow -->
456 [% END # / FOREACH bibitemloo IN bibitemloop %]
457 </div><!-- #bigloop -->
459 [% UNLESS ( none_available ) %]
460 <input type="submit" value="Confirm hold" class="btn btn-primary placehold" />
464 [% END # / UNLESS message %]
465 </div> <!-- / #holds -->
466 </div> <!-- / .container -->
467 </div> <!-- / .main -->
468 [% INCLUDE 'opac-bottom.inc' %]
469 [% BLOCK jsinclude %]
470 [% INCLUDE 'calendar.inc' %]
473 var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection.");
475 // Clear the contents of an input field
476 $(".clearfield").on("click",function(e){
477 $(this).closest("td").find("input").val("");
481 // Select the first item available
482 function select_first_available(id){
483 var radios = $("input:radio[name='checkitem_" + id + "']");
484 $(radios).first().attr("checked", "checked");
487 $(document).ready(function() {
488 $("#hold-request-form").preventDoubleFormSubmit();
489 var copiesRowId = null;
490 var wasSpecific = false;
491 var lastCopiesRowId = null;
493 $(".toggle-hold-options").show();
494 $(".hold-options").hide();
495 $(".holddatefrom,.holddateto").prop("readOnly", true);
497 $(".checkitem").parent().click(function(e){
498 if(e.target.tagName.toLowerCase() == 'td'){
499 $(this).find("input.checkitem").each( function() {
500 $(this).attr('checked', 'checked');
505 // click on a first td check the confirmjs checkbox
506 $("td.hold").click(function(e){
507 if(e.target.tagName.toLowerCase() == 'td'){
508 $(this).find("input.confirmjs").each( function() {
509 $(this).attr('checked', !$(this).attr('checked'));
515 $(".toggle-hold-options").on("click",function(e){
517 toggleLink = $(this);
518 var optionsID = this.id.replace("toggle-hold-options-","");
519 $("#hold-options-"+optionsID).toggle(0, function() {
520 toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options"));
524 // Hides all 'specific copy' table rows on load.
525 $(".copiesrow").hide();
527 [% FOREACH bibitemloo IN bibitemloop %]
528 [% IF bibitemloo.force_hold %]
529 $("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click();
530 $("#reqspecific_[% bibitemloo.biblionumber | html %]").click();
531 $("#copiesrow_[% bibitemloo.biblionumber | html %]").show();
533 [% IF bibitemloo.reqholdnotes %]
534 $("#holdnotes_[% bibitemloo.biblionumber | html %]").attr( 'required', true );
538 $(".date-format").each(function(){
539 if($(this).hasClass("to")){ var op = "to"; }
540 if($(this).hasClass("from")){ var op = "from"; }
541 var bibNum = $(this).data("biblionumber");
542 $(this).html("<a href=\"#\" class=\"clear-date\" data-op=\"" + op + "\" id=\"clear" + bibNum + "\">" + _("Clear date") + "</a>");
545 $(".clear-date").on("click",function(e){
547 var fieldID = this.id.replace("clear","");
548 var op = $(this).data("op");
549 $("#" + op + fieldID).val("");
552 // Replace non-JS single-selection with multi-selection capability.
553 $(".reserve_mode").val("multi");
554 $(".confirm_nonjs").remove();
555 $(".confirmjs_hold").each(function(){
556 var bib = $(this).attr("title");
557 var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
558 html += "value=\"" + bib + "\" id=\"" + bib + "\" /> " + _("Place a hold on") + " </label> ";
561 $(".confirmjs_nohold").each(function(){
562 var bib = $(this).attr("title");
563 var html = "<label><input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
564 html += "value=\"" + bib + "\" id=\"" + bib + "\" />" + _("Place a hold on: ") + "</label>";
568 // expand or collapse the copiesrow tr
569 function toggle_copiesrow(biblioNum) {
570 var checkbox = $("input:checkbox[value='"+biblioNum+"']");
571 newCopiesRowId = "#copiesrow_" + biblioNum;
572 var select_specific = $("#reqspecific_"+biblioNum).is(":checked");
573 // If the checkbox is checked AND we want a specific item, we display the items block
574 if ( $(checkbox).is(":checked") && select_specific ) {
575 $(newCopiesRowId).show();
577 $(newCopiesRowId).hide();
581 $("#place_on_hdr").show();
583 $(".place_on_type").show();
584 // onload, selectany is checked
585 $(".selectany").attr("checked", "checked");
587 // If the user is *allowed* to choose a specific item
588 // The first one is preselected
589 $("table.copiesrow").each(function(){
590 var id = suffixOf($(this).attr("id"), "_");
591 select_first_available(id);
594 // On confirmsjs change
595 $(".confirmjs").change(function(){
596 var id = suffixOf($(this).attr("id"), "_");
597 // If I m checked, I enable radio buttons
598 if ( $(this).is(":checked") ) {
599 $("#reqspecific_" + id).attr("disabled", false);
600 $("#reqany_" + id).attr("disabled", false);
602 // Else its are disabled
604 $("#reqspecific_" + id).attr("disabled", "disabled");
605 $("#reqany_" + id).attr("disabled", "disabled");
607 // expand or collaspe the items block
608 toggle_copiesrow(id);
611 // When 'specific copy' or 'first available' radio button is clicked
612 $(".selectspecific, .selectany").click(function() {
613 var id = suffixOf($(this).attr("id"), "_");
614 toggle_copiesrow(id);
617 // Show or hide holds notes
618 $(".shownotes").click(function(){
619 biblioNum = suffixOf($(this).attr("id"), "_");
620 $("#notesrow_"+biblioNum).toggle();
623 // When 'Place Hold' button is clicked
624 $(".placehold").click(function(){
625 var biblionumbers = "";
628 [% IF new_reserves_allowed %]
629 if ($(".confirmjs:checked").size() > [% new_reserves_allowed | html %] ) {
630 alert(MSG_MAX_HOLDS_EXCEEDED);
635 if ($(".confirmjs:checked").size() == 0) {
636 alert( __("No item was selected") );
640 // Find the items with the 'Hold' box checked
642 $(".confirmjs:checked").each(function() {
643 var biblioNum = $(this).val();
644 biblionumbers += biblioNum + "/";
645 selections += biblioNum + "/";
647 // If required hold note is empty, make it visible
648 if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) {
649 if( !$("#hold-options-"+biblioNum).is(':visible')) {
650 $("#toggle-hold-options-"+biblioNum).click();
654 // If the 'specific copy' radio button is checked
655 if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
656 // Find the selected copy
657 var item = $(".checkitem_" + biblioNum + ":checked");
658 if ($(item).size() == 0) {
659 alert(MSG_NO_ITEM_SELECTED);
663 selections += $(item).val();
668 // Add the pickup location
669 var branchSel = $("#branch_" + biblioNum);
670 if (branchSel.size() > 0) {
671 selections += $(branchSel).val();
677 if (badBib) { // alert has been raised already
681 $("#selections").val(selections);
682 $("#biblionumbers").val(biblionumbers);
687 [% FOREACH bibitemloo IN bibitemloop %]
688 [% IF ( bibitemloo.holdable ) %]
689 // http://jqueryui.com/demos/datepicker/#date-range
690 var dates[% bibitemloo.biblionumber | html %] = $( "#from[% bibitemloo.biblionumber | html %], #to[% bibitemloo.biblionumber | html %]" ).datepicker({
694 onSelect: function( selectedDate ) {
695 var option = this.id == "from[% bibitemloo.biblionumber | html %]" ? "minDate" : "maxDate",
696 instance = $( this ).data( "datepicker" );
697 date = $.datepicker.parseDate(
698 instance.settings.dateFormat ||
699 $.datepicker._defaults.dateFormat,
700 selectedDate, instance.settings );
701 dates[% bibitemloo.biblionumber | html %].not( this ).datepicker( "option", option, date );