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