Bug 12904: Force browser to load new javascript files after upgrade
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% USE Categories %]
5 [% USE ColumnsSettings %]
6 [% USE ItemTypes %]
7 [% USE Price %]
8 [% USE AuthorisedValues %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 [% SET destination = "circ" %]
11 <title>Koha &rsaquo; Circulation
12 [% IF borrowernumber and borrower%]
13   &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %]
14 [% END %]
15 </title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 [% INCLUDE 'calendar.inc' %]
18
19 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
20 [% INCLUDE 'strings.inc' %]
21 [% INCLUDE 'datatables.inc' %]
22 [% INCLUDE 'columns_settings.inc' %]
23 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
24 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
25 [% INCLUDE 'timepicker.inc' %]
26 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
27 <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
28 <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
29 <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
30 <script type="text/javascript">
31 //<![CDATA[
32 /* Set some variable needed in circulation.js */
33 var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
34 var interface = "[% interface %]";
35 var theme = "[% theme %]";
36 var borrowernumber = "[% borrowernumber %]";
37 var branchcode = "[% branch %]";
38 var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
39 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
40 var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
41 var script = "circulation";
42 var relatives_borrowernumbers = new Array();
43 [% FOREACH b IN relatives_borrowernumbers %]
44     relatives_borrowernumbers.push("[% b %]");
45 [% END %]
46
47 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
48 var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
49
50 columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
51
52 [% IF borrowernumber and borrower %]
53     if($.cookie("holdfor") != [% borrowernumber %]){
54         $.removeCookie("holdfor", { path: '/' });
55     }
56 [% ELSE %]
57     $.removeCookie("holdfor", { path: '/' });
58 [% END %]
59
60 [% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
61
62 // On-site checkout
63 function toggle_onsite_checkout(){
64     if ( $("#onsite_checkout").prop('checked') ) {
65         $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
66         [% IF !Koha.Preference('SpecifyDueDate') %]
67             $("#duedatespec").datetimepicker('destroy');
68         [% END %]
69     } else {
70         $("#duedatespec").datetimepicker({
71             onClose: function(dateText, inst) {
72                 if (validate_date(dateText, inst) ) {
73                     $("#barcode").focus();
74                 }
75             },
76             hour: 23,
77             minute: 59
78         }).on("change", function(e, value) {
79             if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
80         });
81     }
82 }
83
84 function Dopop(link) {
85     var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
86 }
87 $(document).ready(function() {
88     $('#mainform').on('submit',function() {
89         if ($("#barcode") && $("#barcode").val()) {
90             $('#barcode').on('keypress',function(event) {
91                 $('#barcodeSubmittedModal').modal();
92                 event.preventDefault(); }
93             );
94         }
95     });
96
97     if ( $('#clubs-tab').length ) {
98         $('#clubs-tab-link').on('click', function() {
99             $('#clubs-tab').text(_("Loading..."));
100             $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
101         });
102     }
103
104     [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
105         // listen submit to trigger qslip on empty checkout
106         $('#mainform').bind('submit',function() {
107             if ($('#barcode').val() == '') {
108                 return printx_window( '[% CircAutoPrintQuickSlip %]' );
109             }
110         });
111     [% END %]
112     toggle_onsite_checkout();
113     $("#onsite_checkout").click(function(){
114         toggle_onsite_checkout();
115     });
116
117     $("#suspend_until").datepicker({
118         onClose: function(dateText, inst) {
119             validate_date(dateText, inst);
120         },
121         minDate: 1, // require that hold suspended until date is after today
122     });
123
124 });
125
126 //]]>
127 </script>
128 </head>
129 <body id="circ_circulation" class="circ">
130
131 [% INCLUDE 'header.inc' %]
132 [% INCLUDE 'circ-search.inc' %]
133
134 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;
135 [% IF borrowernumber and borrower %]
136     <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
137 [% ELSE %]
138     <strong>Checkouts</strong>
139 [% END %]
140 </div>
141 [% IF ( $borrowers ) %]
142 <div id="doc" class="yui-t7">
143
144    <div id="bd">
145         <div id="yui-main">
146         <div class="yui-g">
147 [% ELSE %]
148 <div id="doc3" class="yui-t2">
149
150    <div id="bd">
151         <div id="yui-main">
152         <div class="yui-b">
153 [% END %]
154
155 [% IF borrowernumber and borrower %]
156 [% INCLUDE 'members-toolbar.inc' %]
157 [% END %]
158
159 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
160 [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
161
162 [% IF additional_materials %]
163     <div id="materials" class="dialog message">Note about the accompanying materials: <br />
164     [% additional_materials %]
165     </div>
166 [% END %]
167
168 [% IF ( alert.ITEM_LOST ) %]
169     <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
170 [% END %]
171
172 [% IF ( alert.OTHER_CHARGES ) %]
173     <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES %]</div>
174 [% END %]
175
176 [% IF alert.HIGHHOLDS %]
177     <div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate %] ([% alert.HIGHHOLDS.duration %] days).</div>
178 [% END %]
179
180 [% IF ( nopermission ) %]
181     <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
182 [% END %]
183
184 [% IF ( NEEDSCONFIRMATION ) %]
185 <div class="yui-g">
186
187 <div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
188 [% IF CAN_user_circulate_force_checkout %]
189   <h3>Please confirm checkout</h3>
190 [% ELSE %]
191   <h3>Cannot check out</h3>
192 [% END %]
193
194 <ul>
195 [%IF ( AGE_RESTRICTION ) %]
196     <li>Age restriction [% AGE_RESTRICTION %].
197       [% IF CAN_user_circulate_force_checkout %]
198         Check out anyway?
199       [% END %]
200     </li>
201 [% END %]
202
203 [% IF ( DEBT ) %]
204     <li>The patron has a debt of [% DEBT %].</li>
205 [% END %]
206
207 [% IF ( DEBT_GUARANTEES ) %]
208     <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li>
209 [% END %]
210
211 [% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
212     <li>Rental charge for this item: [% RENTALCHARGE %]</li>
213 [% END %]
214
215 [% IF ( RENEW_ISSUE ) %]
216     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
217 [% END %]
218
219 [% IF ( RESERVE_WAITING ) %]
220     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% reswaitingdate | $KohaDates %]</li>
221 [% END %]
222
223 [% IF ( RESERVED ) %]
224     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% resreservedate | $KohaDates %]</li>
225 [% END %]
226
227 [% IF ( ISSUED_TO_ANOTHER ) %]
228     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
229       [% IF CAN_user_circulate_force_checkout %]
230         Check in and check out?
231       [% END %]
232     </li>
233 [% END %]
234
235 [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_CHECKOUTS' %]
236     <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
237 [% END %]
238
239 [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_ONSITE_CHECKOUTS' %]
240     <li>Too many on-site checked out. [% current_loan_count %] on-site checked out, only [% max_loans_allowed %] are allowed.</li>
241 [% END %]
242
243 [% IF ( BORRNOTSAMEBRANCH ) %]
244     <li>This patron is from a different library ([% Branches.GetName( BORRNOTSAMEBRANCH ) %])</li>
245 [% END %]
246
247 [% IF ( PATRON_CANT ) %]
248     <li>This patron can't check out this item per library circulation policy.</li>
249 [% END %]
250
251 [% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
252     <li>No circulation rule is defined for this patron and itemtype combination.</li>
253 [% END %]
254
255 [% IF ( NOT_FOR_LOAN_FORCING ) %]
256     <li>
257     [% IF ( itemtype_notforloan ) %]
258         Item type is normally not for loan.
259     [% ELSIF ( item_notforloan ) %]
260         [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
261         Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
262     [% END %]
263       [% IF CAN_user_circulate_force_checkout %]
264         Check out anyway?
265       [% END %]
266     </li>
267 [% END %]
268
269 [% IF ( USERBLOCKEDOVERDUE ) %]
270     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
271       [% IF CAN_user_circulate_force_checkout %]
272        Check out anyway?
273       [% END %]
274     </li>
275 [% END %]
276
277 [% IF ( ITEM_LOST ) %]
278     <li>This item has been lost with a status of "[% ITEM_LOST %]".
279       [% IF CAN_user_circulate_force_checkout %]
280         Check out anyway?
281       [% END %]
282     </li>
283 [% END %]
284
285 [% IF HIGHHOLDS %]
286     <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
287 [% END %]
288
289 [% IF PREVISSUE %]
290     <li>Patron has previously checked out this title: <b>[% biblio.title %] [% IF biblio.author %] by [% biblio.author %][% END %]</b>. Check out anyway?</li>
291 [% END %]
292
293 [% IF BIBLIO_ALREADY_ISSUED %]
294   <li>
295     Patron has already checked out another item from this record.
296     [% IF CAN_user_circulate_force_checkout %]
297       Check out anyway?
298     [% END %]
299   </li>
300 [% END %]
301 </ul>
302
303 [% IF HIGHHOLDS %]
304 <script language="JavaScript" type="text/javascript">
305 $(document).ready(function() {
306     [% IF !override_high_holds %]
307         $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
308         if ('[% duedatespec %]' === '') {
309             $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
310         } else {
311             $("input[name=restoreduedatespec]:hidden").val('[% duedatespec %]');
312         }
313     [% END %]
314
315     $("#override_high_holds_tmp").on( 'change', function() {
316         if ( this.checked ) {
317             $("input[name=duedatespec]:hidden").val('');
318         }
319     });
320 });
321 </script>
322 [% END %]
323
324 [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
325 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
326     <input type="hidden" name="restoreduedatespec" />
327
328 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
329
330 [% IF HIGHHOLDS %]
331     <p class="circ-override-high-holds">
332     <input type="checkbox" name="override_high_holds_tmp" id="override_high_holds_tmp" value="1" />
333     <label for="override_high_holds_tmp">Don't decrease loan length based on holds</label>
334     </p>
335 [% END %]
336
337 [% IF ( RESERVED ) %]
338     <p>
339     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
340     <label for="cancelreserve">Cancel hold</label>
341     </p>
342 [% END %]
343
344 [% IF ( RESERVE_WAITING ) %]
345 <p>
346     <label for="cancelreserve">Cancel hold</label>
347     <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
348     <label for="revertreserve">Revert waiting status</label>
349     <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
350 </p>
351 [% END %]
352
353     <input type="hidden" name="barcode" value="[% barcode |html %]" />
354     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
355     <input type="hidden" name="issueconfirmed" value="1" />
356     <input type="hidden" name="override_high_holds" value="[% override_high_holds %]"/>
357     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
358     [% IF ( INVALID_DATE ) %]
359     <p>
360     <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
361     <label for="duedatespec">Due date</label>
362     </p>
363     [% ELSE %]
364     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
365     [% END %]
366     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
367     <input type="hidden" name="branch" value="[% branch %]" />
368     [% IF ( RENEW_ISSUE ) %]
369     <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
370     [% ELSE %]
371     <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
372     [% END %]
373     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
374     <input type="hidden" name="auto_renew" value="[% auto_renew %]" />
375 </form>
376 [% END %]
377
378 [% IF ( RESERVED ) %]
379 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
380     <input type="hidden" name="restoreduedatespec" />
381     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
382     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
383     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
384     <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
385 </form>
386 [% END %]
387
388 [% IF ( RESERVE_WAITING ) %]
389 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
390     <input type="hidden" name="restoreduedatespec" />
391     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
392     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
393     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
394     <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
395 </form>
396 [% END %]
397
398 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
399     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
400     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
401     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
402     <input type="hidden" name="restoreduedatespec" />
403     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
404     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
405         [% IF ( RENEW_ISSUE ) %]
406         <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't renew (N)</button>
407         [% ELSE %]
408         <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't check out (N)</button>
409         [% END %]
410     [% ELSE %]
411         <button type="submit" class="deny"><i class="fa fa-times"></i> Continue</button>
412     [% END %]
413 </form>
414
415 [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
416     [% UNLESS noissues %]
417         <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
418     [% END %]
419 [% END %]
420 </div></div>
421 [% END %] <!-- NEEDSCONFIRMATION -->
422
423         [% IF ( IMPOSSIBLE ) %]
424
425 <div class="yui-g">
426 <div id="circ_impossible" class="dialog alert audio-alert-warning">
427     [% IF ( UNKNOWN_BARCODE ) %]
428         <h3>Barcode not found</h3>
429     [% END %]
430 <!-- RESULT OF ISSUING REQUEST -->
431         <ul>
432         [% IF ( STATS ) %]
433             <li>Local use recorded</li>
434         [% END %]
435
436         [% IF ( INVALID_DATE ) %]
437             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
438         [% END %]
439
440         [% IF ( UNKNOWN_BARCODE ) %]
441             <li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
442
443                 <div>
444                     [% IF ( FALLBACK ) %]
445                         [% IF options %]
446                             <button type="button" class="approve" data-toggle="modal" data-target="#itemSearchFallback"><i class="fa fa-search"></i> Show matching titles</button>
447                         [% ELSE %]
448                             <div>No items were found by searching.</div>
449                         [% END %]
450                     [% END %]
451
452                     [% IF ( fast_cataloging ) %]
453                         [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
454                             <a class="approve" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]"><i class="fa fa-plus"></i> Add record using fast cataloging</a>
455                         [% END %]
456                     [% END %]
457                 </div>
458
459             </li>
460         [% END %]
461
462         [% IF ( NOT_FOR_LOAN ) %]
463             <li>
464             [% IF ( itemtype_notforloan ) %]
465                 Item type not for loan.
466             [% ELSIF ( item_notforloan ) %]
467                 [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
468                 Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
469             [% END %]
470             </li>
471         [% END %]
472
473         [% IF ( WTHDRAWN ) %]
474             <li>Item has been withdrawn</li>
475         [% END %]
476
477         [% IF ( RESTRICTED ) %]
478             <li>Item is restricted</li>
479         [% END %]
480
481         [% IF ( GNA ) %]
482             <li>Patron's address is in doubt</li>
483         [% END %]
484
485         [% IF ( CARD_LOST ) %]
486             <li>Patron's card is lost</li>
487         [% END %]
488
489         [% IF ( DEBARRED ) %]
490             <li>Patron is restricted</li>
491         [% END %]
492
493         [% IF ( NO_MORE_RENEWALS ) %]
494             <li>No more renewals possible</li>
495         [% END %]
496
497         [% IF NO_RENEWAL_FOR_ONSITE_CHECKOUTS %]
498             <li>This item can not be renewed, it's an on-site checkout</li>
499         [% END %]
500
501         [%IF ( AGE_RESTRICTION ) %]
502             <li>Age restriction [% AGE_RESTRICTION %].</li>
503         [% END %]
504
505         [% IF ( EXPIRED ) %]
506             <li>Patron's card is expired</li>
507         [% END %]
508
509         [% IF ( TOO_MANY ) %]
510             <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
511         [% END %]
512
513         [% IF ( ITEMNOTSAMEBRANCH ) %]
514             <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
515         [% END %]
516
517         [% IF RETURN_IMPOSSIBLE %]
518             <li>This item must be returned to [% Branches.GetName( branch_to_return ) %].</li>
519         [% END %]
520
521         [% IF ( USERBLOCKEDWITHENDDATE ) %]
522             <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
523         [% END %]
524
525         [% IF ( USERBLOCKEDNOENDDATE ) %]
526             <li>Patron has an indefinite restriction.</li>
527         [% END %]
528
529         [% IF ( USERBLOCKEDOVERDUE ) %]
530             <li>Checkouts are BLOCKED because patron has overdue items.</li>
531         [% END %]
532         </ul>
533
534         [% IF (forceallow) %]
535             <li>Restriction overridden temporarily.</li>
536         [% END %]
537
538 </div></div>
539
540         [% IF ( FALLBACK ) %]
541             [% IF options %]
542
543                 <!-- Modal -->
544                 <div class="modal" id="itemSearchFallback" tabindex="-1" role="dialog" aria-labelledby="itemSearchFallbackLabel">
545                     <div class="modal-dialog modal-wide" role="document">
546                         <div class="modal-content">
547                             <div class="modal-header">
548                                 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
549                                 <h3 id="itemSearchFallbackLabel"><h3>Barcode not found. The following items were found by searching:</h3>
550                             </div>
551                             <div class="modal-body">
552                                 <table class="table_borrowers">
553                                     [% FOREACH book IN options %]
554                                         <tr>
555                                             <td>
556                                                 <a class="popup" target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber %]">[% book.title %]</a>
557                                                 [% book.barcode %]
558                                             </td>
559                                             <td>
560                                                 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
561                                                     [% IF (forceallow) %]
562                                                         <input type="hidden" name="forceallow" value="1">
563                                                     [% END %]
564                                                     <input type="hidden" name="restoreduedatespec" />
565                                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
566                                                     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
567                                                     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
568                                                     <input type="hidden" name="branch" value="[% branch %]" />
569                                                     <input type="hidden" name="barcode" value="[% book.barcode %]" />
570                                                     <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
571                                                 </form>
572                                             </td>
573                                         </tr>
574                                     [% END %]
575                                 </table>
576                             </div>
577                             <div class="modal-footer">
578                                 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
579                             </div>
580                         </div>
581                     </div>
582                 </div>
583             [% END %]
584         [% END %]
585
586 [% ELSE %]
587   [% IF (forceallow) %]
588       <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
589   [% END %]
590 [% END %] <!-- /impossible -->
591
592 <span class="audio-alert-success"></span>
593
594 [% IF ( issued ) %]
595 <p>Item checked out</p>
596 [% END %]
597
598 [% IF ( message ) %]
599 [% INCLUDE 'patron-toolbar.inc' %]
600 <h4>
601 No patron matched <span class="ex">[% message | html %]</span>
602 </h4>
603 [% END %]
604
605 [% IF ( borrowers ) %]
606 [% INCLUDE 'patron-toolbar.inc' %]
607
608 <fieldset id="circ_circulation_selectborrower">
609     [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %]
610 </fieldset>
611 [% ELSE %]
612
613 <!-- BARCODE ENTRY -->
614
615 [% IF borrowernumber and borrower %]
616 <div class="yui-g">
617
618 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
619     <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
620 [% END %]
621
622 [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
623 <div class="yui-u first">
624
625 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
626     <input type="hidden" name="restoreduedatespec" />
627 [% IF ( issue ) %]
628     <fieldset id="circ_circulation_issue" class="lastchecked">
629 [% ELSE %]
630     <fieldset id="circ_circulation_issue">
631 [% END %]
632     [% IF ( DisplayClearScreenButton ) %]
633         <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
634     [% END %]
635
636     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
637
638     <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
639
640         [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
641             <div class="hint">Enter item barcode or keyword:</div>
642         [% ELSE %]
643             <div class="hint">Enter item barcode:</div>
644         [% END %]
645
646     [% IF NEEDSCONFIRMATION %]
647         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
648     [% ELSE %]
649         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
650     [% END %]
651     <button type="submit" class="btn btn-default">Check out</button>
652
653     <div id="show-checkout-settings">
654         <a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
655     </div>
656
657     <div class="checkout-settings">
658
659         [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
660             [% IF ( SpecifyDueDate ) %]
661                 <div id="specify-due-date" class="checkout-setting">
662                     <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
663                     [% IF ( duedatespec ) %]
664                         <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
665                     [% ELSE %]
666                         <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
667                     [% END %]
668                     <label for="stickyduedate"> Remember for session:</label>
669                     [% IF ( stickyduedate ) %]
670                         <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
671                     [% ELSE %]
672                         <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
673                     [% END %]
674                     <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
675                 </div>
676             [% END %]
677         [% END %]
678
679         [% UNLESS ( noissues ) %]
680             <div id="set-automatic-renewal" class="checkout-setting">
681                 [% IF NEEDSCONFIRMATION %]
682                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
683                 [% ELSE %]
684                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
685                 [% END %]
686
687                 <label for="auto_renew">Automatic renewal</label>
688             </div>
689             [% IF Koha.Preference('decreaseLoanHighHolds') %]
690                 <div id="set_high_holds_overrride" class="checkout-setting">
691                     [% IF NEEDSCONFIRMATION %]
692                         [% IF override_high_holds %]
693                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
694                         [% ELSE %]
695                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
696                         [% END %]
697                     [% ELSE %]
698                         [% IF override_high_holds %]
699                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
700                         [% ELSE %]
701                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
702                         [% END %]
703                     [% END %]
704                     <label for="override_high_holds">Don't decrease checkout length based on holds</label>
705                 </div>
706             [% END %]
707         [% END %]
708
709         [% IF Koha.Preference('OnSiteCheckouts') %]
710             <div id="onsite_checkout-select" class="checkout-setting">
711                 [% IF noissues %]
712                     <div class="onsite-checkout-only">
713                         <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
714                         <input type="text" name="duedatespec" id="duedatespec" />
715                         <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
716                     </div>
717                 [% ELSE %]
718                     <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
719                 [% END %]
720             </div>
721         [% END %]
722
723     </div> <!-- /.checkout-settings -->
724
725           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
726           <input type="hidden" name="branch" value="[% branch %]" />
727           <input type="hidden" name="print" value="maybe" />
728           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
729                 [% IF ( CHARGES ) %]
730                         <input type="hidden" name="charges" value="yes" />
731                         <input type="hidden" name="oldamount" value="[% amountold %]" />
732                 [% END %]
733 </fieldset>
734 [% IF ( issue ) %]
735     <div class="lastchecked">
736         <p><strong>Checked out: </strong>[% issue.item.biblioitemnumber.biblionumber.title %] ([% issue.item.barcode %]). Due on [% issue.date_due | $KohaDates %]</p>
737     </div>
738 [% END %]
739 </form></div>
740
741 [% END %]<!-- /unless noissues -->
742
743 [% IF ( noissues ) %]
744     [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
745         <div class="yui-u">
746     [% ELSE %]
747         <div>
748     [% END %]
749 [% ELSE %]
750     <div class="yui-u">
751 [% END %]
752
753         [% IF ( noissues ) %]
754             [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
755                 <div id="circmessages" class="circmessage attention">
756             [% ELSE %]
757                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
758                 <div id="circmessages" class="circmessage warning">
759             [% END %]
760             <h3>
761                 Cannot check out!
762                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
763                     <span class="circ-hlt">Only on-site checkouts are allowed</span>
764                 [% END %]
765             </h3>
766         [% ELSE %]
767             <div id="circmessages" class="circmessage attention">
768                 <h3>Attention:</h3>
769         [% END %]
770
771                 <ul>
772
773                    [% IF ( has_modifications ) %]
774                     <li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
775                             [% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
776                                     <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
777                             [% END %]
778                    </li>
779                   [% END %]
780
781                         [% IF ( warndeparture ) %]
782                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
783             Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
784
785                         </li>
786                         [% END %]
787
788                         [% IF ( returnbeforeexpiry ) %]
789                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
790                          expiry date is before the date due, the date due will be set to the expiry date
791                          </li>
792                         [% END %]
793
794                         [% IF ( expired ) %]
795                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
796             [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
797
798                         </li>
799                         [% END %]
800
801             [% IF ( gna ) %]
802                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
803                         [% END %]
804
805             [% IF ( lost ) %]
806                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
807                         [% END %]
808
809             [% IF ( userdebarred ) %]
810                <li class="blocker">
811                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
812
813                    [% IF ( userdebarreddate ) %]
814                        until [% userdebarreddate | $KohaDates %]
815                    [% END %]
816
817                    [% IF ( debarredcomment ) %]
818                        with the explanation: <br/><i>
819                            [% IF debarredcomment.search('OVERDUES_PROCESS') %]
820                                Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
821                            [% ELSE %]
822                                [% debarredcomment | html_line_break %]
823                            [% END %]
824                     </i>
825                    [% END %]
826                    <br/>
827                    <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
828                     [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
829                         <span class="override_debarment">
830                             <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
831                         </span>
832                     [% END %]
833                </li>
834             [% END %]
835
836                 [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
837             [% END %]
838
839             [% IF ( charges ) %]
840                 [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
841             [% END %]
842
843             [% IF ( charges_guarantees ) %]
844                 <li>
845                     <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
846                         [% IF ( charges_guarantees_is_blocker ) %]
847                             <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
848                         [% END %]
849                 </li>
850             [% END %]
851
852
853             [% IF ( credits ) %]
854                 <li>
855                     <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
856                 </li>
857             [% END %]
858
859                         </ul>
860         </div>
861
862             [% IF WaitingHolds.count %]
863                 <div id="holdswaiting" class="circmessage">
864                     <h4>Holds waiting:</h4>
865                     [% FOREACH w IN WaitingHolds %]
866                         <ul>
867                             <li>
868                                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a>
869                                 ([% ItemTypes.GetDescription( w.item.effective_itemtype ) %]),
870                                 [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
871                                 [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %]
872                                 Hold placed on [% w.reservedate | $KohaDates %].
873
874                                 <br/>
875                                 [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
876                                     [% SET expires_on = w.expirationdate %]
877                                     Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
878                                 </strong>
879                             </li>
880                         </ul>
881                     [% END %]
882                 </div>
883             [% END %]
884
885         [% IF ( notes ) %]
886                         <div id="circnotes" class="circmessage">
887                         <h4>Notes:</h4>
888             <p><span class="circ-hlt">[% notesmsg %]</span></p>
889                         </div>
890
891
892     <!-- /If notes -->[% END %]
893
894     <div id="messages" class="circmessage">
895         <h4>Messages:</h4>
896         <ul>
897             [% FOREACH message IN messages %]
898                 <li>
899                     [% IF(message.message_type == "L") %]
900                         <span class="circ-hlt">
901                     [% ELSE %]
902                         <span>
903                     [% END %]
904                         [% message.message_date | $KohaDates %]
905                         [% Branches.GetName( message.branchcode ) %]
906                         [% IF message.manager_id %]
907                             ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
908                         [% END %]
909                         <i>"[% message.message | html %]"</i>
910                     </span>
911                     [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
912                         <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
913                     [% END %]
914                 </li>
915             [% END %]
916         </ul>
917         <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
918     </div>
919
920 </div>
921 </div>
922
923 <div class="yui-g"><div id="patronlists" class="toptabs">
924
925 <ul>
926     <li>
927         [% IF ( issuecount ) %]
928             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
929         [% ELSE %]
930             <a href="#checkouts">0 Checkouts</a>
931         [% END %]
932     </li>
933
934     [% IF relatives_issues_count %]
935         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
936     [% END %]
937
938     <li>
939         [% IF ( holds_count ) %]
940             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
941         [% ELSE %]
942             <a href="#reserves" id="holds-tab">0 Holds</a>
943         [% END %]
944     </li>
945
946     [% IF Koha.Preference('ArticleRequests') %]
947         <li>
948             <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
949         </li>
950     [% END %]
951
952     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count %] Restrictions</a></li>
953
954     [% SET enrollments = patron.get_club_enrollments(1) %]
955     [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
956     [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
957         <li>
958             <a id="clubs-tab-link" href="#clubs-tab">
959                 Clubs ([% enrollments.count %]/[% enrollable.count %])
960             </a>
961         </li>
962     [% END %]
963
964 </ul>
965
966 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
967
968 [% INCLUDE "checkouts-table.inc" %]
969
970 [% IF ( relatives_issues_count ) %]
971     <div id="relatives-issues">
972         <table id="relatives-issues-table">
973             <thead>
974                 <tr>
975                     <th scope="col">Due date (unformatted, hidden)</th>
976                     <th scope="col">Due date</th>
977                     <th scope="col">Title</th>
978                     <th scope="col">Item type</th>
979                     <th scope="col">Location</th>
980                     <th scope="col">Checked out on</th>
981                     <th scope="col">Checked out from</th>
982                     <th scope="col">Call no</th>
983                     <th scope="col">Charge</th>
984                     <th scope="col">Fine</th>
985                     <th scope="col">Price</th>
986                     <th scope="col">Patron</th>
987                 </tr>
988             </thead>
989         </table>
990     </div>
991 [% END %]
992
993 [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
994     <div id="clubs-tab">
995         Loading...
996     </div>
997 [% END %]
998
999 [% INCLUDE borrower_debarments.inc %]
1000
1001 <div id="reserves">
1002 [% IF ( holds_count ) %]
1003     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
1004         <input type="hidden" name="from" value="circ" />
1005         <table id="holds-table" style="width: 100% !Important;">
1006             <thead>
1007                 <tr>
1008                     <th>Hold date</th>
1009                     <th>Title</th>
1010                     <th>Call number</th>
1011                     <th>Barcode</th>
1012                     <th>Pickup at</th>
1013                     <th>Expiration</th>
1014                     <th>Priority</th>
1015                     <th>Cancel?</th>
1016                     <th>Suspend?</th>
1017                 </tr>
1018             </thead>
1019         </table>
1020
1021         <fieldset class="action">
1022             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
1023         </fieldset>
1024     </form>
1025
1026     [% IF Koha.Preference('SuspendHoldsIntranet') %]
1027     <fieldset class="action">
1028         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1029             <input type="hidden" name="from" value="circ" />
1030             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1031             <input type="submit" value="Suspend all holds" />
1032
1033             [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
1034             <label for="suspend_until">until</label>
1035             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker"/>
1036             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
1037              [% END %]
1038         </form>
1039     </fieldset>
1040
1041     <fieldset class="action">
1042         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1043             <input type="hidden" name="from" value="circ" />
1044             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1045             <input type="hidden" name="suspend" value="0" />
1046             <input type="submit" value="Resume all suspended holds" />
1047         </form>
1048     </fieldset>
1049     [% END # IF SuspendHoldsIntranet %]
1050
1051 [% ELSE %]
1052         <p>Patron has nothing on hold.</p>
1053 [% END %]
1054 </div> <!-- reservesloop -->
1055
1056 [% IF Koha.Preference('ArticleRequests') %]
1057     [% INCLUDE 'patron-article-requests.inc' %]
1058 [% END %]
1059
1060 [% ELSIF borrowernumber %]
1061     <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
1062 [% END %] <!-- borrowernumber and borrower-->
1063 </div></div>
1064 [% END %]
1065 [% IF Koha.Preference('CircSidebar') %]
1066 [% UNLESS ( borrowers ) %]
1067     [% IF not( borrowernumber and borrower ) %]
1068         <div class="yui-b noprint">
1069             [% INCLUDE 'circ-nav.inc' %]
1070         </div>
1071     [% END %]
1072 [% END %]
1073 [% END %]
1074 </div>
1075 </div>
1076 [% UNLESS ( borrowers ) %]
1077     [% IF borrowernumber and borrower %]
1078         <div class="yui-b">
1079             [% INCLUDE 'circ-menu.inc' %]
1080         </div>
1081     [% END %]
1082 [% END %]
1083 </div>
1084 <!-- Modal -->
1085 <div id="barcodeSubmittedModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
1086     <div class="modal-dialog">
1087     <div class="modal-content">
1088     <div class="modal-header">
1089         <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
1090     </div>
1091
1092     <div class="modal-body">
1093         <p>You have already submitted a barcode, please wait for the checkout to process...</p>
1094     </div>
1095     </div>
1096     </div>
1097 </div>
1098 [% INCLUDE 'intranet-bottom.inc' %]