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