Bug 26626: (follow-up) Be consistent with icon and accesskeys
[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 ItemTypes %]
7 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
9 [% PROCESS 'member-display-address-style.inc' %]
10 [% SET footerjs = 1 %]
11 [% BLOCK display_bormessagepref %]
12     [% IF ( bormessagepref ) %]
13         <li class="notification_method"><span>Patron notification:</span>
14             [% FOREACH mtt IN bormessagepref.keys %]
15                 [%~ IF ( mtt == 'email' ) %] <span>Email</span>[% END ~%]
16                 [%~ IF ( mtt == 'phone' ) %] <span>Phone</span>[% END ~%]
17                 [%~ IF ( mtt == 'sms' ) %] <span>SMS</span>[% END ~%]
18                 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
19             [% END %]
20         </li>
21            [% ELSE %]
22         <li class="notification_method none">Patron is not notified.</li>
23     [% END %]
24 [% END %]
25
26 [% BLOCK display_holdpatron_address %]
27     [% PROCESS 'display-address-style' %]
28 [% END %]
29
30 [% INCLUDE 'doc-head-open.inc' %]
31 <title>Check in [% title | html %] &rsaquo; Circulation &rsaquo; Koha</title>
32 [% INCLUDE 'doc-head-close.inc' %]
33 </head>
34
35 <body id="circ_returns" class="circ">
36     <span class="audio-alert-success"></span>
37
38     [% INCLUDE 'header.inc' %]
39     [% INCLUDE 'checkin-search.inc' %]
40
41     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
42         <ol>
43             <li>
44                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
45             </li>
46             <li>
47                 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
48             </li>
49             <li>
50                 <a href="#" aria-current="page">
51                     Check in
52                 </a>
53             </li>
54         </ol>
55     </nav>
56
57     <div class="main container-fluid">
58         <div class="row">
59             <div class="col-sm-12">
60                 <main>
61                     <div class="row">
62
63                         [% IF Koha.Preference('CircSidebar') %]
64                             <div class="col-sm-10 col-sm-push-2">
65                         [% ELSE %]
66                             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
67                         [% END %]
68
69                         [% BLOCK all_checkin_messages %]
70                             [% IF hold_auto_filled %]
71                                 <div class="dialog message hold-auto-filled">
72                                     [% IF ( reservenotes ) %]
73                                         <h4>Notes: [% reservenotes | html %]</h4>
74                                     [% END %]
75                                     <h3>Hold filled for:</h3>
76                                     <ul>
77                                         <li>
78                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 %]
79                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
80                                         </li>
81
82                                         [% INCLUDE display_holdpatron_address %]
83
84                                         [% IF ( patron.phone ) %]
85                                             <li>[% patron.phone | html %]</li>
86                                         [% END %]
87
88                                         [% IF ( patron.email ) %]
89                                             <li>
90                                                 [% IF ( transfertodo ) %]
91                                                     [% patron.email | html %]
92                                                 [% ELSE %]
93                                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
94                                                 [% END %]
95                                             </li>
96                                         [% END %]
97
98                                         [% UNLESS ( transfertodo) %]
99                                             [% INCLUDE display_bormessagepref %]
100                                         [% END %]
101
102                                         [% IF ( patron.is_debarred ) %]
103                                             <li class="error">Patron is RESTRICTED</li>
104                                         [% END %]
105
106                                         [% IF ( patron.gonenoaddress ) %]
107                                             <li class="error">Patron's address is in doubt</li>
108                                         [% END %]
109                                     </ul>
110
111                                     [% IF ( transfertodo ) %]
112                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
113                                     [% ELSE %]
114                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
115                                     [% END %]
116
117                                     <a href="#" class="btn btn-default print print-slip">
118                                         <i class="fa fa-print"></i> Print
119                                     </a>
120                                 </div> <!-- /.hold-auto-filled -->
121                             [% END # /IF hold_auto_filled %]
122
123                             [% IF ( trigger ) %]
124                                  <div id="transfer-trigger" class="dialog message">
125                                      <h3>Reason for transfer</h3>
126                                      <p>
127                                          [%- SWITCH trigger -%]
128                                              [%- CASE 'Manual' -%]<span>Manual</span>
129                                              [%- CASE 'StockrotationAdvance' -%]<span>Stock rotation advance</span>
130                                              [%- CASE 'StockrotationRepatriation' -%]<span>Stock rotation repatriation</span>
131                                              [%- CASE 'ReturnToHome' -%]<span>Return to home library</span>
132                                              [%- CASE 'ReturnToHolding' -%]<span>Return to holding library</span>
133                                              [%- CASE 'RotatingCollection' -%]<span>Rotating collection</span>
134                                              [%- CASE 'Reserve' -%]<span>Hold</span>
135                                              [%- CASE 'LostReserve' -%]<span>Lost hold</span>
136                                              [%- CASE 'CancelReserve' -%]<span>Cancelled hold</span>
137                                              [%- CASE 'TransferCancellation' -%]<span>Transfer was cancelled whilst in transit</span>
138                                          [%- END -%]
139                                      </p>
140                                  </div>
141                             [% END %]
142
143                             [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
144                                 <div class="dialog alert">
145                                     <strong>Error:</strong>
146                                     This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.
147                                 </div>
148                             [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
149                                 <div class="dialog alert">
150                                     <strong>Error:</strong>
151                                     The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.
152                                 </div>
153                             [% END %]
154
155                             [% IF additional_materials && !needs_confirm && !multiple_confirmed %]
156                                 <div class="dialog message">
157                                     Note about the accompanying materials: [% additional_materials | html %]
158                                 </div>
159                             [% END %]
160
161                             [% IF ( collectionItemNeedsTransferred ) %]
162                                  <div id="rotating-collection" class="dialog message">
163                                     <h3>Please transfer item to: [% Branches.GetName( collectionBranch ) | html %]</h3>
164                                     <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
165                                     <p>This item is part of a rotating collection.</p>
166                                     <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;branchcode=[% collectionBranch | uri %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
167                                 </div>
168                             [% END %]
169
170                             <!-- Patron has added an issue note -->
171                             [% IF ( issue.note) %]
172                                 <div class="dialog message">
173                                     <h1>Patron note</h1>
174                                     <p>[% issue.notedate | $KohaDates %]</p>
175                                     <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber | uri %]"> [% title | html %]</a> [% author | html %]</p>
176                                     <p>[% issue.note | html %]</p>
177                                 </div>
178                             [% END %]
179
180                             <!-- Patron has fines -->
181                             [% IF ( fines ) %]
182                                 <div class="dialog alert">
183                                     <h3>Patron has outstanding fines of [% fines | html %].</h3>
184                                     <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber | uri %]">Make payment</a>.</p>
185                                 </div>
186                             [% END %]
187
188                             <!-- Item has return claim(s) -->
189                             [% IF ( ReturnClaims ) %]
190                                 <div class="dialog alert return-claim">
191                                     <h3>This item has been claimed as returned by:</h3>
192                                     <ul>
193                                         [% FOREACH rc IN ReturnClaims %]
194                                             <li>
195                                                 [% INCLUDE 'patron-title.inc' patron=rc.patron hide_patron_infos_if_needed=1 invert_name=1 %] <a class="btn btn-default btn-xs return-claim-tools-resolve" role="button" data-return-claim-id="[% rc.id | html %]" data-current-lost-status="0"><i class="fa fa-check-square"></i> Resolve</a>
196                                             </li>
197                                         [% END %]
198                                     </ul>
199                                 </div>
200                             [% END %]
201
202                             <!-- Patron has waiting holds -->
203                             [% IF ( waiting_holds ) %]
204                                 <div id="awaiting-pickup" class="dialog message">
205                                     <h3>[% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %] has [% waiting_holds | html %] hold(s) waiting for pickup.</h3>
206                                     <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber | uri %]">Check out to this patron</a>.</p>
207                                 </div>
208                             [% END %]
209
210                             <!-- Patron is restricted and checkin was backdated -->
211                             [% IF return_date_was_overriden && issue.patron.is_debarred %]
212                                 <div id="restricted_backdated" class="dialog message">
213                                     <h3>
214                                         [% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %]
215                                         is restricted. Please verify this patron should still be restricted.
216                                     </h3>
217                                 </div>
218                             [% END %]
219
220
221                             [% IF ( errmsgloop ) %]
222                                 <div class="dialog alert audio-alert-warning">
223                                     <h3>Check in message</h3>
224                                     [% IF itembiblionumber %]
225                                         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
226                                     [% END %]
227                                     [% FOREACH errmsgloo IN errmsgloop %]
228                                         [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
229                                             <p class="problem ret_nflupdate">
230                                                 Not for loan status updated.
231                                                 <br />Old value:
232                                                 [% IF errmsgloo.NotForLoanStatusUpdated.from %]
233                                                     <span class="ret_updatedfrom">
234                                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.from ) | html %].
235                                                     </span>
236                                                 [% ELSE %]
237                                                     Available for loan.
238                                                 [% END %]
239                                                 <br />New value:
240                                                 [% IF errmsgloo.NotForLoanStatusUpdated.to %]
241                                                     <span class="ret_updatedto">
242                                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.to ) | html %].
243                                                     </span>
244                                                 [% ELSE %]
245                                                     Available for loan.
246                                                 [% END %]
247                                             </p>
248                                         [% END %]
249                                         [% IF ( errmsgloo.ItemLocationUpdated ) %]
250                                              <p class="problem ret_location_update">
251                                                  Item shelving location updated.
252                                                 <br /><span>Old value:</span>
253                                                 [% IF errmsgloo.ItemLocationUpdated.from %]
254                                                     [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.from ) %]
255                                                     [% IF errmsgloo.ItemLocationUpdated.from == '' %]
256                                                         <span>empty</span>
257                                                     [% ELSIF av_description == '' %]
258                                                         [% errmsgloo.ItemLocationUpdated.from | html %] (<span>No description available</span>)
259                                                     [% ELSE %]
260                                                         [% av_description | html %]
261                                                     [% END %]
262                                                 [% ELSE %]
263                                                     <span>"Blank"</span>
264                                                 [% END %]
265                                                 <br />New value:
266                                                 [% IF errmsgloo.ItemLocationUpdated.to %]
267                                                     [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.to ) %]
268                                                     [% IF errmsgloo.ItemLocationUpdated.to == '' %]
269                                                         empty
270                                                     [% ELSIF av_description == '' %]
271                                                         [% errmsgloo.ItemLocationUpdated.to | html %] (Not an authorized value)
272                                                     [% ELSE %]
273                                                         [% av_description | html %]
274                                                     [% END %]
275                                                 [% ELSE %]
276                                                     "Blank"
277                                                 [% END %]
278                                              </p>
279                                         [% END %]
280                                         [% IF ( errmsgloo.badbarcode ) %]
281                                             <p class="problem ret_badbarcode">No item with barcode: [% errmsgloo.msg | html %]</p>
282                                         [% END %]
283                                         [% IF ( errmsgloo.ispermanent ) %]
284                                             <p class="problem ret_ispermenant">Please return item to: [% Branches.GetName( errmsgloo.msg ) | html %]</p>
285                                         [% END %]
286                                         [% IF ( errmsgloo.notissued ) %]
287                                             <p class="problem ret_notissued">Not checked out.</p>
288                                         [% END %]
289                                         [% IF ( errmsgloo.localuse) %]
290                                             <p class="problem ret_localuse">Local use recorded</p>
291                                         [% END %]
292                                         [% IF ( errmsgloo.transferred ) %]
293                                             <p class="problem ret_transferred">Item received from [% Branches.GetName( errmsgloo.transferred ) | html %]</p>
294                                         [% END %]
295                                         [% IF ( errmsgloo.waslost ) %]
296                                             [% IF Koha.Preference('BlockReturnOfLostItems') %]
297                                                 <p class="problem ret_blocked">Item is lost, cannot be checked in.</p>
298                                             [% ELSE %]
299                                                 <p class="problem ret_checkedin">Item was lost, now found.</p>
300                                             [% END %]
301                                             [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
302                                                 <p class="problem ret_refund">A refund has been applied to the borrowing patron's account.</p>
303                                             [% ELSIF LostItemFeeCharged and not Koha.Preference('BlockReturnOfLostItems') %]
304                                                 <p class="problem ret_charged">A refund for the lost item charge has been applied to the borrowing patron's account, and new overdue charge has been calculated and applied.</p>
305                                             [% ELSIF LostItemFeeRestored and not Koha.Preference('BlockReturnOfLostItems') %]
306                                                 <p class="problem ret_restored">A refund for the lost item charge has been applied to the borrowing patron's account and if an overdue fine was forgiven when the item was marked as lost, it has been reverted.</p>
307                                             [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
308                                                <h5>Cannot check in</h5>
309                                                <p><strong>NOT CHECKED IN</strong></p>
310                                             [% ELSE %]
311                                                 <p class="problem ret_feeremains">Any lost item fees for this item will remain on the patron's account.</p>
312                                             [% END %]
313                                         [% END %]
314                                         [% IF ( errmsgloo.withdrawn ) %]
315                                             [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %]
316                                                <h5>Cannot check in</h5>
317                                                <p><strong>NOT CHECKED IN</strong></p>
318                                             [% END %]
319                                            <p class="problem ret_withdrawn">
320                                                <span>Item has been withdrawn</span>
321                                                [% item_withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %]
322                                                [% IF (item_withdrawn_lib) %]<span class="ci-withdrawn">([% item_withdrawn_lib | html %])</span>[% END %]
323                                            </p>
324                                         [% END %]
325                                         [% IF ( errmsgloo.debarred ) %]
326                                             <p class="problem ret_debarred"><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>
327                                         [% END %]
328                                         [% IF ( errmsgloo.prevdebarred ) %]
329                                             <p class="problem ret_prevdebarred"><strong>Reminder: </strong>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
330                                         [% END %]
331                                         [% IF ( errmsgloo.foreverdebarred ) %]
332                                             <p class="problem ret_foreverdebarred"><strong>Reminder: </strong>Patron has an indefinite restriction.</p>
333                                         [% END %]
334                                         [% IF errmsgloo.data_corrupted %]
335                                             <p class="problem ret_datacorrupt">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 correct all errors shown on the "System information" tab</p>
336                                         [% END %]
337                                     [% END # /FOREACH errmsgloo %]
338                                 </div> <!-- /.dialog.dialog-alert -->
339                             [% END #/IF errmsgloop %]
340
341                             [% IF ( checkinmsg ) %]
342                                 [% IF ( checkinmsgtype == 'alert' ) %]
343                                     <div class="dialog alert">
344                                 [% ELSE %]
345                                     <div class="dialog message">
346                                 [% END %]
347                                         <p class="ret_checkinmsg">[% checkinmsg | html_line_break %]</p>
348                                     </div>
349                             [% END # /IF checkinmsg %]
350                         [% END # /BLOCK all_checkin_messages %]
351
352                         [% IF needs_confirm %]
353                             <div id="circ-needsconfirmation-modal" class="modal fade audio-alert-action block">
354                                 <div class="modal-dialog">
355                                     <div class="modal-content">
356                                         <div class="modal-header">
357                                             <h3>Please confirm checkin</h3>
358                                         </div>
359                                         <div class="modal-body">
360                                             <ul>
361                                                 <li>
362                                                     Please confirm that the accompanying materials are present: <strong>[% additional_materials | html %]</strong>
363                                                 </li>
364                                             </ul>
365                                         </div>
366                                         <div class="modal-footer">
367                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
368                                                 <input type="hidden" name="barcode" value="[% item.barcode | html %]" />
369                                                 <input type="hidden" name="multiple_confirm" value="1" />
370                                                 [% FOREACH inputloo IN inputloop %]
371                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
372                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
373                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
374                                                 [% END %]
375                                                 <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, checkin (Y)</button>
376                                             </form>
377                                             <button type="button" data-dismiss="modal" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't checkin (N)</button>
378                                         </div>
379                                     </div>
380                                 </div>
381                             </div>
382                         [% END %]
383
384                         [% IF wrongbranch %]
385                             <div id="wrong-branch-modal" class="modal fade audio-alert-action block">
386                                 <div class="modal-dialog">
387                                     <div class="modal-content">
388                                         <form method="post" action="returns.pl" name="mainform" id="mainform">
389                                             <div class="modal-header">
390                                                 <h3>
391                                                     Cannot check in
392                                                 </h3>
393                                             </div>
394                                             <div class="modal-body">
395                                                 <p>
396                                                     <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
397                                                         [% item.barcode | html %]: [% title | html %]
398                                                     </a>
399                                                 </p>
400                                                 <p>
401                                                     <strong>
402                                                         NOT CHECKED IN
403                                                     </strong>
404                                                 </p>
405                                                 <p>
406                                                     This item must be checked in at following library:
407                                                     <strong>
408                                                         [% Branches.GetName( rightbranch ) | html %]
409                                                     </strong>
410                                                 </p>
411                                                 [% INCLUDE all_checkin_messages %]
412                                             </div> <!-- /.modal-body -->
413                                             <div class="modal-footer">
414                                                 <button type="button" data-dismiss="modal" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
415                                             </div>
416                                         </form> <!-- /#mainform -->
417                                     </div> <!-- /.modal-content -->
418                                 </div> <!-- /.modal-dialog -->
419                             </div> <!-- /#wrong-branch-modal -->
420                         [% END # /IF wrongbranch %]
421
422                         <!-- case of a mistake in transfer loop -->
423                         [% UNLESS ( hold_auto_filled && diffbranch ) %]
424                             [% IF WrongTransfer && !transfertodo %]
425                                 [% IF Koha.Preference('TransfersBlockCirc') %]
426                                     <div id="wrong-transfer-modal" class="modal fade audio-alert-action block">
427                                 [% ELSE %]
428                                     <div id="wrong-transfer-modal" class="modal fade audio-alert-action noblock">
429                                 [% END %]
430                                     <div class="modal-dialog">
431                                         <div class="modal-content">
432                                             <form method="post" action="returns.pl" name="wrongtransferform" id="wrongtransferform">
433                                                 <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
434                                                 <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
435                                                 <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
436                                                 <input type="hidden" name="transit" value="[% NewTransfer | html %]" />
437                                                 [% FOREACH inputloo IN inputloop %]
438                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
439                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
440                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
441                                                 [% END %]
442
443                                                 <div class="modal-header">
444                                                     <h3>
445                                                         Wrong transfer detected, please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]
446                                                     </h3>
447                                                 </div>
448
449                                                 <div class="modal-body">
450                                                     <p>
451                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a>
452                                                     </p>
453
454                                                     [% INCLUDE all_checkin_messages %]
455                                                 </div>
456
457                                                 <div class="modal-footer">
458                                                     <!-- CONFIRM -->
459                                                     <button class="btn btn-default approve" type="submit" accesskey="y"><i class="fa fa-check"></i> OK (Y)</button>
460                                                     <!-- PRINT SLIP -->
461                                                     <button type="button" data-dismiss="modal" class="btn btn-default submit openWin" data-transfer="[% NewTransfer | html %]" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;&amp;branchcode=[% TransferWaitingAt | uri %]&amp;op=slip" accesskey="p"><i class="fa fa-print"></i> Print transfer slip (P)</button>
462                                                     <!-- CANCEL TRANSFER -->
463                                                     <button type="button" data-dismiss="modal" class="btn btn-default deny cancel" accesskey="x"><i class="fa fa-times"></i> Cancel transfer (X)</button>
464                                                 </div> <!-- /.modal-footer -->
465                                             </form> <!-- /wrongtransferform -->
466                                         </div> <!-- /.modal-content -->
467                                     </div> <!-- /.modal-dialog -->
468                                 </div> <!-- /#wrong-transfer-modal -->
469                             [% END # /IF WrongTransfer && !transfertodo %]
470                         [% END # /UNLESS hold_auto_filled && diffbranch %]
471
472                         [% IF ( found ) %]
473                             [% IF ( waiting ) %]
474                                 <div id="hold-found1" class="modal fade audio-alert-action block">
475                                     <div class="modal-dialog">
476                                         <div class="modal-content">
477                                             <form method="post" action="returns.pl" class="confirm">
478                                                 <div class="modal-header">
479                                                     <h3>
480                                                         Hold found (item is already waiting):
481                                                         <br/>
482                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
483                                                         <div class="hold-found-barcode">
484                                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% item.barcode | html %]</a>
485                                                         </div>
486                                                     </h3>
487                                                 </div>
488
489                                                 <div class="modal-body">
490                                                     [% IF ( reservenotes ) %]
491                                                         <h4>Notes: [% reservenotes | html %]</h4>
492                                                     [% END %]
493
494                                                     <h4>Hold for:</h4>
495                                                     <ul>
496                                                         <li>
497                                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
498                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
499                                                         </li>
500                                                         [% INCLUDE display_holdpatron_address %]
501                                                         [% IF ( patron.phone ) %]
502                                                             <li> [% patron.phone | html %]</li>
503                                                         [% END %]
504
505                                                         [% IF ( patron.email ) %]
506                                                             <li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>
507                                                         [% END %]
508
509                                                         [% IF ( patron.is_debarred ) %]
510                                                             <li class="error">Patron is RESTRICTED</li>
511                                                         [% END %]
512
513                                                         [% IF ( patron.gonenoaddress ) %]
514                                                             <li class="error">Patron's address is in doubt</li>
515                                                         [% END %]
516                                                     </ul>
517
518                                                     [% IF ( transfertodo ) %]
519                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
520                                                     [% ELSE %]
521                                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
522                                                     [% END %]
523
524                                                     [% FOREACH inputloo IN inputloop %]
525                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
526                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
527                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
528                                                     [% END %]
529
530                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
531                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
532                                                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
533                                                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
534                                                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
535                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
536                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
537                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
538
539                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
540                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
541                                                     [% INCLUDE all_checkin_messages %]
542                                                 </div> <!-- /.modal-body -->
543
544                                                 <div class="modal-footer">
545                                                     <input type="hidden" name="cancel_reserve" value="0" />
546                                                     <input id="confirm-hold-barcode" type="hidden" name="barcode" value="[% barcode | html %]" />
547
548                                                     <button type="submit" class="btn btn-default approve" data-dismiss="modal" accesskey="y">
549                                                         <i class="fa fa-check"></i> Confirm hold (Y)
550                                                     </button>
551
552                                                     <input type="hidden" name="print_slip" value="0" />
553                                                     <button type="button" class="btn btn-default print" accesskey="P">
554                                                         <i class="fa fa-print"></i> Print slip and confirm (P)
555                                                     </button>
556                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default" accesskey="I">
557                                                         <i class="fa fa-remove"></i> Ignore (I)
558                                                     </button>
559
560                                                     <button type="button" class="btn btn-default deny cancel-hold" accesskey="X">
561                                                         <i class="fa fa-trash"></i> Cancel hold (X)
562                                                     </button>
563                                                 </div> <!-- /.modal-footer -->
564                                             </form> <!-- /.confirm -->
565                                         </div> <!-- /.modal-content -->
566                                     </div> <!-- /.modal-dialog -->
567                                 </div> <!-- /#hold-found1 -->
568                             [% END # /IF waiting %]
569
570                             [% IF transfer || needstransfer %]
571                                 [% IF Koha.Preference('TransfersBlockCirc') %]
572                                     <div id="item-transfer-modal" class="modal fade audio-alert-action block">
573                                 [% ELSE %]
574                                     <div id="item-transfer-modal" class="modal fade audio-alert-action noblock">
575                                 [% END %]
576                                     <div class="modal-dialog">
577                                         <div class="modal-content">
578                                             <form method="post" action="returns.pl" name="mainform" id="mainform">
579
580                                                 <input type="hidden" name="print_slip" value="0" />
581
582                                                 <div class="modal-header">
583                                                     <h3>
584                                                         Please return this item to [% IF transfer %][% Branches.GetName( transfer ) | html %][% ELSE %][% Branches.GetName( returnbranch ) | html %][% END %]
585                                                     </h3>
586                                                 </div>
587                                                 <div class="modal-body">
588                                                     <p>
589                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
590                                                             [% item.barcode | html %]: [% title | html %]
591                                                         </a>
592                                                     </p>
593                                                     [% IF !transfer %]
594                                                         <p>
595                                                             Transfer now?
596                                                         </p>
597                                                     [% END %]
598                                                     <input type="hidden" name="tobranch" value="[% returnbranch | html %]" />
599                                                     <input type="hidden" name="transferitem" value="[% itemnumber | html %]" />
600                                                     <input type="hidden" name="barcode" value="0" />
601                                                     <input type="hidden" name="trigger" value="[% trigger | html %]" />
602                                                     [% INCLUDE all_checkin_messages %]
603                                                 </div>
604                                                 <div class="modal-footer">
605                                                     [% IF !transfer %]
606                                                         <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve" accesskey="y"><i class="fa fa-check"></i> Yes (Y)</button>
607                                                         <button type="button" name="dotransfer" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;&amp;branchcode=[% returnbranch | uri %]&amp;op=slip"><i class="fa fa-print"></i> Yes, print slip</button>
608                                                         <button type="button" data-dismiss="modal" class="btn btn-default deny" name="notransfer" value="No" accesskey="n"><i class="fa fa-times"></i> No (N)</button>
609                                                     [% ELSE %]
610                                                         <button type="button" data-dismiss="modal" class="btn btn-default approve" accesskey="y"><i class="fa fa-check"></i> OK (Y)</button>
611                                                         <button type="button" data-dismiss="modal" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;branchcode=[% transfer | uri %]&amp;op=slip" accesskey="p"><i class="fa fa-print"></i> Print slip (P)</button>
612                                                     [% END %]
613                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
614                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
615                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
616                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
617                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
618                                                     [% FOREACH inputloo IN inputloop %]
619                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
620                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
621                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
622                                                     [% END %]
623                                                 </div> <!-- /.modal-footer -->
624                                             </form> <!-- /#mainform -->
625                                         </div> <!-- /.modal-content -->
626                                     </div> <!-- /.modal-dialog -->
627                                 </div> <!-- /#item-transfer-modal -->
628                             [% END # /IF transfer || needstransfer %]
629
630                             <!-- case of simple return no issue or transfer but with a hold  -->
631                             [% IF ( reserved and !recalled and !waitingrecall ) %]
632                                 <!-- reserved -->
633                                 <div id="hold-found2" class="modal fade audio-alert-action block">
634                                     <div class="modal-dialog">
635                                         <div class="modal-content">
636                                             <form method="post" action="returns.pl" class="confirm">
637
638                                                 <input type="hidden" name="print_slip" value="0" />
639
640                                                 <div class="modal-header">
641                                                     <h3>
642                                                         Hold found:
643                                                         <br/>
644                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
645                                                         <div class="hold-found-barcode">
646                                                             (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% item.barcode | html %]</a>)
647                                                         </div>
648                                                     </h3>
649                                                 </div>
650
651                                                 <div class="modal-body">
652                                                     [% IF ( reservenotes ) %]
653                                                         <h4>Notes:</h4>
654                                                         <p>[% reservenotes | html %]</p>
655                                                         <hr />
656                                                     [% END %]
657                                                     <h5>Hold for:</h5>
658                                                     <ul>
659                                                         <li>
660                                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
661                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
662                                                         </li>
663
664                                                         [% INCLUDE display_holdpatron_address %]
665
666                                                         [% IF ( patron.phone ) %]
667                                                             <li>[% patron.phone | html %]</li>
668                                                         [% END %]
669
670                                                         [% IF ( patron.email ) %]
671                                                             <li>
672                                                                 [% IF ( transfertodo ) %]
673                                                                     [% patron.email | html %]
674                                                                 [% ELSE %]
675                                                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
676                                                                 [% END %]
677                                                             </li>
678                                                         [% END %]
679
680                                                         [% UNLESS ( transfertodo) %]
681                                                             [% INCLUDE display_bormessagepref %]
682                                                         [% END %]
683
684                                                         [% IF ( patron.is_debarred ) %]
685                                                             <li class="error">Patron is RESTRICTED</li>
686                                                         [% END %]
687
688                                                         [% IF ( patron.gonenoaddress ) %]
689                                                             <li class="error">Patron's address is in doubt</li>
690                                                         [% END %]
691                                                     </ul>
692                                                     [% IF ( transfertodo ) %]
693                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
694                                                     [% ELSE %]
695                                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
696                                                     [% END %]
697
698                                                     [% FOREACH inputloo IN inputloop %]
699                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
700                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
701                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
702                                                     [% END %]
703
704                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
705                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
706                                                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
707                                                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
708                                                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
709                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
710                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
711                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
712                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
713                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
714                                                     [% INCLUDE all_checkin_messages %]
715                                                 </div>
716
717                                                 <div class="modal-footer">
718                                                     [% IF ( transfertodo ) %]
719                                                         <button type="submit" class="btn btn-default approve" accesskey="y">
720                                                             <i class="fa fa-check"></i> Confirm hold and transfer (Y)
721                                                         </button>
722                                                         <button type="button" class="btn btn-default print" accesskey="p">
723                                                             <i class="fa fa-print"></i> Print slip, transfer, and confirm (P)
724                                                         </button>
725                                                     [% ELSE %]
726                                                         <button type="submit" class="btn btn-default approve" accesskey="y">
727                                                             <i class="fa fa-check"></i> Confirm hold (Y)
728                                                         </button>
729                                                         <button type="button" class="btn btn-default print" accesskey="p">
730                                                             <i class="fa fa-print"></i> Print slip and confirm (P)
731                                                         </button>
732                                                     [% END %]
733
734                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny" accesskey="i">
735                                                         <i class="fa fa-remove"></i> Ignore (I)
736                                                     </button>
737                                                 </div> <!-- /.modal-footer -->
738                                             </form> <!-- /.confirm -->
739                                         </div> <!-- /.modal-content -->
740                                     </div> <!-- /.modal-dialog -->
741                                 </div> <!-- /#hold-found2 -->
742                             [% END #/IF reserved %]
743
744                             [% IF ( recalled ) %]
745                                 <!-- recalled -->
746                                 <div id="recalled" class="modal fade audio-alert-action block">
747                                     <div class="modal-dialog">
748                                         <div class="modal-content">
749                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" class="confirm">
750
751                                                 <div class="modal-header">
752                                                     <h3>
753                                                         Recall found:
754                                                         <br/>
755                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% recall.biblio_id | uri %]">[% recall.biblio.title | html %]</a>
756                                                         [% IF recall.item %]
757                                                             <div class="recall-found-barcode">
758                                                                 (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% recall.biblio_id | uri %]&amp;itemnumber=[% recall.item_id | uri %]">[% recall.item.barcode | html %]</a>)
759                                                             </div>
760                                                         [% END %]
761                                                     </h3>
762                                                 </div>
763
764                                                 <div class="modal-body">
765                                                     [% IF ( recall.notes ) %]
766                                                         <h4>Notes:</h4>
767                                                         <p>[% recall.notes | html %]</p>
768                                                         <hr />
769                                                     [% END %]
770                                                     <h5>Recall placed by:</h5>
771                                                     <ul>
772                                                         <li>
773                                                             [% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_recalls" %]
774                                                             <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
775                                                         </li>
776
777                                                         [% INCLUDE display_holdpatron_address patron=recall.patron %]
778
779                                                         [% IF ( recall.patron.phone ) %]
780                                                             <li>[% recall.patron.phone | html %]</li>
781                                                         [% END %]
782
783                                                         [% IF ( recall.patron.email ) %]
784                                                             <li>
785                                                                 [% IF ( transfertodo ) %]
786                                                                     [% recall.patron.email | html %]
787                                                                 [% ELSE %]
788                                                                     <a id="boremail" href="mailto:[% recall.patron.email | html %]">[% recall.patron.email | html %]</a>
789                                                                 [% END %]
790                                                             </li>
791                                                         [% END %]
792
793                                                         [% UNLESS ( transfertodo) %]
794                                                             [% INCLUDE display_bormessagepref %]
795                                                         [% END %]
796
797                                                         [% IF ( recall.patron.is_debarred ) %]
798                                                             <li class="error">Patron is RESTRICTED</li>
799                                                         [% END %]
800
801                                                         [% IF ( recall.patron.gonenoaddress ) %]
802                                                             <li class="error">Patron's address is in doubt</li>
803                                                         [% END %]
804                                                     </ul>
805                                                     [% IF ( transfertodo ) %]
806                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
807                                                     [% ELSE %]
808                                                         <h4><strong>Recall at</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
809                                                     [% END %]
810
811                                                     <input type="hidden" name="recall_id" value="[% recall.id | html %]">
812                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]">
813                                                     <input type="hidden" name="returnbranch" value="[% Branches.GetLoggedInBranchcode | html %]">
814                                                     <input type="hidden" name="recall_slip" value="0">
815
816                                                 </div>
817
818                                                 <div class="modal-footer">
819                                                     [% IF ( transfertodo ) %]
820                                                         <button type="submit" class="btn btn-default approve">
821                                                             <i class="fa fa-check"></i> Confirm recall and transfer
822                                                         </button>
823                                                         <button type="button" class="btn btn-default print-recall">
824                                                             <i class="fa fa-print"></i> Print slip, transfer, and confirm
825                                                         </button>
826                                                     [% ELSE %]
827                                                         <button type="submit" class="btn btn-default approve">
828                                                             <i class="fa fa-check"></i> Confirm recall
829                                                         </button>
830                                                         <button type="button" class="btn btn-default print-recall">
831                                                             <i class="fa fa-print"></i> Print slip and confirm
832                                                         </button>
833                                                     [% END %]
834
835                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default">
836                                                         <i class="fa fa-remove"></i> Ignore
837                                                     </button>
838                                                 </div> <!-- /.modal-footer -->
839                                             </form> <!-- /.confirm -->
840                                         </div> <!-- /.modal-content -->
841                                     </div> <!-- /.modal-dialog -->
842                                 </div> <!-- /#recalled -->
843                             [% END #/IF recalled %]
844
845                             [% IF ( waitingrecall ) %]
846                                 <!-- recalled -->
847                                 <div id="recalledwaiting" class="modal fade audio-alert-action block">
848                                     <div class="modal-dialog">
849                                         <div class="modal-content">
850                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" class="confirm">
851
852                                                 <div class="modal-header">
853                                                     <h3>
854                                                         Recall found (item is already waiting):
855                                                         <br/>
856                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% recall.biblio_id | uri %]">[% recall.biblio.title | html %]</a>
857                                                         [% IF recall.item %]
858                                                             <div class="recall-found-barcode">
859                                                                 (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% recall.biblio_id | uri %]&amp;itemnumber=[% recall.item_id | uri %]">[% recall.item.barcode | html %]</a>)
860                                                             </div>
861                                                         [% END %]
862                                                     </h3>
863                                                 </div>
864
865                                                 <div class="modal-body">
866                                                     [% IF ( recall.notes ) %]
867                                                         <h4>Notes:</h4>
868                                                         <p>[% recall.notes | html %]</p>
869                                                         <hr />
870                                                     [% END %]
871                                                     <h5>Recall placed by:</h5>
872                                                     <ul>
873                                                         <li>
874                                                             [% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_recalls" %]
875                                                             <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
876                                                         </li>
877
878                                                         [% INCLUDE display_holdpatron_address patron=recall.patron %]
879
880                                                         [% IF ( recall.patron.phone ) %]
881                                                             <li>[% recall.patron.phone | html %]</li>
882                                                         [% END %]
883
884                                                         [% IF ( recall.patron.email ) %]
885                                                             <li>
886                                                                 [% IF ( transfertodo ) %]
887                                                                     [% recall.patron.email | html %]
888                                                                 [% ELSE %]
889                                                                     <a id="boremail" href="mailto:[% recall.patron.email | html %]">[% recall.patron.email | html %]</a>
890                                                                 [% END %]
891                                                             </li>
892                                                         [% END %]
893
894                                                         [% UNLESS ( transfertodo) %]
895                                                             [% INCLUDE display_bormessagepref %]
896                                                         [% END %]
897
898                                                         [% IF ( recall.patron.is_debarred ) %]
899                                                             <li class="error">Patron is RESTRICTED</li>
900                                                         [% END %]
901
902                                                         [% IF ( recall.patron.gonenoaddress ) %]
903                                                             <li class="error">Patron's address is in doubt</li>
904                                                         [% END %]
905                                                     </ul>
906                                                     [% IF ( transfertodo ) %]
907                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
908                                                     [% ELSE %]
909                                                         <h4><strong>Wait for pickup at</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
910                                                     [% END %]
911
912                                                     <input type="hidden" name="recall_id" value="[% recall.id | html %]">
913                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]">
914                                                     <input type="hidden" name="returnbranch" value="[% Branches.GetLoggedInBranchcode | html %]">
915                                                     <input type="hidden" name="recall_slip" value="0">
916
917                                                 </div>
918
919                                                 <div class="modal-footer">
920                                                     <button type="submit" class="btn btn-default approve">
921                                                         <i class="fa fa-check"></i> Confirm recall
922                                                     </button>
923                                                     <button type="button" class="btn btn-default print-recall">
924                                                         <i class="fa fa-print"></i> Print slip and confirm
925                                                     </button>
926
927                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny">
928                                                         <i class="fa fa-times"></i> Ignore
929                                                     </button>
930                                                 </div> <!-- /.modal-footer -->
931                                             </form> <!-- /.confirm -->
932                                         </div> <!-- /.modal-content -->
933                                     </div> <!-- /.modal-dialog -->
934                                 </div> <!-- /#recalledwaiting-->
935                             [% END #/IF recalledwaiting %]
936                         [% END # /IF found %]
937
938                         <div class="static_checkin_messages">
939                             [% INCLUDE all_checkin_messages %]
940                         </div>
941
942                         <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
943                             <fieldset id="circ_returns_checkin">
944                                 <div class="show_checkin_dialog" style="float:right;display:none"><button type="button" class="btn btn-default btn-sm" data-toggle="tooltip" title="Show the last checkin message"><i class="fa fa-info"></i></button></div>
945                                 <h1>Check in</h1>
946                                 <div class="row">
947                                     <div class="col-sm-6">
948                                         <div class="hint">Enter item barcode:</div>
949                                             <div class="form-control-group">
950                                                 [% IF ( exemptfine ) %]
951                                                     <input name="barcode" id="barcode" size="14" class="focus input-warning" type="text" />
952                                                 [% ELSIF ( dropboxmode ) %]
953                                                     <input name="barcode" id="barcode" size="14" class="barcode focus input-warning" />
954                                                 [% ELSE %]
955                                                     <input name="barcode" id="barcode" size="14" class="barcode focus" />
956                                                 [% END %]
957                                                 <button type="submit" class="btn btn-default">Check in</button>
958                                                 [% FOREACH inputloo IN inputloop %]
959                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
960                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
961                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
962                                                 [% END %]
963                                             </div>
964                                         <div id="show-circ-settings">
965                                             <a href="#"><i class="fa circ-settings-icon fa-caret-down"></i> Checkin settings</a>
966                                         </div>
967                                     </div>
968                                     <div class="col-sm-6">
969                                         [% IF ( exemptfine ) %]
970                                             <div id="exemptfines" class="checkin-active-setting">
971                                         [% ELSE %]
972                                             <div id="exemptfines" class="checkin-active-setting" style="display:none;">
973                                         [% END %]
974                                             <p><i class="fa fa-check"></i> Fines for returned items are forgiven.</p>
975                                         </div>
976
977                                         [% IF ( forgivemanualholdsexpire ) %]
978                                             <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting">
979                                         [% ELSE %]
980                                             <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting" style="display:none;">
981                                         [% END %]
982                                                 <p><i class="fa fa-check"></i> Fines are not charged for manually cancelled holds.</p>
983                                             </div>
984
985                                         [% IF ( dropboxmode ) %]
986                                             <div id="dropboxmode" class="checkin-active-setting">
987                                         [% ELSE %]
988                                             <div id="dropboxmode" class="checkin-active-setting" style="display:none;">
989                                         [% END %]
990                                             <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>
991                                         </div>
992                                         [% IF ( return_date_override_remember ) %]
993                                             <div id="return_date_remember" class="checkin-active-setting">
994                                         [% ELSE %]
995                                             <div id="return_date_remember" class="checkin-active-setting" style="display:none;">
996                                         [% END %]
997                                             <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>
998                                         </div>
999                                     </div>
1000                                 </div>
1001
1002                                 <div class="circ-settings">
1003                                     [% IF Koha.Preference('SpecifyReturnDate') %]
1004                                         <div class="date-select" id="return_date_override_fields">
1005                                             <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
1006
1007                                             <input type="text" size="20" id="return_date_override" name="return_date_override" value="[% return_date_override | html %]" class="flatpickr" data-flatpickr-pastinclusive="true" data-flatpickr-enable-time="true" data-flatpickr-on-close-focus="#barcode" />
1008
1009                                             <div class="circ-setting">
1010                                                 [% IF ( return_date_override_remember ) %]
1011                                                     <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" checked="checked" />
1012                                                 [% ELSE %]
1013                                                     <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" />
1014                                                 [% END %]
1015                                                 <label for="return_date_override_remember"> Remember return date for next check in</label>
1016                                             </div>
1017                                         </div> <!-- /.date-select -->
1018                                     [% END %]
1019
1020                                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
1021                                         <div id="forgive-overdue-fines" class="circ-setting">
1022                                             [% IF ( exemptfine ) %]
1023                                                 <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
1024                                             [% ELSE %]
1025                                                 <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
1026                                             [% END %]
1027                                             <label for="exemptcheck">Forgive overdue charges</label>
1028                                         </div>
1029                                     [% END %] <!-- overduecharges -->
1030
1031                                     <div id="book-drop-mode" class="circ-setting">
1032                                         [% IF ( dropboxmode ) %]
1033                                             <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
1034                                         [% ELSE %]
1035                                             <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
1036                                         [% END %]
1037                                         <label for="dropboxcheck">Book drop mode</label>
1038                                     </div>
1039
1040                                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
1041                                         <div class="forgive-manual-hold-fees circ-setting">
1042                                             [% IF ( forgivemanualholdsexpire ) %]
1043                                                 <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
1044                                             [% ELSE %]
1045                                                 <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
1046                                             [% END %]
1047                                             <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
1048                                         </div>
1049                                     [% END %] <!-- overduecharges -->
1050
1051                                 </div> <!-- /.circ-settings -->
1052                             </fieldset> <!-- /#circ_returns_checkin -->
1053                         </form> <!-- /#checkin-form -->
1054
1055                         [% IF ( riloop ) %]
1056                             <h2>Checked-in items</h2>
1057                             <table id="checkedintable">
1058                                 <thead>
1059                                     <tr>
1060                                         <th class="ci-duedate">Due date</th>
1061                                         <th class="ci-title">Title</th>
1062                                         <th class="ci-author">Author</th>
1063                                         <th class="ci-barcode">Barcode</th>
1064                                         <th class="ci-homelibrary">Home library</th>
1065                                         <th class="ci-transferlibrary">Transfer to</th>
1066                                         <th class="ci-shelvinglocation">Shelving location</th>
1067                                         <th class="ci-callnumber">Call number</th>
1068                                         <th class="ci-dateaccessioned">Date acquired</th>
1069                                         <th class="ci-recordlevelitemtype">Record-level itemtype</th>
1070                                         <th class="ci-itemtype">Item type</th>
1071                                         <th class="ci-collection">Collection</th>
1072                                         <th class="ci-patron">Patron</th>
1073                                         <th class="ci-note">Note</th>
1074                                     </tr>
1075                                 </thead>
1076
1077                                 [% FOREACH riloo IN riloop %]
1078                                     <tr>
1079                                         <td class="ci-duedate">
1080                                             [% IF ( riloo.duedate ) %]
1081                                                 [% IF ( riloo.return_overdue ) %]
1082                                                     <span class="overdue">[% riloo.duedate | html %] (overdue)</span>
1083                                                 [% ELSE %]
1084                                                     [% riloo.duedate | html %]
1085                                                 [% END %]
1086                                             [% ELSE %]
1087                                                 <span>Not checked out</span>
1088                                             [% END %]
1089                                             [% IF ( riloo.damaged ) %]
1090                                                 <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %]</span>
1091                                             [% END %]
1092                                         </td>
1093                                         <td class="ci-title">
1094                                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]">
1095                                                 [% riloo.itemtitle | html %]
1096                                                 [% FOREACH subtitle IN riloo.subtitle.split(' \\| ') %] <span class="subtitle">[% subtitle | html %]</span>[% END %]
1097                                                 [% FOREACH part_number IN riloo.part_number.split(' \\| ') %] <span class="part_number">[% part_number | html %]</span>[% END %]
1098                                                 [% FOREACH part_name IN riloo.part_name.split(' \\| ') %] <span class="part_name">[% part_name | html %]<span>[% END %]
1099                                             </a>
1100                                             [% IF ( riloo.enumchron ) %]
1101                                                 <br/>
1102                                                 <span class="item_enumeration" style="white-space: nowrap;">[% riloo.enumchron | html %]</span>
1103                                             [% END %]
1104                                         </td>
1105                                         <td class="ci-author">[% riloo.itemauthor | html %]</td>
1106                                         <td class="ci-barcode">
1107                                             <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>
1108                                         </td>
1109                                         <td class="ci-homelibrary">
1110                                             [% Branches.GetName( riloo.homebranch ) | html %]
1111                                         </td>
1112                                         <td class="ci-transferlibrary">
1113                                             [% Branches.GetName( riloo.transferbranch ) | html %]
1114                                         </td>
1115                                         <td class="ci-shelvinglocation">
1116                                             <span class="shelvingloc">[% riloo.location | html %]</span>
1117                                         </td>
1118                                         <td class="ci-callnumber">
1119                                             [% riloo.itemcallnumber | html %]
1120                                         </td>
1121                                         <td class="ci-dateaccessioned">
1122                                             [% riloo.dateaccessioned | $KohaDates %]
1123                                         </td>
1124                                         <td class="ci-recordlevelitemtype">
1125                                             [% ItemTypes.GetDescription( riloo.recordtype ) | html %]
1126                                         </td>
1127                                         <td class="ci-itemtype">
1128                                             [% ItemTypes.GetDescription( riloo.itemtype ) | html %]
1129                                         </td>
1130                                         <td class="ci-collection">
1131                                             [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => riloo.ccode) | html %]
1132                                         </td>
1133                                         <td class="ci-patron">
1134                                             [% IF ( riloo.duedate ) %]
1135                                                 [% INCLUDE 'patron-title.inc' patron=riloo.patron hide_patron_infos_if_needed=1 invert_name=1 %]
1136                                                 [% IF riloo.borissuescount %]
1137                                                     <span class="results_summary nowrap">
1138                                                         <span class="label">Checkouts:</span>
1139                                                         <span class="number_box">
1140                                                             <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% riloo.patron.borrowernumber | uri %]">[% riloo.borissuescount | html %]</a>
1141                                                         </span>
1142                                                     </span>
1143                                                 [% END %]
1144                                                 <a class="btn btn-default btn-xs printcheckinslip" href="#" data-borrowernumber="[% riloo.patron.borrowernumber | html %]"><i class="fa fa-print"></i> Print checkin slip</a>
1145                                             [% ELSE %]
1146                                                 Not checked out
1147                                             [% END %]
1148                                         </td>
1149                                         <td class="ci-note">
1150                                             [% IF ( riloo.patron.borrowernotes ) %]
1151                                                 <p><span class="circ-hlt patron-note">[% riloo.patron.borrowernotes | html %]</span></p>
1152                                             [% END %]
1153                                             [% IF ( riloo.itemnote ) %]
1154                                                 <p><span class="circ-hlt item-note-public">[% riloo.itemnote | html %]</span></p>
1155                                             [% END %]
1156                                             [% IF ( riloo.itemnotes_nonpublic ) %]
1157                                                 <p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</span></p>
1158                                             [% END %]
1159                                         </td>
1160                                     </tr>
1161                                 [% END # /FOREACH riloo %]
1162                             </table> <!-- /#checkedintable -->
1163                         [% END # /IF riloop %]
1164
1165                     [% IF Koha.Preference('CircSidebar') %]
1166                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
1167                             <div class="col-sm-2 col-sm-pull-10">
1168                                 <aside>
1169                                     [% INCLUDE 'circ-nav.inc' %]
1170                                 </aside>
1171                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1172                         </div> <!-- /.row -->
1173                     [% ELSE %]
1174                             </div> <!-- /.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 -->
1175                         </div> <!-- /.row -->
1176                     [% END %]
1177
1178                 </main>
1179             </div> <!-- /.col-sm-12 -->
1180         </div> <!-- /.row -->
1181
1182     [% IF ( ReturnClaims ) %]
1183         [% INCLUDE 'modals/resolve_return_claim.inc' %]
1184     [% END %]
1185
1186 [% MACRO jsinclude BLOCK %]
1187     [% INCLUDE 'datatables.inc' %]
1188     [% INCLUDE 'columns_settings.inc' %]
1189     [% INCLUDE 'calendar.inc' %]
1190     [% Asset.js("js/pages/circulation.js") | $raw %]
1191     [% IF ( ReturnClaims ) %]
1192         <script>
1193             /* Set a variable needed by resolve_claim_modal.js */
1194             var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1195         </script>
1196         [% Asset.js("js/resolve_claim_modal.js") | $raw %]
1197     [% END %]
1198
1199     <script>
1200         function Dopop(link) {
1201             var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
1202             $("#barcode").focus();
1203         }
1204         $(document).ready(function () {
1205             $("#checkin-form").preventDoubleFormSubmit();
1206             $(".modal.block").modal({ backdrop: 'static'}).on('shown.bs.modal', function() {
1207                 $("#barcode").prop("disabled", true);
1208                 $(".show_checkin_dialog").show();
1209             }).on('hidden.bs.modal', function() {
1210                 $("#barcode").prop("disabled", false).focus();
1211             });
1212             $(".modal.noblock").on('show.bs.modal', function() {
1213                 /* If the modal doesn't block further action, the backdrop should be hidden.
1214                    In order for this to happen smoothly we add a class to the body tag which
1215                    targeted in the CSS */
1216                 $("body").addClass("nobackdrop");
1217             }).modal()
1218             .on('shown.bs.modal', function() {
1219                 $("#barcode").prop("disabled", false).focus();
1220             }).on('hidden.bs.modal', function() {
1221                 $("#barcode").prop("disabled", false).focus();
1222             });
1223
1224             $("body").on("click", ".show_checkin_dialog button", function(e){
1225                 e.preventDefault();
1226                 $(".modal").modal("show");
1227             });
1228             [% IF reserve_id %]
1229                 $(".print-slip").on('click', function(e) {
1230                     e.preventDefault();
1231                     Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
1232                 });
1233                 [% IF print_slip %]
1234                     Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
1235                 [% END %]
1236             [% END %]
1237             var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
1238
1239             [% IF recall_slip %]
1240                 Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]');
1241             [% END %]
1242
1243             var returns_table = KohaTable("checkedintable", {
1244                     "bFilter":false,
1245                     "bPaginate":false,
1246                     "bInfo":false,
1247                     "bSort":false,
1248                     "dom": 'B<"clearfix">t',
1249                     }, table_settings);
1250
1251             $("#exemptcheck").change(function () {
1252                 if (this.checked == true) {
1253                     $("#barcode").addClass("input-warning");
1254                     $("#exemptfines").show();
1255                 } else {
1256                     $("#barcode").removeClass("input-warning");
1257                     $("#exemptfines").hide();
1258                 }
1259                 $("#barcode").focus();
1260             });
1261
1262             $("#dropboxcheck").change(function () {
1263                 if (this.checked == true) {
1264                     $("#barcode").addClass("input-warning");
1265                     $("#dropboxmode").show();
1266
1267                     $("#return_date_override_fields :input").prop('disabled', true);
1268                 } else {
1269                     $("#barcode").removeClass("input-warning");
1270                     $("#dropboxmode").hide();
1271
1272                     $("#return_date_override_fields :input").prop('disabled', false);
1273                 }
1274                 $("#barcode").focus();
1275             });
1276
1277             $("#forgivemanualholdsexpire").change(function () {
1278                 if (this.checked == true) {
1279                     $("#barcode").addClass("input-warning");
1280                     $("#forgivemanualholdsexpire-alert").show();
1281                 } else {
1282                     $("#barcode").removeClass("input-warning");
1283                     $("#forgivemanualholdsexpire-alert").hide();
1284                 }
1285                 $("#barcode").focus();
1286             });
1287
1288             [% IF(overduecharges) %]
1289                 $("#barcode").focus(function () {
1290                     if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
1291                         $("#barcode").addClass("input-warning");
1292                     } else {
1293                         $("#barcode").removeClass("input-warning");
1294                     }
1295                 });
1296                 $("#barcode").blur(function () {
1297                     $("#barcode").removeClass("input-warning");
1298                 });
1299             [% END %]
1300
1301             $('.openWin').on("click",function(e){
1302                 Dopop( $(this).data("url") );
1303             });
1304
1305             $('.submit').on("click",function(e){
1306                 this.form.submit();
1307             });
1308
1309             $('.cancel').on("click",function(e){
1310                 var docancel = $("<input>").attr("type", "hidden").attr("name", "canceltransfer").val(1);
1311                 $('#wrongtransferform').append(docancel);
1312                 this.form.submit();
1313             });
1314
1315             $('.print').on("click",function(e){
1316                 this.form.print_slip.value = 1;
1317                 let barcode = document.getElementById('confirm-hold-barcode');
1318                 if ( barcode ) barcode.remove();
1319                 if ($(this).attr('name') == "dotransfer") {
1320                     var dotransfer = $("<input>").attr("type", "hidden").attr("name", "dotransfer").val("Yes");
1321                     $('#mainform').append(dotransfer);
1322                 }
1323                 this.form.submit();
1324             });
1325
1326             $('.print-recall').on("click",function(e){
1327                 this.form.recall_slip.value = 1;
1328                 this.form.submit();
1329             });
1330
1331             $('.approve').on("click",function(e){
1332                 let barcode = document.getElementById('confirm-hold-barcode');
1333                 if ( barcode ) barcode.remove();
1334                 this.form.submit();
1335             });
1336             $('.cancel-hold').on("click",function(e){
1337                 this.form.cancel_reserve.value = 1;
1338                 this.form.submit();
1339             });
1340
1341             $('.action').on("click",function(e){
1342                 this.checked = false;
1343                 this.form.return_date_override.value = '';
1344                 this.form.return_date_override_remember.checked = false;
1345                 this.form.barcode.focus();
1346                 $("#return_date_remember").hide();
1347                 return false;
1348             });
1349
1350             $("#return_date_override_remember").on("change", function(){
1351                 if( $(this).prop("checked" ) ){
1352                     if( $("#return_date_override").val() == "" ){
1353                         $("#saved_return_date").text( _("No date selected") );
1354                     } else {
1355                         $("#saved_return_date").text( $("#return_date_override").val() );
1356                     }
1357                     $("#return_date_remember").show();
1358                 } else {
1359                     $("#return_date_remember").hide();
1360                 }
1361             });
1362             $('[data-toggle="tooltip"]').tooltip();
1363
1364             $(".printcheckinslip").on("click", function(e){
1365                 e.preventDefault();
1366                 var borrowernumber = $(this).data('borrowernumber');
1367                 window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&amp;print=checkinslip", "printwindow");
1368             });
1369
1370         });
1371     </script>
1372 [% END %]
1373
1374 [% INCLUDE 'intranet-bottom.inc' %]