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