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