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