6 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Placing a hold</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
13 [% INCLUDE 'bodytag.inc' bodyid='opac-holds' %]
14 [% INCLUDE 'masthead.inc' %]
17 <nav aria-label="breadcrumb">
18 <ul class="breadcrumb">
19 <li class="breadcrumb-item">
20 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
22 <li class="breadcrumb-item active" aria-current="page">
23 <a href="#">Placing a hold</a>
28 <div class="container">
29 <div id="holds" class="maincontent">
31 <div id="holdmessages" class="alert">
32 <p>Sorry, you cannot place holds.</p>
36 According to our records, we don't have up-to-date contact information. Please contact the library.
37 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
38 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
44 Your library card has been marked as lost or stolen.<br />
45 <em>If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.</em>
51 Your account has been frozen.
52 [% IF debarred_comment %]
54 <span id="userdebarred_comment">
56 [% IF debarred_comment.search('OVERDUES_PROCESS') %]
57 Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %]
59 [% debarred_comment | html_line_break %]
65 [% IF debarred_date && debarred_date != '9999-12-31' %]
67 <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>
69 <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>
73 [% IF ( too_much_oweing ) %]
74 <li id="too_much_oweing">
75 You have unpaid fines. Amount: [% too_much_oweing | $Price %].
79 [% IF ( too_many_reserves ) %]
80 <li id="too_many_reserves">
81 Sorry, you cannot place more than [% too_many_reserves | html %] holds.
85 [% IF ( bad_biblionumber ) %]
86 <li id="bad_biblionumber">
87 ERROR: No record found for record id [% bad_biblionumber | html %].
91 [% IF ( no_items_selected ) %]
92 <li id="no_items_selected">
93 You must select at least one item.
97 [% IF ( no_branch_selected ) %]
98 <li id="no_branch_selected">
99 You must select a library for pickup.
103 [% IF ( no_biblionumber ) %]
104 <li id="no_biblionumber">
105 ERROR: No record id specified.
109 [% IF ( bad_data ) %]
111 ERROR: Internal error: incomplete hold request.
115 [% IF ( expired_patron ) %]
116 <li id="expired_patron">
117 Your library card has expired. Please contact your librarian if you wish to renew your card.
121 [% IF ( no_pickup_locations ) %]
122 <li id="no_pickup_locations">
123 None of the libraries are available for pickup location.
127 </div> <!-- /.message -->
128 [% ELSE # /IF message %]
130 [% IF ( none_available && multi_hold ) %]
131 <div id="none_available" class="alert">
132 Sorry, none of these titles can be placed on hold.
136 [% END # / IF message %]
138 [% UNLESS ( message ) %]
139 [% UNLESS ( none_available ) %]
140 <h2>Confirm holds for:[% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h2>
141 [% END # / UNLESS none_available %]
143 [% IF (RESERVE_CHARGE) %]
144 <div class="alert" id="reserve_fee">
145 [% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %]
146 You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] when you collect this item
148 You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] for placing this hold
153 [% IF ( new_reserves_allowed ) %]
154 <div id="new_reserves_allowed" class="alert">
155 <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.
159 <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
160 <input type="hidden" name="place_reserve" value="1"/>
161 <!-- These values are set dynamically by js -->
162 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
163 <input type="hidden" name="selecteditems" id="selections"/>
166 [% FOREACH bibitemloo IN bibitemloop %]
167 <div class="holdrow">
168 [% IF bibitemloo.forced_hold_level %]
169 <span class="forced_hold_level"><h3>
170 [% IF bibitemloo.forced_hold_level == 'item' %]
171 You already have at least one item level hold on this title.
172 All further holds must be item level.
174 You already have at least one record level hold on this title.
175 All further holds must be record level.
180 [% IF ( bibitemloo.holdable ) %]
181 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
182 <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]"/>
183 <span class="confirmjs_hold" title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"></span>
184 <span class="confirm_nonjs">
185 <input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" name="[% bibitemloo.biblionumber | html %]" checked="checked" id="single_[% bibitemloo.biblionumber | html %]" value="any" />
186 <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label>
188 [% END # / bibitemloo.holdable %]
190 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber | html %]">
191 [% INCLUDE 'biblio-title.inc' biblio=bibitemloo %]
193 [% IF ( bibitemloo.author ) %], by [% bibitemloo.author | html %][% END %]
196 [% UNLESS ( bibitemloo.holdable ) %]
197 [% IF ( bibitemloo.ageRestricted ) %]
198 <div class="alert alert-warning">Sorry, you are too young to reserve this material.</div>
200 [% IF ( bibitemloo.already_reserved ) %]
201 <div class="alert alert-warning">You have already requested this title.</div>
203 [% UNLESS ( bibitemloo.bib_available ) %]
204 <div class="alert alert-warning">There are no items that can be placed on hold.</div>
206 [% IF ( bibitemloo.already_patron_possession ) %]
207 <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div>
209 <div class="alert alert-warning">This title cannot be requested.</div>
211 [% END # / UNLESS bibitemloo.bib_available %]
212 [% END # / IF bibitemloo.already_reserved %]
213 [% END # / UNLESS bibitemloo.holdable %]
215 [% IF ( bibitemloo.holdable ) %]
216 <fieldset class="rows">
219 [% UNLESS ( item_level_itypes ) %]
221 <span class="label">Item type: </span>
222 [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
223 [% bibitemloo.translated_description | html %]
227 [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
228 [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
229 <li class="priority">
230 <span class="label">Your priority: </span>
231 [% bibitemloo.rank | html %]
235 [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
236 <li class="holds-count">
237 <span class="label">Number of holds: </span>
238 [% bibitemloo.reservecount | html %]
242 [% UNLESS ( singleBranchMode ) %]
243 [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %]
245 <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label>
246 [% UNLESS ( bibitemloo.holdable ) %]
247 <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled">
248 [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
251 [% SET at_least_one_library_not_available_for_pickup = 0 %]
252 <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]">
253 [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
254 [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %]
255 [% IF library.selected AND pickup_available_at %]
256 <option value="[% library.branchcode | html %]" selected="selected" >[% library.branchname | html %]</option>
257 [% ELSIF pickup_available_at %]
258 <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option>
260 [% SET at_least_one_library_not_available_for_pickup = 1 %]
261 <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library">[% library.branchname | html %]</option>
265 [% IF at_least_one_library_not_available_for_pickup %]
266 <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>
268 [% END # / UNLESS bibitemloo.holdable %]
270 [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %]
271 [% END # / UNLESS singleBranchMode %]
274 <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a>
276 <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options">
279 [% IF ( reserve_in_future ) %]
281 <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label>
282 <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" size="10" class="holddatefrom"/>
283 <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
288 <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label>
289 <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="holddateto" />
290 <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
293 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
295 [% FOREACH item IN bibitemloo.itemLoop %]
296 [% itemtypes.push( item.itype ) %]
299 <label for="itemtype">Request specific item type:</label>
300 <select name="itemtype" size="1" id="itemtype">
301 <option value="">Any item type</option>
302 [% FOREACH i IN itemtypes.unique.sort %]
303 <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option>
309 [% IF ( OpacHoldNotes ) %]
311 <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]">
312 <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label>
313 [% IF bibitemloo.reqholdnotes %]
314 <span id="reqholdnotes_[% bibitemloo.biblionumber | html %]">Please enter additional information about the requested item:</span>
316 <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]" >[% bibitemloo.holdnotes | html %]</textarea>
319 [% END # / IF OpacHoldNotes %]
321 [% IF bibitemloo.itemholdable %]
323 <li class="lradio place_on_type" style="display:none;">
324 [% IF NOT bibitemloo.force_hold %]
325 <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label>
326 <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
327 id="reqany_[% bibitemloo.biblionumber | html %]"
333 <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label>
334 <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
335 id="reqspecific_[% bibitemloo.biblionumber | html %]"
336 class="selectspecific"
340 [% END # / IF bibitemloo.itemholdable %]
343 [% IF bibitemloo.itemholdable %]
344 <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html %]">
345 <caption>Select a specific item:</caption>
348 [% IF ( item_level_itypes ) %]
352 [% UNLESS ( singleBranchMode ) %]
353 <th>Home library</th>
354 <th>Last location</th>
356 [% IF ( itemdata_ccode ) %]
360 [% IF ( itemdata_enumchron ) %]
366 [% FOREACH itemLoo IN bibitemloo.itemLoop %]
367 <tr class="[% itemLoo.backgroundcolor | html %]">
368 <td class="copynumber">
369 [% IF ( itemLoo.available ) %]
370 <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" />
372 <input disabled="disabled" type="radio" aria-label="Cannot be put on hold" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]"
373 style="display:none;" />
374 <i class="fa fa-remove danger" aria-hidden="true" title="Cannot be put on hold"></i>
377 [% IF ( itemLoo.copynumber ) %]
378 [% itemLoo.copynumber | html %]
382 [% IF ( item_level_itypes ) %]
384 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
385 [% IF ( itemLoo.imageurl ) %]
386 <img src="[% itemLoo.imageurl | html %]" alt="" />
389 [% itemLoo.translated_description | html %]
393 <td class="barcode">[% itemLoo.barcode | html %]</td>
394 [% UNLESS ( singleBranchMode ) %]
395 <td class="homebranch">[% Branches.GetName( itemLoo.homeBranchName ) | html %]</td>
396 <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingBranchName ) | html %]</td>
398 [% IF ( itemdata_ccode ) %]
399 <td class="ccode"> [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td>
401 <td class="call_no">[% itemLoo.callNumber | html %]</td>
402 [% IF ( itemdata_enumchron ) %]
403 <td class="vol_info">[% itemLoo.enumchron | html %]</td>
405 <td class="information">
406 [% IF ( itemLoo.dateDue ) %]
407 <span class="checkedout">Due [% itemLoo.dateDue | html %]</span>
408 [% ELSIF ( itemLoo.transfertwhen ) %]
409 <span class="intransit">In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | html %]</span>
412 [% IF ( itemLoo.message ) %]
413 <span class="lost">Unavailable (lost or missing)</span>
416 [% IF ( itemLoo.notforloan ) %]
417 <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue | html %])</span>
420 [% IF ( itemLoo.reservedate ) %]
421 <span class="waiting">
422 [% IF ( itemLoo.waitingdate ) %]
428 [% IF ( itemLoo.waitingdate ) %]
433 [% itemLoo.ExpectedAtLibrary | html %] since
434 [% IF ( itemLoo.waitingdate ) %]
435 [% itemLoo.waitingdate | $KohaDates %]
437 [% IF ( itemLoo.reservedate ) %]
438 [% itemLoo.reservedate | html %]
443 <span class="notonhold">Not on hold</span>
444 [% END # / IF ( itemLoo.reservedate )%]
447 [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%]
448 </table> <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] -->
449 [% END # / IF ( bibitemloo.itemholdable )%]
450 </div> <!-- / #hold-options-[% bibitemloo.biblionumber | html %] -->
452 [% END # / IF ( bibitemloo.holdable ) %]
453 </div> <!-- / .holdrow -->
454 [% END # / FOREACH bibitemloo IN bibitemloop %]
455 </div><!-- #bigloop -->
457 [% UNLESS ( none_available ) %]
458 <input type="submit" value="Confirm hold" class="btn btn-primary placehold" />
462 [% END # / UNLESS message %]
463 </div> <!-- / #holds -->
464 </div> <!-- / .container -->
465 </div> <!-- / .main -->
466 [% INCLUDE 'opac-bottom.inc' %]
467 [% BLOCK jsinclude %]
468 [% INCLUDE 'calendar.inc' %]
471 var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection.");
473 // Clear the contents of an input field
474 $(".clearfield").on("click",function(e){
475 $(this).closest("td").find("input").val("");
479 // Select the first item available
480 function select_first_available(id){
481 var radios = $("input:radio[name='checkitem_" + id + "']");
482 $(radios).first().attr("checked", "checked");
485 $(document).ready(function() {
486 $("#hold-request-form").preventDoubleFormSubmit();
487 var copiesRowId = null;
488 var wasSpecific = false;
489 var lastCopiesRowId = null;
491 $(".toggle-hold-options").show();
492 $(".hold-options").hide();
493 $(".holddatefrom,.holddateto").prop("readOnly", true);
495 $(".checkitem").parent().click(function(e){
496 if(e.target.tagName.toLowerCase() == 'td'){
497 $(this).find("input.checkitem").each( function() {
498 $(this).attr('checked', 'checked');
503 // click on a first td check the confirmjs checkbox
504 $("td.hold").click(function(e){
505 if(e.target.tagName.toLowerCase() == 'td'){
506 $(this).find("input.confirmjs").each( function() {
507 $(this).attr('checked', !$(this).attr('checked'));
513 $(".toggle-hold-options").on("click",function(e){
515 toggleLink = $(this);
516 var optionsID = this.id.replace("toggle-hold-options-","");
517 $("#hold-options-"+optionsID).toggle(0, function() {
518 toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options"));
522 // Hides all 'specific copy' table rows on load.
523 $(".copiesrow").hide();
525 [% FOREACH bibitemloo IN bibitemloop %]
526 [% IF bibitemloo.force_hold %]
527 $("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click();
528 $("#reqspecific_[% bibitemloo.biblionumber | html %]").click();
529 $("#copiesrow_[% bibitemloo.biblionumber | html %]").show();
531 [% IF bibitemloo.reqholdnotes %]
532 $("#holdnotes_[% bibitemloo.biblionumber | html %]").attr( 'required', true );
536 $(".date-format").each(function(){
537 if($(this).hasClass("to")){ var op = "to"; }
538 if($(this).hasClass("from")){ var op = "from"; }
539 var bibNum = $(this).data("biblionumber");
540 $(this).html("<a href=\"#\" class=\"clear-date\" data-op=\"" + op + "\" id=\"clear" + bibNum + "\">" + _("Clear date") + "</a>");
543 $(".clear-date").on("click",function(e){
545 var fieldID = this.id.replace("clear","");
546 var op = $(this).data("op");
547 $("#" + op + fieldID).val("");
550 // Replace non-JS single-selection with multi-selection capability.
551 $(".reserve_mode").val("multi");
552 $(".confirm_nonjs").remove();
553 $(".confirmjs_hold").each(function(){
554 var bib = $(this).attr("title");
555 var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
556 html += "value=\"" + bib + "\" id=\"" + bib + "\" /> " + _("Place a hold on") + " </label> ";
559 $(".confirmjs_nohold").each(function(){
560 var bib = $(this).attr("title");
561 var html = "<label><input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
562 html += "value=\"" + bib + "\" id=\"" + bib + "\" />" + _("Place a hold on: ") + "</label>";
566 // expand or collapse the copiesrow tr
567 function toggle_copiesrow(biblioNum) {
568 var checkbox = $("input:checkbox[value='"+biblioNum+"']");
569 newCopiesRowId = "#copiesrow_" + biblioNum;
570 var select_specific = $("#reqspecific_"+biblioNum).is(":checked");
571 // If the checkbox is checked AND we want a specific item, we display the items block
572 if ( $(checkbox).is(":checked") && select_specific ) {
573 $(newCopiesRowId).show();
575 $(newCopiesRowId).hide();
579 $("#place_on_hdr").show();
581 $(".place_on_type").show();
582 // onload, selectany is checked
583 $(".selectany").attr("checked", "checked");
585 // If the user is *allowed* to choose a specific item
586 // The first one is preselected
587 $("table.copiesrow").each(function(){
588 var id = suffixOf($(this).attr("id"), "_");
589 select_first_available(id);
592 // On confirmsjs change
593 $(".confirmjs").change(function(){
594 var id = suffixOf($(this).attr("id"), "_");
595 // If I m checked, I enable radio buttons
596 if ( $(this).is(":checked") ) {
597 $("#reqspecific_" + id).attr("disabled", false);
598 $("#reqany_" + id).attr("disabled", false);
600 // Else its are disabled
602 $("#reqspecific_" + id).attr("disabled", "disabled");
603 $("#reqany_" + id).attr("disabled", "disabled");
605 // expand or collaspe the items block
606 toggle_copiesrow(id);
609 // When 'specific copy' or 'first available' radio button is clicked
610 $(".selectspecific, .selectany").click(function() {
611 var id = suffixOf($(this).attr("id"), "_");
612 toggle_copiesrow(id);
615 // Show or hide holds notes
616 $(".shownotes").click(function(){
617 biblioNum = suffixOf($(this).attr("id"), "_");
618 $("#notesrow_"+biblioNum).toggle();
621 // When 'Place Hold' button is clicked
622 $(".placehold").click(function(){
623 var biblionumbers = "";
626 [% IF new_reserves_allowed %]
627 if ($(".confirmjs:checked").size() > [% new_reserves_allowed | html %] ) {
628 alert(MSG_MAX_HOLDS_EXCEEDED);
633 if ($(".confirmjs:checked").size() == 0) {
634 alert( __("No item was selected") );
638 // Find the items with the 'Hold' box checked
640 $(".confirmjs:checked").each(function() {
641 var biblioNum = $(this).val();
642 biblionumbers += biblioNum + "/";
643 selections += biblioNum + "/";
645 // If required hold note is empty, make it visible
646 if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) {
647 if( !$("#hold-options-"+biblioNum).is(':visible')) {
648 $("#toggle-hold-options-"+biblioNum).click();
652 // If the 'specific copy' radio button is checked
653 if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
654 // Find the selected copy
655 var item = $(".checkitem_" + biblioNum + ":checked");
656 if ($(item).size() == 0) {
657 alert(MSG_NO_ITEM_SELECTED);
661 selections += $(item).val();
666 // Add the pickup location
667 var branchSel = $("#branch_" + biblioNum);
668 if (branchSel.size() > 0) {
669 selections += $(branchSel).val();
675 if (badBib) { // alert has been raised already
679 $("#selections").val(selections);
680 $("#biblionumbers").val(biblionumbers);
685 [% FOREACH bibitemloo IN bibitemloop %]
686 [% IF ( bibitemloo.holdable ) %]
687 // http://jqueryui.com/demos/datepicker/#date-range
688 var dates[% bibitemloo.biblionumber | html %] = $( "#from[% bibitemloo.biblionumber | html %], #to[% bibitemloo.biblionumber | html %]" ).datepicker({
692 onSelect: function( selectedDate ) {
693 var option = this.id == "from[% bibitemloo.biblionumber | html %]" ? "minDate" : "maxDate",
694 instance = $( this ).data( "datepicker" );
695 date = $.datepicker.parseDate(
696 instance.settings.dateFormat ||
697 $.datepicker._defaults.dateFormat,
698 selectedDate, instance.settings );
699 dates[% bibitemloo.biblionumber | html %].not( this ).datepicker( "option", option, date );