Bug 13408: Tell librarians they may continue scanning while checkouts table is loading
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
5    [% SET exports_enabled = 1 %]
6 [% END %]
7 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 [% SET destination = "circ" %]
10 <title>Koha &rsaquo; Circulation
11 [% IF borrowernumber %]
12   &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
13 [% END %]
14 </title>
15 [% INCLUDE 'doc-head-close.inc' %]
16 [% INCLUDE 'calendar.inc' %]
17
18 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
19 [% INCLUDE 'strings.inc' %]
20 [% INCLUDE 'datatables.inc' %]
21 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
22 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
23 [% INCLUDE 'timepicker.inc' %]
24 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
25 <script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
26 <script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
27 <script type="text/javascript" src="[% themelang %]/js/holds.js"></script>
28 <script type="text/javascript">
29 //<![CDATA[
30 /* Set some variable needed in circulation.js */
31 var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
32 var interface = "[% interface %]";
33 var theme = "[% theme %]";
34 var borrowernumber = "[% borrowernumber %]";
35 var branchcode = "[% branch %]";
36 var exports_enabled = "[% exports_enabled %]";
37 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && AllowRenewalLimitOverride)? 1: 0 %];
38 var script = "circulation";
39 var relatives_borrowernumbers = new Array();
40 [% FOREACH b IN relatives_borrowernumbers %]
41     relatives_borrowernumbers.push("[% b %]");
42 [% END %]
43
44 var MSG_ADD_MESSAGE = _("Add a new message");
45 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
46 [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
47 [% UNLESS ( borrowernumber ) %][% UNLESS ( selectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
48
49 // On-site checkout
50 function toggle_onsite_checkout(){
51     if ( $("#onsite_checkout").attr('checked') ) {
52         $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
53         $("#duedatespec").datetimepicker('destroy');
54     } else {
55         $("#duedatespec").datetimepicker({
56             onClose: function(dateText, inst) { $("#barcode").focus(); },
57             hour: 23,
58             minute: 59
59         });
60     }
61 }
62
63 $(document).ready(function() {
64     $('#mainform').on('submit',function() {
65         $('#barcode').on('keypress',function(event) {
66             $('#barcodeSubmittedModal').modal();
67             event.preventDefault(); }
68         );
69     });
70
71
72     [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
73         // listen submit to trigger qslip on empty checkout
74         $('#mainform').bind('submit',function() {
75             if ($('#barcode').val() == '') {
76                 return printx_window( '[% CircAutoPrintQuickSlip %]' );
77             }
78         });
79     [% END %]
80     toggle_onsite_checkout();
81     $("#onsite_checkout").click(function(){
82         toggle_onsite_checkout();
83     });
84 });
85
86 //]]>
87 </script>
88 </head>
89 <body id="circ_circulation" class="circ">
90
91 [% INCLUDE 'header.inc' %]
92 [% INCLUDE 'circ-search.inc' %]
93
94 <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;
95 [% IF ( borrowernumber ) %]
96     <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
97 [% ELSE %]
98     <strong>Checkouts</strong>
99 [% END %]
100 </div>
101 [% IF ( selectborrower ) %]
102 <div id="doc" class="yui-t7">
103
104    <div id="bd">
105         <div id="yui-main">
106         <div class="yui-g">
107 [% ELSE %]
108 <div id="doc3" class="yui-t2">
109
110    <div id="bd">
111         <div id="yui-main">
112         <div class="yui-b">
113 [% END %]
114
115 [% IF ( borrowernumber ) %]
116 [% INCLUDE 'members-toolbar.inc' %]
117 [% END %]
118
119 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
120 <div style="display: none;" id="add_message_form">
121 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
122 <fieldset id="borrower_messages" class="brief">
123 <legend>Leave a message</legend>
124         <ol>
125     <li>
126             <label for="message_type">Add a message for:</label>
127           <select name="message_type" id="message_type">
128             <option value="L">Other librarians</option>
129             <option value="B">[% firstname %]</option>
130         </select>
131     </li>
132     [% IF ( canned_bor_notes_loop ) %]
133         <li>
134                 <label for="type">Predefined notes: </label>
135                 <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
136                     <option value="">Select note</option>
137                     [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
138                     <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
139                     [% END %]
140                 </select>
141         </li>
142     [% END %]
143     <li>
144         <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
145     </li>
146         </ol>
147     <fieldset class="action">
148         <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
149     </fieldset>
150
151         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
152         <input type="hidden" name="branchcode" value="[% branch %]" />
153 </fieldset>
154 </form>
155 </div>
156
157 [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %]
158
159 [% IF additional_materials %]
160     <div id="materials" class="dialog message">Note about the accompanying materials: <br />
161     [% additional_materials %]
162     </div>
163 [% END %]
164
165 [% IF ( alert.ITEM_LOST ) %]
166     <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
167 [% END %]
168
169 [% IF ( alert.OTHER_CHARGES ) %]
170     <div class="dialog message">The patron has unpaid charges for reserves, rentals etc of [% alert.OTHER_CHARGES %]</div>
171 [% END %]
172
173 [% IF ( NEEDSCONFIRMATION ) %]
174 <div class="yui-g">
175
176 <div id="circ_needsconfirmation" class="dialog alert">
177 [% IF CAN_user_circulate_force_checkout %]
178   <h3>Please confirm checkout</h3>
179 [% ELSE %]
180   <h3>Cannot check out</h3>
181 [% END %]
182
183 <ul>
184 [%IF ( AGE_RESTRICTION ) %]
185     <li>Age restriction [% AGE_RESTRICTION %].
186       [% IF CAN_user_circulate_force_checkout %]
187         Check out anyway?
188       [% END %]
189     </li>
190 [% END %]
191
192 [% IF ( DEBT ) %]
193     <li>The patron has a debt of [% DEBT %].</li>
194 [% END %]
195
196 [% IF ( RENTALCHARGE > 0 ) %]
197     <li>Rental charge for this item: [% RENTALCHARGE %]</li>
198 [% END %]
199
200 [% IF ( RENEW_ISSUE ) %]
201     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
202 [% END %]
203
204 [% IF ( RESERVE_WAITING ) %]
205     <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 [% resbranchname %] since [% reswaitingdate %]</li>
206 [% END %]
207
208 [% IF ( RESERVED ) %]
209     <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 [% resbranchname %] since [% resreservedate %]</li>
210 [% END %]
211
212 [% IF ( ISSUED_TO_ANOTHER ) %]
213     <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 %]).
214       [% IF CAN_user_circulate_force_checkout %]
215         Check in and check out?
216       [% END %]
217     </li>
218 [% END %]
219
220 [% IF ( TOO_MANY ) %]
221     <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
222 [% END %]
223
224 [% IF ( BORRNOTSAMEBRANCH ) %]
225     <li>This patrons is from a different library ([% BORRNOTSAMEBRANCH %])</li>
226 [% END %]
227
228 [% IF ( PATRON_CANT ) %]
229     <li>This patron can't check out this item per library circulation policy</li>
230 [% END %]
231
232 [% IF ( NOT_FOR_LOAN_FORCING ) %]
233     <li>
234     [% IF ( itemtype_notforloan ) %]
235         Item type is normally not for loan.
236     [% ELSIF ( item_notforloan ) %]
237         [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
238         Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
239     [% END %]
240       [% IF CAN_user_circulate_force_checkout %]
241         Check out anyway?
242       [% END %]
243     </li>
244 [% END %]
245
246 [% IF ( USERBLOCKEDOVERDUE ) %]
247     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
248       [% IF CAN_user_circulate_force_checkout %]
249        Check out anyway?
250       [% END %]
251     </li>
252 [% END %]
253
254 [% IF ( ITEM_LOST ) %]
255     <li>This item has been lost with a status of "[% ITEM_LOST %]".
256       [% IF CAN_user_circulate_force_checkout %]
257         Check out anyway?
258       [% END %]
259     </li>
260 [% END %]
261
262 [% IF  HIGHHOLDS %]
263     <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
264 [% END %]
265
266 [% IF BIBLIO_ALREADY_ISSUED %]
267   <li>
268     Patron has already checked out another item from this record.
269     [% IF CAN_user_circulate_force_checkout %]
270       Check out anyway?
271     [% END %]
272   </li>
273 [% END %]
274 </ul>
275
276 [% IF HIGHHOLDS %]
277         <script language="JavaScript" type="text/javascript">
278         $(document).ready(function() {
279                 $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
280         });
281         </script>
282 [% END %]
283
284 [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
285 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
286
287 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
288
289 [% IF ( RESERVED ) %]
290     <p>
291     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
292     <label for="cancelreserve">Cancel hold</label>
293     </p>
294 [% END %]
295
296 [% IF ( RESERVE_WAITING ) %]
297 <p>
298     <label for="cancelreserve">Cancel hold</label>
299     <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
300     <label for="revertreserve">Revert waiting status</label>
301     <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
302 </p>
303 [% END %]
304
305     <input type="hidden" name="barcode" value="[% barcode |html %]" />
306     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
307     <input type="hidden" name="issueconfirmed" value="1" />
308     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
309     [% IF ( INVALID_DATE ) %]
310     <p>
311     <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
312     <label for="duedatespec">Due date</label>
313     </p>
314     [% ELSE %]
315     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
316     [% END %]
317     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
318     <input type="hidden" name="branch" value="[% branch %]" />
319     [% IF ( RENEW_ISSUE ) %]
320     <input type="submit" class="approve" value="Yes, renew (Y)" accesskey="y" />
321     [% ELSE %]
322     <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
323     [% END %]
324     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
325 </form>
326 [% END %]
327
328 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
329     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
330     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
331     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
332     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
333     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
334         [% IF ( RENEW_ISSUE ) %]
335         <input type="submit" class="deny" value="No, don't renew (N)" accesskey="n" />
336         [% ELSE %]
337         <input type="submit" class="deny" value="No, don't check out (N)" accesskey="n" />
338         [% END %]
339     [% ELSE %]
340         <input type="submit" class="deny" value="Continue" />
341     [% END %]
342 </form>
343
344 </div></div>
345 [% END %] <!-- NEEDSCONFIRMATION -->
346
347         [% IF ( IMPOSSIBLE ) %]
348
349 [% IF ( soundon ) %]
350 <audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
351 [% END %]        
352
353 <div class="yui-g">
354 <div id="circ_impossible" class="dialog alert">
355 <!-- RESULT OF ISSUING REQUEST -->
356         <ul>
357         [% IF ( STATS ) %]
358             <li>Local use recorded</li>
359         [% END %]
360
361         [% IF ( INVALID_DATE ) %]
362             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
363         [% END %]
364
365         [% IF ( UNKNOWN_BARCODE ) %]
366             <li>The barcode was not found [% barcode |html %]
367             [% IF ( fast_cataloging ) %]
368                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
369             <a 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 %]">Fast cataloging</a>
370                 [% END %]
371             [% END %]
372
373         [% IF ( FALLBACK ) %]
374             [% IF options %]
375                 <br />The following items were found by searching:
376                 [% FOREACH book IN options %]
377                     <br />
378                     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
379                     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
380                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
381                         <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
382                         <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
383                         <input type="hidden" name="branch" value="[% branch %]" />
384                         <input type="hidden" name="barcode" value="[% book.barcode %]" />
385                         <input type="submit" name="x" value="Check out [% book.barcode %]: [% book.title %]" />
386                     </form>
387                 [% END %]
388             [% ELSE %]
389                 <br />No items were found by searching.
390             [% END %]
391         [% END %]
392
393      </li>
394         [% END %]
395
396         [% IF ( NOT_FOR_LOAN ) %]
397             <li>
398             [% IF ( itemtype_notforloan ) %]
399                 Item type not for loan.
400             [% ELSIF ( item_notforloan ) %]
401                 [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
402                 Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
403             [% END %]
404             </li>
405         [% END %]
406
407         [% IF ( WTHDRAWN ) %]
408             <li>Item has been withdrawn</li>
409         [% END %]
410
411         [% IF ( RESTRICTED ) %]
412             <li>Item is restricted</li>
413         [% END %]
414
415         [% IF ( GNA ) %]
416             <li>Patron's address is in doubt</li>
417         [% END %]
418
419         [% IF ( CARD_LOST ) %]
420             <li>Patron's card is lost</li>
421         [% END %]
422
423         [% IF ( DEBARRED ) %]
424             <li>Patron is restricted</li>
425         [% END %]
426
427         [% IF ( NO_MORE_RENEWALS ) %]
428             <li>No more renewals possible</li>
429         [% END %]
430
431         [%IF ( AGE_RESTRICTION ) %]
432             <li>Age restriction [% AGE_RESTRICTION %].</li>
433         [% END %]
434
435         [% IF ( EXPIRED ) %]
436             <li>Patron's card is expired</li>
437         [% END %]
438
439         [% IF ( TOO_MANY ) %]
440             <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
441         [% END %]
442
443         [% IF ( ITEMNOTSAMEBRANCH ) %]
444             <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
445         [% END %]
446
447         [% IF ( USERBLOCKEDWITHENDDATE ) %]
448             <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
449         [% END %]
450
451         [% IF ( USERBLOCKEDNOENDDATE ) %]
452             <li>Patron has an indefinite restriction.</li>
453         [% END %]
454
455         [% IF ( USERBLOCKEDOVERDUE ) %]
456             <li>Checkouts are BLOCKED because patron has overdue items.</li>
457         [% END %]
458         </ul>
459
460         [% IF (forceallow) %]
461             <li>Restriction overridden temporarily.</li>
462         [% END %]
463
464 </div></div>
465 [% ELSE %]
466 [% IF ( soundon ) %]
467 <audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
468 [% END %]
469
470   [% IF (forceallow) %]
471       <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
472   [% END %]
473
474     [% END %] <!-- /impossible -->
475
476 [% IF ( issued ) %]
477 <p>Item checked out</p>
478 [% END %]
479
480 [% IF ( message ) %]
481 [% INCLUDE 'patron-toolbar.inc' %]
482 <h4>
483 No patron matched <span class="ex">[% message %]</span>
484 </h4>
485 [% END %]
486
487
488 [% IF ( selectborrower ) %]
489 [% INCLUDE 'patron-toolbar.inc' %]
490
491 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
492 <fieldset id="circ_circulation_selectborrower" class="brief">
493     <legend>Patron selection</legend>
494
495 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
496     <input type="hidden" name="branch" value="[% branch %]" />
497     <input type="hidden" name="printer" value="[% printer %]" />
498     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
499     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
500
501 <ol>    <li>
502     <label for="borrowernumber">Select a patron: </label>
503     <select name="borrowernumber" id="borrowernumber" size="7" class="focus" ondblclick="document.forms['mainform'].submit()">
504         [% FOREACH borrower IN selectborrower.values %]
505         <option value="[% borrower %]">[% selectborrower.labels.$borrower %]</option>
506         [% END %]
507     </select>
508     </li>
509 </ol>
510 <p><input type="submit" value="Select" /></p>
511 </fieldset>
512 </form>
513 [% ELSE %] <!-- selectborrower -->
514
515 <!-- BARCODE ENTRY -->
516
517 [% IF ( borrowernumber ) %]
518 <div class="yui-g">
519 [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
520 [% IF ( flagged ) %]
521 <div class="yui-u first">
522 [% ELSE %]
523 <div>
524
525 [% END %]
526
527
528 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
529 <fieldset id="circ_circulation_issue">
530     [% IF ( DisplayClearScreenButton ) %]
531         <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
532     [% END %]
533
534     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
535
536     <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
537
538         <div class="hint">Enter item barcode:</div>
539
540     [% IF NEEDSCONFIRMATION %]
541         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
542     [% ELSE %]
543         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
544     [% END %]
545     <button type="submit" class="btn">Check out</button>
546
547     <div class="date-select">
548         [% IF NEEDSCONFIRMATION %]
549             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
550         [% ELSE %]
551             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" />
552         [% END %]
553         <label for="auto_renew">Automatic renewal</label>
554     </div>
555
556     [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
557         [% IF ( SpecifyDueDate ) %]
558             <div class="date-select">
559                 <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
560                 [% IF ( duedatespec ) %]
561                     <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
562                 [% ELSE %]
563                     <input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
564                 [% END %]
565                 <label for="stickyduedate"> Remember for session:</label>
566                 [% IF ( stickyduedate ) %]
567                     <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
568                 [% ELSE %]
569                     <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
570                 [% END %]
571                 <button class="btn btn-small 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>
572             </div>
573         [% END %]
574     [% END %]
575
576     [% IF Koha.Preference('OnSiteCheckouts') %]
577         <div class="onsite_checkout-select">
578             [% IF noissues %]
579                 <div class="onsite-checkout-only">
580                     <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>
581                     <input type="text" name="duedatespec" id="duedatespec" readonly="readonly" />
582                     <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
583                 </div>
584             [% ELSE %]
585                 <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
586             [% END %]
587         </div>
588     [% END %]
589
590           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
591           <input type="hidden" name="branch" value="[% branch %]" />
592           <input type="hidden" name="printer" value="[% printer %]" />
593           <input type="hidden" name="print" value="maybe" />
594           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
595                 [% IF ( CHARGES ) %]
596                         <input type="hidden" name="charges" value="yes" />
597                         <input type="hidden" name="oldamount" value="[% amountold %]" />
598                 [% END %]
599 </fieldset>
600 </form></div>[% END %]<!-- /unless noissues -->
601
602 [% IF ( noissues ) %]
603     [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
604         <div class="yui-u">
605     [% ELSE %]
606         <div>
607     [% END %]
608 [% ELSE %]
609     <div class="yui-u">
610 [% END %]
611
612     [% IF flagged %]
613         [% IF ( noissues ) %]
614             [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
615                 <div id="circmessages" class="circmessage attention">
616             [% ELSE %]
617                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
618                 <div id="circmessages" class="circmessage warning">
619             [% END %]
620             <h3>
621                 Cannot check out!
622                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
623                     <span class="circ-hlt">Only on-site checkouts are allowed</span>
624                 [% END %]
625             </h3>
626         [% ELSE %]
627             <div id="circmessages" class="circmessage attention">
628                 <h3>Attention:</h3>
629         [% END %]
630
631                 <ul>
632
633                         [% IF ( warndeparture ) %]
634                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
635                         Patron's card expires on [% expiry %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&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>
636
637                         </li>
638                         [% END %]
639
640                         [% IF ( returnbeforeexpiry ) %]
641                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
642                          expiry date is before the date due, the date due will be set to the expiry date
643                          </li>
644                         [% END %]
645
646                         [% IF ( expired ) %]
647                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
648                         [% IF ( expiry ) %]Patron's card expired on [% expiry %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&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>
649
650                         </li>
651                         [% END %]
652
653             [% IF ( gna ) %]
654                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
655                         [% END %]
656
657             [% IF ( lost ) %]
658                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
659                         [% END %]
660
661             [% IF ( userdebarred ) %]
662                <li class="blocker">
663                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
664
665                    [% IF ( userdebarreddate ) %]
666                        until [% userdebarreddate %]
667                    [% END %]
668
669                    [% IF ( debarredcomment ) %]
670                        with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
671                    [% END %]
672
673                    <br/>
674                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
675                     [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
676                         <span class="override_debarment">
677                             <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override restriction temporarily</a>
678                         </span>
679                     [% END %]
680                </li>
681             [% END %]
682
683                 [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
684             [% END %]
685
686                 [% IF ( charges ) %]
687                             <li>
688             <span class="circ-hlt">Fees &amp; Charges:</span> Patron has  <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">Outstanding fees &amp; charges[% IF ( chargesamount ) %] of [% chargesamount %][% END %]</a>.
689                 [% IF ( charges_is_blocker ) %]
690                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
691                 [% END %]
692             <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
693                         [% END %]
694
695                 [% IF ( credits ) %]
696                         <li>
697                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
698             </li>
699                         [% END %]
700
701
702
703                         </ul>
704         </div>
705
706                         [% IF ( WaitingReserveLoop ) %]
707                         <div id="holdswaiting" class="circmessage">
708                     <h4>Holds waiting:</h4>
709                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
710                                     <ul>
711                                         <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title |html %]</a> ([% WaitingReserveLoo.itemtype %]), [% IF ( WaitingReserveLoo.author ) %]by [% WaitingReserveLoo.author %][% END %] [% IF ( WaitingReserveLoo.itemcallnumber ) %][[% WaitingReserveLoo.itemcallnumber %]] [% END %]Hold placed on [% WaitingReserveLoo.reservedate %].
712                                     [% IF ( WaitingReserveLoo.waitingat ) %]
713                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
714                                     [% END %]
715                                         </li>
716                                     </ul>
717                             [% END %]
718                         </div>
719                         <!-- /If WaitingReserveLoop -->[% END %]
720         [% IF ( notes ) %]
721                         <div id="circnotes" class="circmessage">
722                         <h4>Notes:</h4>
723             <p><span class="circ-hlt">[% notesmsg %]</span></p>
724                         </div>
725
726
727     <!-- /If notes -->[% END %]
728
729         <div id="messages" class="circmessage">
730                 <h4>Messages:</h4>
731                 <ul>
732                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
733                                 <li>
734                                         <span class="circ-hlt">
735                                                 [% lib_messages_loo.message_date_formatted %]
736                                                 [% lib_messages_loo.branchcode %]
737                                                 <i>"[% lib_messages_loo.message %]"</i>
738                                         </span>
739                                         [% IF ( lib_messages_loo.can_delete ) %]
740                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
741                                         [% ELSE %]
742                                                 [% IF ( all_messages_del ) %]
743                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
744                                                 [% END %]
745                                         [% END %]
746                                 </li>
747                         [% END %]
748                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
749                                 <li><span class="">[% bor_messages_loo.message_date_formatted %] [% bor_messages_loo.branchcode %] <i>"[% bor_messages_loo.message %]"</i></span> [% IF ( bor_messages_loo.can_delete ) %]<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
750                 [% ELSIF ( all_messages_del ) %]
751                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
752                 [% END %]</li>
753                         [% END %]
754
755                 </ul>
756         </div>  
757         
758      <!-- /If flagged -->[% END %]
759
760         
761
762 </div>
763 </div>
764
765 <div class="yui-g"><div id="patronlists" class="toptabs">
766
767 <ul>
768     <li>
769         [% IF ( issuecount ) %]
770             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
771         [% ELSE %]
772             <a href="#checkouts">0 Checkouts</a>
773         [% END %]
774     </li>
775
776     [% IF relatives_issues_count %]
777         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
778     [% END %]
779
780     <li>
781         [% IF ( holds_count ) %]
782             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
783         [% ELSE %]
784             <a href="#reserves" id="holds-tab">0 Holds</a>
785         [% END %]
786     </li>
787
788     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
789 </ul>
790
791 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
792
793 [% INCLUDE "checkouts-table.inc" %]
794
795 [% IF ( relatives_issues_count ) %]
796     <div id="relatives-issues">
797         <table id="relatives-issues-table">
798             <thead>
799                 <tr>
800                     <th scope="col">Due date (unformatted, hidden)</th>
801                     <th scope="col">Due date</th>
802                     <th scope="col">Title</th>
803                     <th scope="col">Item type</th>
804                     <th scope="col">Checked out on</th>
805                     <th scope="col">Checked out from</th>
806                     <th scope="col">Call no</th>
807                     <th scope="col">Charge</th>
808                     <th scope="col">Price</th>
809                     <th scope="col">Patron</th>
810                 </tr>
811             </thead>
812         </table>
813     </div>
814 [% END %]
815
816 [% INCLUDE borrower_debarments.inc %]
817
818 <div id="reserves">
819 [% IF ( holds_count ) %]
820     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
821         <input type="hidden" name="from" value="circ" />
822         <table id="holds-table" style="width: 100% !Important;">
823             <thead>
824                 <tr>
825                     <th>Hold date</th>
826                     <th>Title</th>
827                     <th>Call number</th>
828                     <th>Barcode</th>
829                     <th>Expiration</th>
830                     <th>Priority</th>
831                     <th>Delete?</th>
832                 </tr>
833             </thead>
834         </table>
835
836         <fieldset class="action">
837             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
838         </fieldset>
839     </form>
840
841     [% IF SuspendHoldsIntranet %]
842     <fieldset class="action">
843         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
844             <input type="hidden" name="from" value="circ" />
845             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
846             <input type="submit" value="Suspend all holds" />
847
848             [% IF AutoResumeSuspendedHolds %]
849             <label for="suspend_until">until</label>
850             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
851             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
852              [% END %]
853         </form>
854     </fieldset>
855
856     <fieldset class="action">
857         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
858             <input type="hidden" name="from" value="circ" />
859             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
860             <input type="hidden" name="suspend" value="0" />
861             <input type="submit" value="Resume all suspended holds" />
862         </form>
863     </fieldset>
864     [% END # IF SuspendHoldsIntranet %]
865
866 [% ELSE %]
867         <p>Patron has nothing on hold.</p>
868 [% END %]
869 </div> <!-- reservesloop -->
870
871 [% END %] <!-- borrowernumber -->
872 </div></div>
873 [% END %]
874
875
876
877 </div>
878 </div>
879 [% UNLESS ( selectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
880 [% INCLUDE 'circ-menu.inc' %]
881 </div>[% END %][% END %]
882 </div>
883 <!-- Modal -->
884 <div id="barcodeSubmittedModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
885     <div class="modal-header">
886         <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
887     </div>
888
889     <div class="modal-body">
890         <p>You have already submitted a barcode, please wait for the checkout to process...</p>
891     </div>
892 </div>
893 [% INCLUDE 'intranet-bottom.inc' %]