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