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