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