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 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">
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 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 <input type="hidden" name="place_reserve" value="1"/>
162 <!-- These values are set dynamically by js -->
163 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
164 <input type="hidden" name="selecteditems" id="selections"/>
167 [% FOREACH bibitemloo IN bibitemloop %]
168 <div class="holdrow">
169 [% IF bibitemloo.forced_hold_level %]
170 <div class="alert alert-info forced_hold_level">
171 [% IF bibitemloo.forced_hold_level == 'item' %]
172 You already have at least one item level hold on this title.
173 All further holds must be item level.
175 You already have at least one record level hold on this title.
176 All further holds must be record level.
181 [% IF ( bibitemloo.holdable ) %]
182 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
183 <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]"/>
184 <span class="confirmjs_hold" title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"></span>
185 <span class="confirm_nonjs">
186 <input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" name="[% bibitemloo.biblionumber | html %]" checked="checked" id="single_[% bibitemloo.biblionumber | html %]" value="any" />
187 <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label>
189 [% END # / bibitemloo.holdable %]
191 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber | html %]">
192 [% INCLUDE 'biblio-title.inc' biblio=bibitemloo %]
194 [% IF ( bibitemloo.author ) %], by [% bibitemloo.author | html %][% END %]
197 [% UNLESS ( bibitemloo.holdable ) %]
198 [% IF ( bibitemloo.ageRestricted ) %]
199 <div class="alert alert-warning">Sorry, you are too young to reserve this material.</div>
201 [% IF ( bibitemloo.already_reserved ) %]
202 <div class="alert alert-warning">You have already requested this title.</div>
204 [% IF ( bibitemloo.already_patron_possession ) %]
205 <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div>
207 [% UNLESS ( bibitemloo.bib_available ) %]
208 <div class="alert">There are no items that can be placed on hold.</div>
210 <div class="alert">This title cannot be requested.</div>
212 [% END # / UNLESS bibitemloo.already_patron_possession %]
213 [% END # / IF bibitemloo.already_reserved %]
214 [% END # / UNLESS bibitemloo.holdable %]
216 [% IF ( bibitemloo.holdable ) %]
217 <fieldset class="rows">
220 [% UNLESS ( item_level_itypes ) %]
222 <span class="label">Item type: </span>
223 [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
224 [% bibitemloo.translated_description | html %]
228 [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
229 [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
230 <li class="priority">
231 <span class="label">Your priority: </span>
232 [% bibitemloo.rank | html %]
236 [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
237 <li class="holds-count">
238 <span class="label">Number of holds: </span>
239 [% bibitemloo.reservecount | html %]
243 [% UNLESS ( singleBranchMode ) %]
244 [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %]
246 <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label>
247 [% UNLESS ( bibitemloo.holdable ) %]
248 <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled">
249 [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
252 [% SET at_least_one_library_not_available_for_pickup = 0 %]
253 <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]">
254 [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
255 [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %]
256 [% IF library.selected AND pickup_available_at %]
257 <option value="[% library.branchcode | html %]" selected="selected" >[% library.branchname | html %]</option>
258 [% ELSIF pickup_available_at %]
259 <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option>
261 [% SET at_least_one_library_not_available_for_pickup = 1 %]
262 <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library">[% library.branchname | html %]</option>
266 [% IF at_least_one_library_not_available_for_pickup %]
267 <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>
269 [% END # / UNLESS bibitemloo.holdable %]
271 [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %]
272 [% END # / UNLESS singleBranchMode %]
275 <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a>
277 <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options">
280 [% IF ( reserve_in_future ) %]
282 <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label>
283 <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" size="10" class="holddatefrom"/>
284 <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
289 <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label>
290 <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="holddateto" />
291 <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
294 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
296 [% FOREACH item IN bibitemloo.itemLoop %]
297 [% itemtypes.push( item.itype ) %]
300 <label for="itemtype">Request specific item type:</label>
301 <select name="itemtype" id="itemtype">
302 <option value="">Any item type</option>
303 [% FOREACH i IN itemtypes.unique.sort %]
304 <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option>
310 [% IF ( OpacHoldNotes ) %]
312 <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]">
313 <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label>
314 [% IF bibitemloo.reqholdnotes %]
315 <span id="reqholdnotes_[% bibitemloo.biblionumber | html %]">Please enter additional information about the requested item:</span>
317 <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]" >[% bibitemloo.holdnotes | html %]</textarea>
320 [% END # / IF OpacHoldNotes %]
322 [% IF bibitemloo.itemholdable %]
324 <li class="lradio place_on_type" style="display:none;">
325 [% IF NOT bibitemloo.force_hold %]
326 <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label>
327 <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
328 id="reqany_[% bibitemloo.biblionumber | html %]"
334 <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label>
335 <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
336 id="reqspecific_[% bibitemloo.biblionumber | html %]"
337 class="selectspecific"
341 [% END # / IF bibitemloo.itemholdable %]
344 [% IF bibitemloo.itemholdable %]
345 <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html %]">
346 <caption>Select a specific item:</caption>
349 [% IF ( item_level_itypes ) %]
353 [% UNLESS ( singleBranchMode ) %]
354 <th>Home library</th>
355 <th>Last location</th>
357 [% IF ( itemdata_ccode ) %]
361 [% IF ( itemdata_enumchron ) %]
367 [% FOREACH itemLoo IN bibitemloo.itemLoop %]
368 <tr class="[% itemLoo.backgroundcolor | html %]">
369 <td class="copynumber">
370 [% IF ( itemLoo.available ) %]
371 <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" />
373 <input disabled="disabled" type="radio" aria-label="Cannot be put on hold" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]"
374 style="display:none;" />
375 <i class="fa fa-remove danger" aria-hidden="true" title="Cannot be put on hold"></i>
378 [% IF ( itemLoo.copynumber ) %]
379 [% itemLoo.copynumber | html %]
383 [% IF ( item_level_itypes ) %]
385 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
386 [% IF ( itemLoo.imageurl ) %]
387 <img src="[% itemLoo.imageurl | html %]" alt="" />
390 [% itemLoo.translated_description | html %]
394 <td class="barcode">[% itemLoo.barcode | html %]</td>
395 [% UNLESS ( singleBranchMode ) %]
396 <td class="homebranch">[% Branches.GetName( itemLoo.homeBranchName ) | html %]</td>
397 <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingBranchName ) | html %]</td>
399 [% IF ( itemdata_ccode ) %]
400 <td class="ccode"> [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td>
402 <td class="call_no">[% itemLoo.callNumber | html %]</td>
403 [% IF ( itemdata_enumchron ) %]
404 <td class="vol_info">[% itemLoo.enumchron | html %]</td>
406 <td class="information">
407 [% IF ( itemLoo.dateDue ) %]
408 <span class="checkedout">Due [% itemLoo.dateDue | html %]</span>
409 [% ELSIF ( itemLoo.transfertwhen ) %]
410 <span class="intransit">In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | html %]</span>
413 [% IF ( itemLoo.message ) %]
414 <span class="lost">Unavailable (lost or missing)</span>
417 [% IF ( itemLoo.notforloan ) %]
418 <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue | html %])</span>
421 [% IF ( itemLoo.reservedate ) %]
422 <span class="waiting">
423 [% IF ( itemLoo.waitingdate ) %]
429 [% IF ( itemLoo.waitingdate ) %]
434 [% itemLoo.ExpectedAtLibrary | html %] since
435 [% IF ( itemLoo.waitingdate ) %]
436 [% itemLoo.waitingdate | $KohaDates %]
438 [% IF ( itemLoo.reservedate ) %]
439 [% itemLoo.reservedate | html %]
444 <span class="notonhold">Not on hold</span>
445 [% END # / IF ( itemLoo.reservedate )%]
448 [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%]
449 </table> <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] -->
450 [% END # / IF ( bibitemloo.itemholdable )%]
451 </div> <!-- / #hold-options-[% bibitemloo.biblionumber | html %] -->
453 [% END # / IF ( bibitemloo.holdable ) %]
454 </div> <!-- / .holdrow -->
455 [% END # / FOREACH bibitemloo IN bibitemloop %]
456 </div><!-- #bigloop -->
458 [% UNLESS ( none_available ) %]
459 <input type="submit" value="Confirm hold" class="btn btn-primary placehold" />
463 [% END # / UNLESS message %]
464 </div> <!-- / #holds -->
465 </div> <!-- / .container -->
466 </div> <!-- / .main -->
467 [% INCLUDE 'opac-bottom.inc' %]
468 [% BLOCK jsinclude %]
469 [% INCLUDE 'calendar.inc' %]
472 var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection.");
474 // Clear the contents of an input field
475 $(".clearfield").on("click",function(e){
476 $(this).closest("td").find("input").val("");
480 // Select the first item available
481 function select_first_available(id){
482 var radios = $("input:radio[name='checkitem_" + id + "']");
483 $(radios).first().attr("checked", "checked");
486 $(document).ready(function() {
487 $("#hold-request-form").preventDoubleFormSubmit();
488 var copiesRowId = null;
489 var wasSpecific = false;
490 var lastCopiesRowId = null;
492 $(".toggle-hold-options").show();
493 $(".hold-options").hide();
494 $(".holddatefrom,.holddateto").prop("readOnly", true);
496 $(".checkitem").parent().click(function(e){
497 if(e.target.tagName.toLowerCase() == 'td'){
498 $(this).find("input.checkitem").each( function() {
499 $(this).attr('checked', 'checked');
504 // click on a first td check the confirmjs checkbox
505 $("td.hold").click(function(e){
506 if(e.target.tagName.toLowerCase() == 'td'){
507 $(this).find("input.confirmjs").each( function() {
508 $(this).attr('checked', !$(this).attr('checked'));
514 $(".toggle-hold-options").on("click",function(e){
516 toggleLink = $(this);
517 var optionsID = this.id.replace("toggle-hold-options-","");
518 $("#hold-options-"+optionsID).toggle(0, function() {
519 toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options"));
523 // Hides all 'specific copy' table rows on load.
524 $(".copiesrow").hide();
526 [% FOREACH bibitemloo IN bibitemloop %]
527 [% IF bibitemloo.force_hold %]
528 $("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click();
529 $("#reqspecific_[% bibitemloo.biblionumber | html %]").click();
530 $("#copiesrow_[% bibitemloo.biblionumber | html %]").show();
532 [% IF bibitemloo.reqholdnotes %]
533 $("#holdnotes_[% bibitemloo.biblionumber | html %]").attr( 'required', true );
537 $(".date-format").each(function(){
538 if($(this).hasClass("to")){ var op = "to"; }
539 if($(this).hasClass("from")){ var op = "from"; }
540 var bibNum = $(this).data("biblionumber");
541 $(this).html("<a href=\"#\" class=\"clear-date\" data-op=\"" + op + "\" id=\"clear" + bibNum + "\">" + _("Clear date") + "</a>");
544 $(".clear-date").on("click",function(e){
546 var fieldID = this.id.replace("clear","");
547 var op = $(this).data("op");
548 $("#" + op + fieldID).val("");
551 // Replace non-JS single-selection with multi-selection capability.
552 $(".reserve_mode").val("multi");
553 $(".confirm_nonjs").remove();
554 $(".confirmjs_hold").each(function(){
555 var bib = $(this).attr("title");
556 var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
557 html += "value=\"" + bib + "\" id=\"" + bib + "\" /> " + _("Place a hold on") + " </label> ";
560 $(".confirmjs_nohold").each(function(){
561 var bib = $(this).attr("title");
562 var html = "<label><input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
563 html += "value=\"" + bib + "\" id=\"" + bib + "\" />" + _("Place a hold on: ") + "</label>";
567 // expand or collapse the copiesrow tr
568 function toggle_copiesrow(biblioNum) {
569 var checkbox = $("input:checkbox[value='"+biblioNum+"']");
570 newCopiesRowId = "#copiesrow_" + biblioNum;
571 var select_specific = $("#reqspecific_"+biblioNum).is(":checked");
572 // If the checkbox is checked AND we want a specific item, we display the items block
573 if ( $(checkbox).is(":checked") && select_specific ) {
574 $(newCopiesRowId).show();
576 $(newCopiesRowId).hide();
580 $("#place_on_hdr").show();
582 $(".place_on_type").show();
583 // onload, selectany is checked
584 $(".selectany").attr("checked", "checked");
586 // If the user is *allowed* to choose a specific item
587 // The first one is preselected
588 $("table.copiesrow").each(function(){
589 var id = suffixOf($(this).attr("id"), "_");
590 select_first_available(id);
593 // On confirmsjs change
594 $(".confirmjs").change(function(){
595 var id = suffixOf($(this).attr("id"), "_");
596 // If I m checked, I enable radio buttons
597 if ( $(this).is(":checked") ) {
598 $("#reqspecific_" + id).attr("disabled", false);
599 $("#reqany_" + id).attr("disabled", false);
601 // Else its are disabled
603 $("#reqspecific_" + id).attr("disabled", "disabled");
604 $("#reqany_" + id).attr("disabled", "disabled");
606 // expand or collaspe the items block
607 toggle_copiesrow(id);
610 // When 'specific copy' or 'first available' radio button is clicked
611 $(".selectspecific, .selectany").click(function() {
612 var id = suffixOf($(this).attr("id"), "_");
613 toggle_copiesrow(id);
616 // Show or hide holds notes
617 $(".shownotes").click(function(){
618 biblioNum = suffixOf($(this).attr("id"), "_");
619 $("#notesrow_"+biblioNum).toggle();
622 // When 'Place Hold' button is clicked
623 $(".placehold").click(function(){
624 var biblionumbers = "";
627 [% IF new_reserves_allowed %]
628 if ($(".confirmjs:checked").size() > [% new_reserves_allowed | html %] ) {
629 alert(MSG_MAX_HOLDS_EXCEEDED);
634 if ($(".confirmjs:checked").size() == 0) {
635 alert( __("No item was selected") );
639 // Find the items with the 'Hold' box checked
641 $(".confirmjs:checked").each(function() {
642 var biblioNum = $(this).val();
643 biblionumbers += biblioNum + "/";
644 selections += biblioNum + "/";
646 // If required hold note is empty, make it visible
647 if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) {
648 if( !$("#hold-options-"+biblioNum).is(':visible')) {
649 $("#toggle-hold-options-"+biblioNum).click();
653 // If the 'specific copy' radio button is checked
654 if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
655 // Find the selected copy
656 var item = $(".checkitem_" + biblioNum + ":checked");
657 if ($(item).size() == 0) {
658 alert(MSG_NO_ITEM_SELECTED);
662 selections += $(item).val();
667 // Add the pickup location
668 var branchSel = $("#branch_" + biblioNum);
669 if (branchSel.size() > 0) {
670 selections += $(branchSel).val();
676 if (badBib) { // alert has been raised already
680 $("#selections").val(selections);
681 $("#biblionumbers").val(biblionumbers);
686 [% FOREACH bibitemloo IN bibitemloop %]
687 [% IF ( bibitemloo.holdable ) %]
688 // http://jqueryui.com/demos/datepicker/#date-range
689 var dates[% bibitemloo.biblionumber | html %] = $( "#from[% bibitemloo.biblionumber | html %], #to[% bibitemloo.biblionumber | html %]" ).datepicker({
693 onSelect: function( selectedDate ) {
694 var option = this.id == "from[% bibitemloo.biblionumber | html %]" ? "minDate" : "maxDate",
695 instance = $( this ).data( "datepicker" );
696 date = $.datepicker.parseDate(
697 instance.settings.dateFormat ||
698 $.datepicker._defaults.dateFormat,
699 selectedDate, instance.settings );
700 dates[% bibitemloo.biblionumber | html %].not( this ).datepicker( "option", option, date );