Bug 20959: Style checkin form more like the checkout form, with collapsed settings...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE Koha %]
6 [% USE Borrowers %]
7 [% USE ItemTypes %]
8 [% USE AuthorisedValues %]
9 [% USE ColumnsSettings %]
10 [% SET footerjs = 1 %]
11 [% BLOCK display_bormessagepref %]
12     [% IF ( bormessagepref ) %]
13         <li>Patron notification:
14             [% FOREACH mtt IN bormessagepref.keys %]
15                 [%~ IF ( mtt == 'email' ) %] Email[% END ~%]
16                 [%~ IF ( mtt == 'phone' ) %] Phone[% END ~%]
17                 [%~ IF ( mtt == 'sms' ) %] SMS[% END ~%]
18                 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
19             [% END %]
20         </li>
21            [% ELSE %]
22         <li>Patron is not notified.</li>
23     [% END %]
24 [% END %]
25
26 [% BLOCK display_holdpatron_address %]
27     [% IF Koha.Preference( 'AddressFormat' ) %]
28         [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
29     [% ELSE %]
30         [% INCLUDE 'member-display-address-style-us.inc' %]
31     [% END %]
32 [% END %]
33
34 [% INCLUDE 'doc-head-open.inc' %]
35 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title | html %]</title>
36 [% INCLUDE 'doc-head-close.inc' %]
37 </head>
38
39 <body id="circ_returns" class="circ">
40 <span class="audio-alert-success"></span>
41
42 [% INCLUDE 'header.inc' %]
43 [% INCLUDE 'checkin-search.inc' %]
44
45 <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; Check in</div>
46
47 <div class="main container-fluid">
48     <div class="row">
49         <div class="col-sm-12">
50             <main>
51                 <div class="row">
52
53                 [% IF Koha.Preference('CircSidebar') %]
54                     <div class="col-sm-10 col-sm-push-2">
55                 [% ELSE %]
56                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
57                 [% END %]
58
59     [% IF hold_auto_filled %]
60         <div class="dialog alert hold-auto-filled">
61             [% IF ( reservenotes ) %]
62                 <h4>Notes: [% reservenotes | html %]</h4>
63             [% END %]
64             <h3>Hold filled for:</h3>
65                 <li>
66                     [% INCLUDE 'patron-title.inc' patron=patron %]
67                     <span class="patron-category"> - [% patron.category.description | html %]</span>
68                 </li>
69
70                 [% INCLUDE display_holdpatron_address %]
71
72                 [% IF ( patron.phone ) %]
73                     <li>[% patron.phone | html %]</li>
74                 [% END %]
75
76                 [% IF ( patron.email ) %]
77                     <li>
78                         [% IF ( transfertodo ) %]
79                             [% patron.email | html %]
80                         [% ELSE %]
81                             <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
82                         [% END %]
83                     </li>
84                 [% END %]
85
86                 [% UNLESS ( transfertodo) %]
87                     [% INCLUDE display_bormessagepref %]
88                 [% END %]
89
90                 [% IF ( patron.debarred ) %]
91                     <li class="error">Patron is RESTRICTED</li>
92                 [% END %]
93
94                 [% IF ( patron.gonenoaddress ) %]
95                     <li class="error">Patron's address is in doubt</li>
96                 [% END %]
97
98             [% IF ( transfertodo ) %]
99                 <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
100             [% ELSE %]
101                 <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
102             [% END %]
103
104             <a href="#" class="btn btn-default print print-slip">
105                 <i class="fa fa-print"></i> Print
106             </a>
107         </div>
108     [% END %]
109
110 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
111     <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
112 [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
113     <div class="dialog alert"><strong>Error:</strong> The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.</div>
114 [% END %]
115
116 [% IF additional_materials %]
117     <div class="dialog message" id="materials">Note about the accompanying materials: <br />
118     [% additional_materials | html %]
119     </div>
120 [% END %]
121
122 [% IF ( collectionItemNeedsTransferred ) %]
123  <div id="rotating-collection" class="dialog message">
124         <h3>Please transfer item to: [% Branches.GetName( collectionBranch ) | html %]</h3>
125             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
126             <p>This item is part of a rotating collection.</p>
127             <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&amp;branchcode=[% collectionBranch | html %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
128 </div>
129 [% END %]
130
131 <!-- Patron has added an issue note -->
132 [% IF ( issue.note) %]
133     <div class="dialog message">
134         <h1>Patron note</h1>
135         <p>[% issue.notedate | $KohaDates %]</p>
136         <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber | uri %]"> [% title | html %]</a> [% author | html %]</p>
137         <p>[% issue.note | html %]</p>
138     </div>
139 [% END %]
140
141 <!-- Patron has fines -->
142 [% IF ( fines ) %]
143     <div class="dialog alert">
144         <h3>Patron has outstanding fines of [% fines | html %].</h3>
145         <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber | uri %]">Make payment</a>.</p>
146     </div>
147 [% END %]
148
149 <!-- Patron has waiting holds -->
150 [% IF ( waiting_holds ) %]
151     <div id="awaiting-pickup" class="dialog message">
152         <h3>[% holdsfirstname | html %] [% holdssurname | html %] has [% waiting_holds | html %] hold(s) waiting for pickup.</h3>
153         <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber | uri %]">Check out to this patron</a>.</p>
154     </div>
155 [% END %]
156
157 <!-- Patron is restricted and checkin was backdated -->
158 [% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
159     <div id="restricted_backdated" class="dialog message">
160         <h3>
161             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">
162                 [% patron.firstname | html %] [% patron.surname | html %]
163             </a>
164             is restricted. Please verify this patron should still be restricted.
165         </h3>
166     </div>
167 [% END %]
168
169 [% IF wrongbranch %]
170     <div id="wrong-branch-modal" class="modal fade audio-alert-action">
171         <div class="modal-dialog">
172             <div class="modal-content">
173                 <form method="post" action="returns.pl" name="mainform" id="mainform">
174                     <div class="modal-header">
175                         <h3>
176                             Cannot check in
177                         </h3>
178                     </div>
179                     <div class="modal-body">
180                         <p>
181                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
182                             [% itembarcode | html %]: [% title | html %]
183                         </a>
184                         </p>
185                         <p>
186                             <strong>
187                                 NOT CHECKED IN
188                             </strong>
189                         </p>
190                         <p>
191                             This item must be checked in at following library:
192                             <strong>
193                                 [% Branches.GetName( rightbranch ) | html %]
194                             </strong>
195                         </p>
196                     </div>
197                     <div class="modal-footer">
198                         <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
199                     </div>
200                 </form>
201             </div>
202         </div>
203     </div>
204 [% END %]
205
206 <!-- case of a mistake in transfer loop -->
207 [% IF WrongTransfer && !transfertodo %]
208     <div id="wrong-transfer-modal" class="modal fade audio-alert-action">
209         <div class="modal-dialog">
210             <div class="modal-content">
211                 <form method="post" action="returns.pl" name="mainform" id="mainform">
212                     <div class="modal-header">
213                         <h3>
214                             Please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]
215                         </h3>
216                     </div>
217                     <div class="modal-body">
218                         <p>
219                             <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
220                                 [% itembarcode | html %]: [% title | html %]
221                             </a>
222                         </p>
223                     </div>
224                     <div class="modal-footer">
225                         <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
226                         <button type="submit" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&amp;&amp;branchcode=[% TransferWaitingAt | html %]&amp;op=slip"><i class="fa fa-print"></i> Print transfer slip</button>
227                         <button class="btn btn-default deny cancel-transfer" type="submit"><i class="fa fa-times"></i> Cancel transfer</button>
228                         <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
229                         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
230                     </div>
231                 </form>
232             </div>
233         </div>
234     </div>
235 [% END %]
236
237 [% IF ( found ) %]
238     [% IF ( waiting ) %]
239         <div id="hold-found1" class="modal fade audio-alert-action">
240             <div class="modal-dialog">
241             <div class="modal-content">
242             <form method="post" action="returns.pl" class="confirm">
243                 <div class="modal-header">
244                     <h3>
245                         Hold found (item is already waiting):
246                         <br/>
247                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
248                             [% itembarcode | html %]: [% title | html %]
249                         </a>
250                     </h3>
251                 </div>
252
253                 <div class="modal-body">
254                     [% IF ( reservenotes ) %]
255                         <h4>Notes: [% reservenotes | html %]</h4>
256                     [% END %]
257
258                     <h4>Hold for:</h4>
259                     <ul>
260                     <li>
261                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.surname | html %], [% patron.firstname | html %]</a> ([% patron.cardnumber | html %])
262                         <span class="patron-category"> - [% patron.category.description | html %]</span>
263                     </li>
264                     [% INCLUDE display_holdpatron_address %]
265                     [% IF ( patron.phone ) %]
266                         <li> [% patron.phone | html %]</li>
267                     [% END %]
268
269                     [% IF ( patron.email ) %]
270                         <li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>
271                     [% END %]
272
273                     [% IF ( patron.debarred ) %]
274                         <li class="error">Patron is RESTRICTED</li>
275                     [% END %]
276
277                     [% IF ( patron.gonenoaddress ) %]
278                         <li class="error">Patron's address is in doubt</li>
279                     [% END %]
280                     </ul>
281
282                     [% IF ( transfertodo ) %]
283                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
284                     [% ELSE %]
285                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
286                     [% END %]
287
288                     [% FOREACH inputloo IN inputloop %]
289                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
290                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
291                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
292                     [% END %]
293
294                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
295                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
296                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
297                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
298                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
299                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
300                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
301                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
302
303                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
304                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
305                 </div>
306
307                 <div class="modal-footer">
308                     <input type="hidden" name="cancel_reserve" value="0" />
309
310                     <button type="submit" class="btn btn-default approve" data-dismiss="modal">
311                         <i class="fa fa-check"></i> Confirm hold
312                     </button>
313
314                     <input type="hidden" name="print_slip" value="0" />
315                     <button type="submit" class="btn btn-default print">
316                         <i class="fa fa-print"></i> Print slip and confirm
317                     </button>
318
319                     <button type="submit" class="btn btn-default deny cancel-hold">
320                         <i class="fa fa-times"></i> Cancel hold
321                     </button>
322                 </div>
323             </form>
324            </div>
325            </div>
326         </div>
327     [% END %]
328
329     [% IF ( diffbranch ) %]
330                 <!-- diffbranch -->
331         <div id="transfer-needed" class="dialog message audio-alert-action">
332             <h3>Hold needing transfer found</h3>
333                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
334                 <h4>Hold for: </h4>
335                     <ul>
336                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.surname | html %], [% patron.firstname | html %]</a> ([% patron.cardnumber | html %]) <span class="patron-category"> - [% patron.category.description | html %]</span> </li>
337                         [% INCLUDE display_holdpatron_address %]
338                         [% IF ( patron.phone ) %]<li>[% patron.phone | html %]</li>[% END %]
339                         [% IF ( patron.email ) %]<li>[% IF ( transfertodo ) %][% patron.email | html %][% ELSE %]<a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>[% END %]</li>[% END %]
340 [% IF ( patron.debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
341 [% IF ( patron.gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
342                     </ul>
343         [% IF ( transfertodo ) %]
344             <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
345         [% ELSE %]
346             <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
347         [% END %]
348
349         <form method="post" action="returns.pl" class="confirm">
350             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
351             <input type="hidden" name="print_slip" value="0" />
352             <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
353             <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
354             <button type="submit" class="print"><i class="fa fa-print"></i> Print slip and continue</button>
355             [% FOREACH inputloo IN inputloop %]
356                 <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
357                 <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
358                 <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
359             [% END %]
360             <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
361             <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
362             <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
363             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
364             <input type="hidden" name="barcode" value="0" />
365
366             <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
367             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
368         </form>
369                 </div>
370     [% END %]
371
372     [% IF transfer || needstransfer %]
373     <div id="item-transfer-modal" class="modal fade audio-alert-action">
374         <div class="modal-dialog">
375             <div class="modal-content">
376                 <form method="post" action="returns.pl" name="mainform" id="mainform">
377                     <div class="modal-header">
378                         <h3>
379                             Please return this item to [% Branches.GetName( returnbranch ) | html %]
380                         </h3>
381                     </div>
382                     <div class="modal-body">
383                         <p>
384                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
385                             [% itembarcode | html %]: [% title | html %]
386                         </a>
387                         </p>
388                         [% IF !transfer %]
389                         <p>
390                         Transfer now?
391                         </p>
392                         [% END %]
393                         <input type="hidden" name="tobranch" value="[% returnbranch | html %]" />
394                         <input type="hidden" name="transferitem" value="[% itemnumber | html %]" />
395                         <input type="hidden" name="barcode" value="0" />
396                     </div>
397                     <div class="modal-footer">
398                         [% IF !transfer %]
399                         <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve"><i class="fa fa-check"></i> Yes</button>
400                         <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&amp;&amp;branchcode=[% returnbranch | html %]&amp;op=slip"><i class="fa fa-print"></i> Yes, print slip</button><button type="submit" class="btn btn-default deny" name="notransfer" value="No"><i class="fa fa-times"></i> No</button>
401                         [% ELSE %]
402                         <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
403                         <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&amp;&amp;branchcode=[% returnbranch | html %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button>
404                         [% END %]
405                         <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
406                         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
407                         <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
408                         <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
409                         <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
410                         [% FOREACH inputloo IN inputloop %]
411                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
412                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
413                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
414                         [% END %]
415                     </div>
416                 </form>
417             </div>
418         </div>
419     </div>
420     [% END %]
421
422     [% IF ( diffbranch ) %]
423         <!-- diffbranch -->
424         <h3 class="audio-alert-action">Item consigned:</h3>
425         <table>
426         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a></caption>
427         <tr>
428             <th>Hold for:</th>
429             <td>[% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td>
430         </tr>
431         </table>
432         <form method="post" action="returns.pl"><input type="submit" value="OK" />
433             [% FOREACH inputloo IN inputloop %]
434                 [% UNLESS ( inputloo.first ) %]
435                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
436                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
437                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
438                 [% END %]
439             [% END %]
440
441             <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
442             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
443
444             <input type="hidden" name="barcode" value="0" />
445         </form>
446     [% END %]
447
448
449     <!-- case of simple return no issue or transfer but with a reservation  -->
450     [% IF ( reserved ) %]
451         <!--  reserved  -->
452         <div id="hold-found2" class="modal fade audio-alert-action">
453             <div class="modal-dialog">
454             <div class="modal-content">
455             <form method="post" action="returns.pl" class="confirm">
456                 <div class="modal-header">
457                     <h3>
458                         Hold found:
459                         <br/>
460                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
461                             [% itembarcode | html %]: [% title | html %]
462                         </a>
463                 </div>
464
465                 <div class="modal-body">
466                     [% IF ( reservenotes ) %]
467                         <h4>Notes: [% reservenotes | html %]</h4>
468                     [% END %]
469                     <h5>Hold for:</h5>
470                         <li>
471                             <td>[% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td>
472                             <span class="patron-category"> - [% patron.category.description | html %]</span>
473                         </li>
474
475                         [% INCLUDE display_holdpatron_address %]
476
477                         [% IF ( patron.phone ) %]
478                             <li>[% patron.phone | html %]</li>
479                         [% END %]
480
481                         [% IF ( patron.email ) %]
482                             <li>
483                                 [% IF ( transfertodo ) %]
484                                     [% patron.email | html %]
485                                 [% ELSE %]
486                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
487                                 [% END %]
488                             </li>
489                         [% END %]
490
491                         [% UNLESS ( transfertodo) %]
492                             [% INCLUDE display_bormessagepref %]
493                         [% END %]
494
495                         [% IF ( patron.debarred ) %]
496                             <li class="error">Patron is RESTRICTED</li>
497                         [% END %]
498
499                         [% IF ( patron.gonenoaddress ) %]
500                             <li class="error">Patron's address is in doubt</li>
501                         [% END %]
502
503                     [% IF ( transfertodo ) %]
504                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
505                     [% ELSE %]
506                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
507                     [% END %]
508
509                     <input type="hidden" name="print_slip" value="0" />
510
511
512                     [% FOREACH inputloo IN inputloop %]
513                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
514                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
515                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
516                     [% END %]
517
518                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
519                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
520                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
521                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
522                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
523                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
524                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
525                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
526                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
527                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
528                 </div>
529
530                 <div class="modal-footer">
531                     [% IF ( transfertodo ) %]
532                         <button type="submit" class="btn btn-default approve">
533                             <i class="fa fa-check"></i> Confirm hold and transfer
534                         </button>
535                         <button type="submit" class="btn btn-default print">
536                             <i class="fa fa-print"></i> Print slip, transfer, and confirm
537                         </button>
538                     [% ELSE %]
539                         <button type="submit" class="btn btn-default approve">
540                             <i class="fa fa-check"></i> Confirm hold
541                         </button>
542                         <button type="submit" class="btn btn-default print">
543                             <i class="fa fa-print"></i> Print slip and confirm
544                         </button>
545                     [% END %]
546
547                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny">
548                         <i class="fa fa-times"></i> Ignore
549                     </button>
550                 </div>
551             </form>
552             </div>
553             </div>
554         </div>
555     [% END %]
556 [% END %]
557
558 [% IF ( errmsgloop ) %]
559     <div class="dialog alert audio-alert-warning">
560         <h3>Check in message</h3>
561         [% IF itembiblionumber %]
562             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
563         [% END %]
564         [% FOREACH errmsgloo IN errmsgloop %]
565             [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
566                 <p class="problem">
567                     Not for loan status updated.
568                     <br />Old value:
569                     [% IF errmsgloo.NotForLoanStatusUpdated.from %]
570                         [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) | html %].
571                     [% ELSE %]
572                         Available for loan.
573                     [% END %]
574                     <br />New value:
575                     [% IF errmsgloo.NotForLoanStatusUpdated.to %]
576                         [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) | html %].
577                     [% ELSE %]
578                         Available for loan.
579                     [% END %]
580                 </p>
581             [% END %]
582             [% IF ( errmsgloo.ItemLocationUpdated ) %]
583                  <p class="problem">
584                      Item shelving location updated.
585                     <br />Old value:
586                     [% IF errmsgloo.ItemLocationUpdated.from %]
587                         [% IF errmsgloo.ItemLocationUpdated.from == '' %]
588                             empty
589                         [% ELSIF AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.from ) == '' %]
590                             [% errmsgloo.ItemLocationUpdated.from | html %] (No description available)
591                         [% ELSE %]
592                             [% AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.from ) | html %]
593                         [% END %]
594                     [% ELSE %]
595                         "Blank"
596                     [% END %]
597                     <br />New value:
598                     [% IF errmsgloo.ItemLocationUpdated.to %]
599                         [% IF errmsgloo.ItemLocationUpdated.to == '' %]
600                             empty
601                         [% ELSIF AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.to ) == '' %]
602                             [% errmsgloo.ItemLocationUpdated.to | html %] (Not an authorized value)
603                         [% ELSE %]
604                             [% AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.to ) | html %]
605                         [% END %]
606                     [% ELSE %]
607                         "Blank"
608                     [% END %]
609                  </p>
610             [% END %]
611             [% IF ( errmsgloo.badbarcode ) %]
612                 <p class="problem">No item with barcode: [% errmsgloo.msg | html %]</p>
613             [% END %]
614             [% IF ( errmsgloo.ispermanent ) %]
615                 <p class="problem">Please return item to: [% Branches.GetName( errmsgloo.msg ) | html %]</p>
616             [% END %]
617             [% IF ( errmsgloo.notissued ) %]
618                 <p class="problem">Not checked out.</p>
619             [% END %]
620             [% IF ( errmsgloo.localuse) %]
621                 <p class="problem">Local use recorded</p>
622             [% END %]
623             [% IF ( errmsgloo.waslost ) %]
624                 [% IF Koha.Preference('BlockReturnOfLostItems') %]
625                     <p class="problem">Item is lost, cannot be checked in.</p>
626                 [% ELSE %]
627                     <p class="problem">Item was lost, now found.</p>
628                 [% END %]
629                 [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
630                     <p class="problem">A refund has been applied to the borrowing patron's account.</p>
631                 [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
632                    <h5>Cannot check in</h5>
633                    <p><strong>NOT CHECKED IN</strong></p>
634                 [% ELSE %]
635                     <p class="problem">Any lost item fees for this item will remain on the patron's account.</p>
636                 [% END %]
637             [% END %]
638             [% IF ( errmsgloo.withdrawn ) %]
639                 [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %]
640                    <h5>Cannot check in</h5>
641                    <p><strong>NOT CHECKED IN</strong></p>
642                 [% END %]
643                <p class="problem">Item is withdrawn.</p>
644             [% END %]
645             [% IF ( errmsgloo.debarred ) %]
646                 <p class="problem"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber | uri %]">[% errmsgloo.debarname | html %]([% errmsgloo.debarcardnumber | html %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %].</p>
647             [% END %]
648             [% IF ( errmsgloo.prevdebarred ) %]
649                 <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
650             [% END %]
651             [% IF ( errmsgloo.foreverdebarred ) %]
652                 <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction.</p>
653             [% END %]
654
655             [% IF errmsgloo.data_corrupted %]
656                 <p class="problem">The item has not been checked in due to a configuration issue in your system. You must ask an administrator to take a look at the <a href="/cgi-bin/koha/about.pl#sysinfo">about page</a> and search for the "data problems" section</p>
657             [% END %]
658         [% END %]
659     </div>
660 [% END %]
661
662 [% IF ( checkinmsg ) %]
663     [% IF ( checkinmsgtype == 'alert' ) %]
664         <div class="dialog alert">
665     [% ELSE %]
666         <div class="dialog message">
667     [% END %]
668             <p class="problem">[% checkinmsg | html_line_break %]</p>
669         </div>
670 [% END%]
671
672     <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
673         <fieldset id="circ_returns_checkin">
674             <h3>Check in</h3>
675             <div class="row">
676         <div class="col-sm-6">
677             <div class="hint">Enter item barcode:</div>
678                 <div class="form-control-group">
679                     [% IF ( exemptfine ) %]
680                         <input name="barcode" id="barcode" size="14" class="focus input-warning" type="text" />
681                     [% ELSIF ( dropboxmode ) %]
682                         <input name="barcode" id="barcode" size="14" class="barcode focus input-warning" />
683                     [% ELSE %]
684                         <input name="barcode" id="barcode" size="14" class="barcode focus" />
685                     [% END %]
686                     <button type="submit" class="btn btn-default">Check in</button>
687                     [% FOREACH inputloo IN inputloop %]
688                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
689                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
690                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
691                     [% END %]
692                 </div>
693             <div id="show-circ-settings">
694                 <a href="#"><i class="fa circ-settings-icon fa-caret-down"></i> Checkin settings</a>
695             </div>
696         </div>
697         <div class="col-sm-6">
698             [% IF ( exemptfine ) %]
699                 <div id="exemptfines" class="checkin-active-setting">
700             [% ELSE %]
701                 <div id="exemptfines" class="checkin-active-setting" style="display:none;">
702             [% END %]
703                 <p><i class="fa fa-check"></i> Fines for returned items are forgiven.</p>
704             </div>
705
706             [% IF ( forgivemanualholdsexpire ) %]
707                 <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting">
708             [% ELSE %]
709                 <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting" style="display:none;">
710             [% END %]
711                     <p><i class="fa fa-check"></i> Fines are not charged for manually cancelled holds.</p>
712                 </div>
713
714                 [% IF ( dropboxmode ) %]
715                     <div id="dropboxmode" class="checkin-active-setting">
716                 [% ELSE %]
717                     <div id="dropboxmode" class="checkin-active-setting" style="display:none;">
718                 [% END %]
719                     <p><i class="fa fa-check"></i> Book drop mode. <span class="single-line">( Effective checkin date is [% dropboxdate | $KohaDates with_hours => 1 %] )</span></p>
720                 </div>
721                 [% IF ( return_date_override_remember ) %]
722                     <div id="return_date_remember" class="checkin-active-setting">
723                 [% ELSE %]
724                     <div id="return_date_remember" class="checkin-active-setting" style="display:none;">
725                 [% END %]
726                     <p><i class="fa fa-check"></i> Saved check-in date: <span id="saved_return_date" class="single-line">[% return_date_override | html %]</span></p>
727                 </div>
728             </div>
729         </div>
730
731             <div class="circ-settings">
732             [% IF Koha.Preference('SpecifyReturnDate') %]
733                 <div class="date-select" id="return_date_override_fields">
734                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
735
736                     <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override | html %]" />
737
738
739
740                     <button type="button" class="action btn btn-default btn-xs" id="cleardate" name="cleardate">Clear</button>
741                     <div class="circ-setting">
742                         [% IF ( return_date_override_remember ) %]
743                             <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" checked="checked" />
744                         [% ELSE %]
745                             <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" />
746                         [% END %]
747                         <label for="return_date_override_remember"> Remember due date for next check in</label>
748                     </div>
749             </div>
750         [% END %]
751                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
752                         <div id="forgive-overdue-fines" class="circ-setting">
753                         [% IF ( exemptfine ) %]
754                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
755                         [% ELSE %]
756                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
757                         [% END %]
758                         <label for="exemptcheck">Forgive overdue charges</label>
759                         </div>
760                     [% END %] <!-- overduecharges -->
761                         <div id="book-drop-mode" class="circ-setting">
762                         [% IF ( dropboxmode ) %]
763                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
764                         [% ELSE %]
765                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
766                         [% END %]
767                         <label for="dropboxcheck">Book drop mode</label>
768                         </div>
769                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
770                         <div class="forgive-manual-hold-fees circ-setting">
771                         [% IF ( forgivemanualholdsexpire ) %]
772                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
773                         [% ELSE %]
774                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
775                         [% END %]
776                         <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
777                         </div>
778                     [% END %] <!-- overduecharges -->
779                 </div> <!-- /.circ-settings -->
780             </fieldset> <!-- /#circ_returns_checkin -->
781         </form> <!-- /#checkin-form -->
782
783 [% IF ( riloop ) %]
784     <h2>Checked-in items</h2>
785     <table id="checkedintable">
786     <thead><tr><th class="ci-duedate">Due date</th><th class="ci-title">Title</th><th class="ci-author">Author</th><th class="ci-barcode">Barcode</th><th class="ci-homelibrary">Home library</th><th class="ci-holdinglibrary">Holding library</th><th class="ci-shelvinglocation">Shelving location</th><th class="ci-callnumber">Call number</th><th class="ci-dateaccessioned">Date acquired</th><th class="ci-type">Type</th><th class="ci-patron">Patron</th><th class="ci-note">Note</th></tr></thead>
787
788         [% FOREACH riloo IN riloop %]
789             <tr>
790             <td class="ci-duedate">[% IF ( riloo.duedate ) %]
791                     [% IF ( riloo.return_overdue ) %]
792                         <span class="overdue">[% riloo.duedate | html %] (overdue)</span>
793                     [% ELSE %][% riloo.duedate | html %]
794                     [% END %]
795                 [% ELSE %]Not checked out
796                 [% END %]
797             </td>
798             <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]">
799                     [% riloo.itemtitle | html %]
800                 </a>
801                 [% IF ( riloo.enumchron ) %]
802                     <br/>
803                     <span class="item_enumeration" style="white-space: nowrap;">[% riloo.enumchron | html %]</span>
804                 [% END %]
805             </td>
806             <td class="ci-author">[% riloo.itemauthor | html %]</td>
807             <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber | uri %]&amp;itemnumber=[% riloo.itemnumber | uri %]#item[% riloo.itemnumber | uri %]">[% riloo.barcode | html %]</a></td>
808             <td class="ci-homelibrary">[% Branches.GetName( riloo.homebranch ) | html %]</td>
809             <td class="ci-holdinglibrary">[% Branches.GetName( riloo.holdingbranch ) | html %]</td>
810             <td class="ci-shelvinglocation"><span class="shelvingloc">[% riloo.location | html %]</span></td>
811             <td class="ci-callnumber">[% riloo.itemcallnumber | html %]</td>
812             <td class="ci-dateaccessioned">[% riloo.dateaccessioned | $KohaDates %]</td>
813             <td class="ci-type">[% ItemTypes.GetDescription( riloo.itemtype ) | html %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) | html %]</td>
814             <td class="ci-patron">[% IF ( riloo.duedate ) %]
815                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.patron.borrowernumber | uri %]">
816                     [% riloo.patron.surname | html %], [% riloo.patron.firstname | html %] ([% riloo.patron.category.description | html %])
817                 </a>
818                 [% IF riloo.borissuescount %]
819                     <span class="results_summary nowrap">
820                         <span class="label">Checkouts:</span>
821                         <span class="number_box">
822                             <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% riloo.patron.borrowernumber | uri %]">[% riloo.borissuescount | html %]</a>
823                         </span>
824                     </span>
825                 [% END %]
826             [% ELSE %]Not checked out[% END %]</td>
827             <td class="ci-note">
828                 [% IF ( riloo.patron.borrowernotes ) %]<p><span class="circ-hlt patron-note">[% riloo.patron.borrowernotes | html %]</p></span>[% END %]
829                 [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt item-note-public">[% riloo.itemnote | html %]</p></span>[% END %]
830                 [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</p></span>[% END %]
831             </td>
832            </tr>
833         [% END %]
834     </table>
835 [% END %]
836
837                 [% IF Koha.Preference('CircSidebar') %]
838                         </div> <!-- /.col-sm-10.col-sm-push-2 -->
839                         <div class="col-sm-2 col-sm-pull-10">
840                             <aside>
841                                 [% INCLUDE 'circ-nav.inc' %]
842                             </aside>
843                         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
844                     </div> <!-- /.row -->
845                 [% ELSE %]
846                         </div> <!-- /.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 -->
847                     </div> <!-- /.row -->
848                 [% END %]
849
850             </main>
851         </div> <!-- /.col-sm-12 -->
852     </div> <!-- /.row -->
853
854 [% MACRO jsinclude BLOCK %]
855     [% INCLUDE 'datatables.inc' %]
856     [% INCLUDE 'columns_settings.inc' %]
857     [% INCLUDE 'calendar.inc' %]
858     [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
859     [% Asset.js("js/pages/circulation.js") | $raw %]
860     [% INCLUDE 'timepicker.inc' %]
861
862     <script>
863         function Dopop(link) {
864             var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
865             $("#barcode").focus();
866         }
867         $(document).ready(function () {
868             $(".modal").modal({ backdrop: 'static' }).on('shown.bs.modal', function() {
869                 $("#barcode").prop("disabled", true);
870             }).on('hidden.bs.modal', function() {
871                 $("#barcode").prop("disabled", false).focus();
872             });
873
874             $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
875
876             $(".print-slip").on('click', function(e) {
877                 e.preventDefault();
878                 Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]');
879             });
880
881             [% IF print_slip %]
882                 Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]&amp;itemnumber=[% itemnumber | html %]');
883             [% END %]
884
885             var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
886             var returns_table = KohaTable("checkedintable", {
887                     "bFilter":false,
888                     "bPaginate":false,
889                     "bInfo":false,
890                     "bSort":false,
891                     "dom": 'B<"clearfix">t',
892                     }, columns_settings);
893
894             $("#return_date_override").datetimepicker({
895                 onClose: function(dateText, inst) {
896                     if (validate_date(dateText, inst) ) {
897                         $("#barcode").focus();
898                     }
899                 },
900                 defaultDate: -1,
901                 hour: 23,
902                 minute: 59,
903                 maxDate: 0
904             }).on("change", function(e, value) {
905                 if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
906             });
907             $("#return_date_override").on("blur", function() {
908                 check_valid_return_date();
909             });
910             $("#checkin-form").submit(function( event ) {
911                 if ( !check_valid_return_date() ) {
912                     event.preventDefault();
913                 }
914             });
915
916             function check_valid_return_date() {
917                 if ( $("#return_date_override").val() ) {
918                     var datetime = DateTime_from_syspref( $("#return_date_override").val() );
919                     var now = new Date();
920                     if ( !datetime || datetime > now ) {
921                         alert("Invalid return date/time!");
922                         $("#return_date_override").val("")
923                         return false;
924                     }
925                 }
926                 // Add saved date information to onscreen message, which
927                 // may or may not be hidden
928                 $("#saved_return_date").text( $("#return_date_override").val() );
929                 return true;
930             }
931
932             $("#exemptcheck").change(function () {
933                 if (this.checked == true) {
934                     $("#barcode").addClass("input-warning");
935                     $("#exemptfines").show();
936                 } else {
937                     $("#barcode").removeClass("input-warning");
938                     $("#exemptfines").hide();
939                 }
940                 $("#barcode").focus();
941             });
942             $("#dropboxcheck").change(function () {
943                 if (this.checked == true) {
944                     $("#barcode").addClass("input-warning");
945                     $("#dropboxmode").show();
946
947                     $("#return_date_override_fields :input").prop('disabled', true);
948                     $("#return_date_override").datetimepicker("disable");
949                 } else {
950                     $("#barcode").removeClass("input-warning");
951                     $("#dropboxmode").hide();
952
953                     $("#return_date_override_fields :input").prop('disabled', false);
954                     $("#return_date_override").datetimepicker("enable");
955                 }
956                 $("#barcode").focus();
957             });
958             $("#forgivemanualholdsexpire").change(function () {
959                 if (this.checked == true) {
960                     $("#barcode").addClass("input-warning");
961                     $("#forgivemanualholdsexpire-alert").show();
962                 } else {
963                     $("#barcode").removeClass("input-warning");
964                     $("#forgivemanualholdsexpire-alert").hide();
965                 }
966                 $("#barcode").focus();
967             });
968
969             [% IF(overduecharges) %]
970                 $("#barcode").focus(function () {
971                     if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
972                         $("#barcode").addClass("input-warning");
973                     } else {
974                         $("#barcode").removeClass("input-warning");
975                     }
976                 });
977                 $("#barcode").blur(function () {
978                     $("#barcode").removeClass("input-warning");
979                 });
980             [% END %]
981
982             $('.openWin').on("click",function(e){
983                 Dopop( $(this).data("url") );
984             });
985
986             $('.print').on("click",function(e){
987                 this.form.print_slip.value = 1;
988                 this.form.submit();
989             });
990
991             $('.cancel-hold').on("click",function(e){
992                 this.form.cancel_reserve.value = 1;
993                 this.form.submit();
994             });
995
996             $('.cancel-transfer').on("click",function(e){
997                 e.preventDefault();
998                 window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&amp;canceltransfer=1'
999             });
1000
1001             $('.action').on("click",function(e){
1002                 this.checked = false;
1003                 this.form.return_date_override.value = '';
1004                 this.form.return_date_override_remember.checked = false;
1005                 this.form.barcode.focus();
1006                 $("#return_date_remember").hide();
1007                 return false;
1008             });
1009
1010             $("#return_date_override_remember").on("change", function(){
1011                 if( $(this).prop("checked" ) ){
1012                     if( $("#return_date_override").val() == "" ){
1013                         $("#saved_return_date").text( _("No date selected") );
1014                     } else {
1015                         $("#saved_return_date").text( $("#return_date_override").val() );
1016                     }
1017                     $("#return_date_remember").show();
1018                 } else {
1019                     $("#return_date_remember").hide();
1020                 }
1021             });
1022         });
1023     </script>
1024 [% END %]
1025
1026 [% INCLUDE 'intranet-bottom.inc' %]