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