Bug 36074: Add classes to materials specfied message on check in and checkout when...
[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 'i18n.inc' %]
10 [% PROCESS 'member-display-address-style.inc' %]
11 [% SET footerjs = 1 %]
12 [% BLOCK display_bormessagepref %]
13     [% IF ( bormessagepref ) %]
14         <li class="notification_method"><span>Patron notification:</span>
15             [% FOREACH mtt IN bormessagepref.keys %]
16                 [%~ IF ( mtt == 'email' ) %] <span>Email</span>[% END ~%]
17                 [%~ IF ( mtt == 'phone' ) %] <span>Phone</span>[% END ~%]
18                 [%~ IF ( mtt == 'sms' ) %] <span>SMS</span>[% END ~%]
19                 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
20             [% END %]
21         </li>
22            [% ELSE %]
23         <li class="notification_method none">Patron is not notified.</li>
24     [% END %]
25 [% END %]
26
27 [% BLOCK display_holdpatron_address %]
28     [% PROCESS 'display-address-style' %]
29 [% END %]
30
31 [% INCLUDE 'doc-head-open.inc' %]
32 <title>[% FILTER collapse %]
33     [% tx("Check in {title}", { title = title }) | html %] &rsaquo;
34     [% t("Circulation") | html %] &rsaquo;
35     [% t("Koha") | html %]
36 [% END %]</title>
37 [% INCLUDE 'doc-head-close.inc' %]
38 </head>
39
40 <body id="circ_returns" class="circ">
41     <span class="audio-alert-success"></span>
42
43     [% WRAPPER 'header.inc' %]
44         [% INCLUDE 'checkin-search.inc' %]
45     [% END %]
46
47     [% WRAPPER 'sub-header.inc' %]
48         [% WRAPPER breadcrumbs %]
49             [% WRAPPER breadcrumb_item %]
50                 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
51             [% END %]
52             [% WRAPPER breadcrumb_item bc_active= 1 %]
53                 <span>Check in</span>
54             [% END %]
55         [% END #/ WRAPPER breadcrumbs %]
56     [% END #/ WRAPPER sub-header.inc %]
57
58     <div class="main container-fluid">
59         <div class="row">
60             <div class="col-sm-12">
61                 <main>
62                     <div class="row">
63
64                         [% IF Koha.Preference('CircSidebar') %]
65                             <div class="col-sm-10 col-sm-push-2">
66                         [% ELSE %]
67                             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
68                         [% END %]
69                         [% INCLUDE 'messages.inc' %]
70
71                         [% BLOCK all_checkin_messages %]
72                             [% IF hold_auto_filled %]
73                                 <div class="dialog message hold-auto-filled">
74                                     [% IF ( reservenotes ) %]
75                                         <h4>Notes: [% reservenotes | html %]</h4>
76                                     [% END %]
77                                     <h3>Hold filled for:</h3>
78                                     <ul>
79                                         <li>
80                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 %]
81                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
82                                         </li>
83
84                                         [% INCLUDE display_holdpatron_address %]
85
86                                         [% IF ( patron.phone ) %]
87                                             <li>[% patron.phone | html %]</li>
88                                         [% END %]
89
90                                         [% IF ( patron.email ) %]
91                                             <li>
92                                                 [% IF ( transfertodo ) %]
93                                                     [% patron.email | html %]
94                                                 [% ELSE %]
95                                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
96                                                 [% END %]
97                                             </li>
98                                         [% END %]
99
100                                         [% UNLESS ( transfertodo) %]
101                                             [% INCLUDE display_bormessagepref %]
102                                         [% END %]
103
104                                         [% IF ( patron.is_debarred ) %]
105                                             <li class="error">Patron is RESTRICTED</li>
106                                         [% END %]
107
108                                         [% IF ( patron.gonenoaddress ) %]
109                                             <li class="error">Patron's address is in doubt</li>
110                                         [% END %]
111                                     </ul>
112
113                                     [% IF ( transfertodo ) %]
114                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
115                                     [% ELSE %]
116                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
117                                     [% END %]
118
119                                     <a href="#" class="btn btn-default print print-slip">
120                                         <i class="fa fa-print"></i> Print
121                                     </a>
122                                 </div> <!-- /.hold-auto-filled -->
123                             [% END # /IF hold_auto_filled %]
124
125                             [% IF ( trigger ) %]
126                                  <div id="transfer-trigger" class="dialog message">
127                                      <h3>Reason for transfer</h3>
128                                      <p>
129                                          [%- SWITCH trigger -%]
130                                              [%- CASE 'Manual' -%]<span>Manual</span>
131                                              [%- CASE 'StockrotationAdvance' -%]<span>Stock rotation advance</span>
132                                              [%- CASE 'StockrotationRepatriation' -%]<span>Stock rotation repatriation</span>
133                                              [%- CASE 'ReturnToHome' -%]<span>Return to home library</span>
134                                              [%- CASE 'ReturnToHolding' -%]<span>Return to holding library</span>
135                                              [%- CASE 'RotatingCollection' -%]<span>Rotating collection</span>
136                                              [%- CASE 'Reserve' -%]<span>Hold</span>
137                                              [%- CASE 'LostReserve' -%]<span>Lost hold</span>
138                                              [%- CASE 'CancelReserve' -%]<span>Cancelled hold</span>
139                                              [%- CASE 'TransferCancellation' -%]<span>Transfer was cancelled whilst in transit</span>
140                                              [%- CASE 'Recall' -%]<span>Recall</span>
141                                              [%- CASE 'RecallCancellation' -%]<span>Cancelled recall</span>
142                                          [%- END -%]
143                                      </p>
144                                  </div>
145                             [% END %]
146
147                             [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
148                                 <div class="dialog alert">
149                                     <strong>Error:</strong>
150                                     This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.
151                                 </div>
152                             [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
153                                 <div class="dialog alert">
154                                     <strong>Error:</strong>
155                                     The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.
156                                 </div>
157                             [% END %]
158
159                             [% IF additional_materials && !needs_confirm && !multiple_confirmed %]
160                                 <div id="materials" class="dialog message">
161                                     <span class="mats_spec_label">Note about the accompanying materials:</span>
162                                     <span class="mats_spec_message">[% additional_materials | html %]</span>
163                                 </div>
164                             [% END %]
165
166                             [% IF ( collectionItemNeedsTransferred ) %]
167                                  <div id="rotating-collection" class="dialog message">
168                                     <h3>Please transfer item to: [% Branches.GetName( collectionBranch ) | html %]</h3>
169                                     <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
170                                     <p>This item is part of a rotating collection.</p>
171                                     <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>
172                                 </div>
173                             [% END %]
174
175                             <!-- Patron has added an issue note -->
176                             [% IF ( issue.note) %]
177                                 <div class="dialog message">
178                                     <h1>Patron note</h1>
179                                     <p>[% issue.notedate | $KohaDates %]</p>
180                                     <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber | uri %]"> [% title | html %]</a> [% author | html %]</p>
181                                     <p>[% issue.note | html %]</p>
182                                 </div>
183                             [% END %]
184
185                             <!-- Patron has fines -->
186                             [% IF ( fines ) %]
187                                 <div class="dialog alert">
188                                     <h3>Patron has outstanding fines of [% fines | html %].</h3>
189                                     <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber | uri %]">Make payment</a>.</p>
190                                 </div>
191                             [% END %]
192
193                             <!-- Item has return claim(s) -->
194                             [% IF ( ClaimAutoResolved ) %]
195                             <div class="dialog alert resolved-claim">
196                             <p><strong>The previously claimed returned item has been found, automatically resolving the associated claim.</strong></p>
197                             </div>
198                             [% ELSIF( ReturnClaims ) %]
199                                 <div class="dialog alert return-claim">
200                                     <h3>This item has been claimed as returned by:</h3>
201                                     <ul>
202                                         [% FOREACH rc IN ReturnClaims %]
203                                             <li>
204                                                 [% 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>
205                                             </li>
206                                         [% END %]
207                                     </ul>
208                                 </div>
209                             [% END %]
210
211                             <!-- Patron has waiting holds -->
212                             [% IF ( waiting_holds ) %]
213                                 <div id="awaiting-pickup" class="dialog message">
214                                     <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>
215                                     <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber | uri %]">Check out to this patron</a>.</p>
216                                 </div>
217                             [% END %]
218
219                             <!-- Patron is restricted and checkin was backdated -->
220                             [% IF return_date_was_overriden && issue.patron.is_debarred %]
221                                 <div id="restricted_backdated" class="dialog message">
222                                     <h3>
223                                         [% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %]
224                                         is restricted. Please verify this patron should still be restricted.
225                                     </h3>
226                                 </div>
227                             [% END %]
228
229                             <!-- Bundle has items missing -->
230                             [% IF missing_items %]
231                                 <div id="bundle_missing_items" class="dialog alert">
232                                     <h3>Bundle had missing items</h3>
233                                     <p>Bundle contents list updated</p>
234                                     <p>
235                                         <a class="btn btn-default btn-xs" role="button" data-toggle="modal" href="#bundleContentsModal"><i class="fa-solid fa-eye aria-hidden="true"></i> View updated contents list</a>
236                                         <a class="btn btn-default btn-xs" role="button" data-toggle="modal" href="#bundleMissingModal"><i class="fa-solid fa-eye aria-hidden="true"></i> View list of missing items</a>
237                                     </p>
238                                 </div>
239                             [% END %]
240
241                             <!-- Bundle contained unexpected items -->
242                             [% IF unexpected_items %]
243                                 <div id="bundle_unexpected_items" class="dialog alert">
244                                     <h3>Bundle had unexpected items</h3>
245                                     <p>Please place the following items to one side</p>
246                                     <ul>
247                                     [% FOREACH unexpected_item IN unexpected_items %]
248                                         <li>[% INCLUDE 'biblio-title.inc' biblio=unexpected_item.biblio %] - [% unexpected_item.barcode | html %]</li>
249                                     [% END %]
250                                     </ul>
251                                 </div>
252                             [% END %]
253
254                             <!-- Item checked in outside of bundle -->
255                             [% IF InBundle %]
256                                 <div id="bundle_item_outside" class="dialog alert audio-alert-warning">
257                                     <h3>Item belongs in bundle</h3>
258                                     <p>This item belongs to a bundle: [% INCLUDE 'biblio-title.inc' biblio=InBundle.biblio %] - [% InBundle.barcode | html %]</p>
259                                     <p><button class="btn btn-default btn-xs bundle_remove" role="button" data-itemnumber="[% itemnumber | uri %]" data-hostnumber="[% InBundle.itemnumber | uri %]"><i class="fa fa-minus"></i> Remove from bundle</button></p>
260                                 </div>
261                             [% END %]
262
263                             [% IF ( errmsgloop ) %]
264                                 <div class="dialog alert audio-alert-warning">
265                                     <h3>Check in message</h3>
266                                     [% IF itembiblionumber %]
267                                         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
268                                     [% END %]
269                                     [% FOREACH errmsgloo IN errmsgloop %]
270                                         [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
271                                             <p class="problem ret_nflupdate">
272                                             [% IF errmsgloo.NotForLoanStatusUpdated.to == 'ONLYMESSAGE' %]
273                                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) | html %]
274                                             [% ELSE %]
275                                                 Not for loan status updated.
276                                                 <br />Old value:
277                                                 [% IF errmsgloo.NotForLoanStatusUpdated.from %]
278                                                     <span class="ret_updatedfrom">
279                                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.from ) | html %].
280                                                     </span>
281                                                 [% ELSE %]
282                                                     Available for loan.
283                                                 [% END %]
284                                                 <br />New value:
285                                                 [% IF errmsgloo.NotForLoanStatusUpdated.to %]
286                                                     <span class="ret_updatedto">
287                                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.to ) | html %].
288                                                     </span>
289                                                 [% ELSE %]
290                                                     Available for loan.
291                                                 [% END %]
292                                             [% END %]
293                                             </p>
294                                         [% END %]
295                                         [% IF ( errmsgloo.ItemLocationUpdated ) %]
296                                              <p class="problem ret_location_update">
297                                                  Item shelving location updated.
298                                                 <br /><span>Old value:</span>
299                                                 [% IF errmsgloo.ItemLocationUpdated.from %]
300                                                     [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.from ) %]
301                                                     [% IF errmsgloo.ItemLocationUpdated.from == '' %]
302                                                         <span>empty</span>
303                                                     [% ELSIF av_description == '' %]
304                                                         [% errmsgloo.ItemLocationUpdated.from | html %] (<span>No description available</span>)
305                                                     [% ELSE %]
306                                                         [% av_description | html %]
307                                                     [% END %]
308                                                 [% ELSE %]
309                                                     <span>"Blank"</span>
310                                                 [% END %]
311                                                 <br />New value:
312                                                 [% IF errmsgloo.ItemLocationUpdated.to %]
313                                                     [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.to ) %]
314                                                     [% IF errmsgloo.ItemLocationUpdated.to == '' %]
315                                                         empty
316                                                     [% ELSIF av_description == '' %]
317                                                         [% errmsgloo.ItemLocationUpdated.to | html %] (Not an authorized value)
318                                                     [% ELSE %]
319                                                         [% av_description | html %]
320                                                     [% END %]
321                                                 [% ELSE %]
322                                                     "Blank"
323                                                 [% END %]
324                                              </p>
325                                         [% END %]
326                                         [% IF ( errmsgloo.badbarcode ) %]
327                                             <p class="problem ret_badbarcode">No item with barcode: [% errmsgloo.msg | html %]</p>
328                                         [% END %]
329                                         [% IF ( errmsgloo.ispermanent ) %]
330                                             <p class="problem ret_ispermenant">Please return item to: [% Branches.GetName( errmsgloo.msg ) | html %]</p>
331                                         [% END %]
332                                         [% IF ( errmsgloo.notissued ) %]
333                                             <p class="problem ret_notissued">Not checked out.</p>
334                                         [% END %]
335                                         [% IF ( errmsgloo.localuse) %]
336                                             <p class="problem ret_localuse">Local use recorded</p>
337                                         [% END %]
338                                         [% IF ( errmsgloo.transferred ) %]
339                                             <p class="problem ret_transferred">Item received from [% Branches.GetName( errmsgloo.transferred ) | html %]</p>
340                                         [% END %]
341                                         [% IF ( errmsgloo.waslost ) %]
342                                             [% IF Koha.Preference('BlockReturnOfLostItems') %]
343                                                 <p class="problem ret_blocked">Item is lost, cannot be checked in.</p>
344                                             [% ELSE %]
345                                                 <p class="problem ret_checkedin">Item was lost, now found.</p>
346                                             [% END %]
347                                             [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
348                                                 <p class="problem ret_refund">A refund for the lost item charge has been applied to the borrowing patron's account.</p>
349                                             [% ELSIF LostItemFeeCharged and not Koha.Preference('BlockReturnOfLostItems') %]
350                                                 <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>
351                                             [% ELSIF LostItemFeeRestored and not Koha.Preference('BlockReturnOfLostItems') %]
352                                                 <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>
353                                             [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
354                                                <h5>Cannot check in</h5>
355                                                <p><strong>NOT CHECKED IN</strong></p>
356                                             [% ELSE %]
357                                                 <p class="problem ret_feeremains">Any lost item fees for this item will remain on the patron's account.</p>
358                                             [% END %]
359                                             [% IF ProcessingFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
360                                                 <p class="problem ret_refund">A refund for the lost item processing charge has been applied to the borrowing patron's account.</p>
361                                             [% ELSE %]
362                                                 <p class="problem ret_feeremains">Any processing fees for this item will remain on the patron's account.</p>
363                                             [% END %]
364                                         [% END %]
365                                         [% IF ( errmsgloo.withdrawn ) %]
366                                             [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %]
367                                                <h5>Cannot check in</h5>
368                                                <p><strong>NOT CHECKED IN</strong></p>
369                                             [% END %]
370                                            <p class="problem ret_withdrawn">
371                                                <span>Item has been withdrawn</span>
372                                                [% item_withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %]
373                                                [% IF (item_withdrawn_lib) %]<span class="ci-withdrawn">([% item_withdrawn_lib | html %])</span>[% END %]
374                                            </p>
375                                         [% END %]
376                                         [% IF ( errmsgloo.debarred ) %]
377                                             <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>
378                                         [% END %]
379                                         [% IF ( errmsgloo.prevdebarred ) %]
380                                             <p class="problem ret_prevdebarred"><strong>Reminder: </strong>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
381                                         [% END %]
382                                         [% IF ( errmsgloo.foreverdebarred ) %]
383                                             <p class="problem ret_foreverdebarred"><strong>Reminder: </strong>Patron has an indefinite restriction.</p>
384                                         [% END %]
385                                         [% IF errmsgloo.data_corrupted %]
386                                             <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_panel">about page</a> and correct all errors shown on the "System information" tab</p>
387                                         [% END %]
388                                     [% END # /FOREACH errmsgloo %]
389                                 </div> <!-- /.dialog.dialog-alert -->
390                             [% END #/IF errmsgloop %]
391
392                             [% IF ( checkinmsg ) %]
393                                 [% IF ( checkinmsgtype == 'alert' ) %]
394                                     <div class="dialog alert">
395                                 [% ELSE %]
396                                     <div class="dialog message">
397                                 [% END %]
398                                         <p class="ret_checkinmsg">[% checkinmsg | html_line_break %]</p>
399                                     </div>
400                             [% END # /IF checkinmsg %]
401
402                             [% IF bundle_items && !missing_items %]
403                                 <div class="dialog message">
404                                     <h3>Bundle verified</h3>
405                                     <p>The bundle content was verified</p>
406                                     <p><a class="btn btn-default btn-xs" role="button" data-toggle="modal" href="#bundleContentsModal"><i class="fa-solid fa-eye aria-hidden="true"></i> View contents list</a></p>
407                                 </div>
408                             [% END %]
409                         [% END # /BLOCK all_checkin_messages %]
410
411                         [% IF needs_confirm %]
412                             <div id="circ-needsconfirmation-modal" class="modal fade audio-alert-action block">
413                                 <div class="modal-dialog">
414                                     <div class="modal-content">
415                                         <div class="modal-header">
416                                             <h3>Please confirm checkin</h3>
417                                         </div>
418                                         <div class="modal-body">
419                                             <ul>
420                                                 <li>
421                                                     <span class="mats_spec_label">Please confirm that the accompanying materials are present: </span>
422                                                     <span class="mats_spec_message">[% additional_materials | html %]</span>
423                                                 </li>
424                                             </ul>
425                                         </div>
426                                         <div class="modal-footer">
427                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
428                                                 [% INCLUDE 'csrf-token.inc' %]
429                                                 <input type="hidden" name="op" value="cud-checkin" />
430                                                 <input type="hidden" name="barcode" value="[% item.barcode | html %]" />
431                                                 <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
432                                                 <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
433                                                 <input type="hidden" name="multiple_confirm" value="1" />
434                                                 <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
435                                                 [% FOREACH inputloo IN inputloop %]
436                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
437                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
438                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
439                                                 [% END %]
440                                                 <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, checkin (Y)</button>
441                                             </form>
442                                             <button type="button" data-dismiss="modal" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't checkin (N)</button>
443                                         </div>
444                                     </div>
445                                 </div>
446                             </div>
447                         [% END %]
448
449                         [% IF items_bundle_return_confirmation %]
450                         <div id="bundle-needsconfirmation-modal" class="modal fade audio-alert-action block">
451                             <div class="modal-dialog modal-wide">
452                                 <div class="modal-content">
453                                     <form method="post">
454                                         [% INCLUDE 'csrf-token.inc' %]
455                                         <div class="modal-header">
456                                             <h3>Please confirm bundle contents for [% item.barcode | html %]</h3>
457                                         </div>
458                                         <div class="modal-body">
459
460                                             <table class="table table-condensed table-bordered" id="items-bundle-contents-table">
461                                                 <thead>
462                                                     <tr>
463                                                         <th>Title</th>
464                                                         <th>Author</th>
465                                                         <th>Item type</th>
466                                                         <th>Barcode</th>
467                                                         [% IF !item.onloan %]
468                                                         <th>Status</th>
469                                                         [% END %]
470                                                     </tr>
471                                                 </thead>
472                                                 <tbody>
473                                                     [% FOREACH bundle_item IN item.bundle_items %]
474                                                     [% IF !item.onloan %]
475                                                     <tr data-barcode="[% bundle_item.barcode | html %]">
476                                                         <td>[% INCLUDE 'biblio-title.inc' biblio=bundle_item.biblio link = 1 %]</td>
477                                                         <td>[% bundle_item.biblio.author | html %]</td>
478                                                         <td>[% ItemTypes.GetDescription(bundle_item.itype) | html %]</td>
479                                                         <td>[% bundle_item.barcode | html %]</td>
480                                                         <td>
481                                                             [% IF bundle_item.itemlost %]
482                                                                 [% itemlost_description = AuthorisedValues.GetDescriptionByKohaField({ kohafield = 'items.itemlost', authorised_value = bundle_item.itemlost }) %]
483                                                                 <span class="lost">[% itemlost_description | html %]</span>
484                                                             [% ELSE %]
485                                                                 Present
486                                                             [% END %]
487                                                         </td>
488                                                     </tr>
489                                                     [% ELSIF !bundle_item.itemlost %]
490                                                     <tr data-barcode="[% bundle_item.barcode | html %]">
491                                                         <td>[% INCLUDE 'biblio-title.inc' biblio=bundle_item.biblio link = 1 %]</td>
492                                                         <td>[% bundle_item.biblio.author | html %]</td>
493                                                         <td>[% ItemTypes.GetDescription(bundle_item.itype) | html %]</td>
494                                                         <td>[% bundle_item.barcode | html %]</td>
495                                                     </tr>
496                                                     [% END %]
497                                                     [% END %]
498                                                 </tbody>
499                                             </table>
500
501                                             <div class="form-group">
502                                                 <label for="verify-items-bundle-contents-barcodes">Barcodes <span id="verify-progress" class="pull-right" style="display: none"><span id="verified">0</span> of <span id="expected"></span> verified</span></label>
503                                                 <textarea autocomplete="off" id="verify-items-bundle-contents-barcodes" name="verify-items-bundle-contents-barcodes" class="form-control"></textarea>
504                                                 [% IF item.onloan %]
505                                                 <div class="help-block">Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost</div>
506                                                 [% ELSE %]
507                                                 <div class="help-block">Optionally scan all barcodes of items found in the items bundle to perform an inventory check. If any items are missing, they will be marked as lost</div>
508                                                 [% END %]
509                                             </div>
510
511                                             <div id="bundle-feedback" class="alert" style="display:none"></div>
512
513                                         </div>
514                                         <div class="modal-footer">
515                                             <input type="hidden" name="barcode" value="[% item.barcode | html %]">
516                                             <input type="hidden" name="op" value="cud-checkin">
517                                             <input type="hidden" name="confirm_items_bundle_return" value="1">
518                                             [% FOREACH inputloo IN inputloop %]
519                                             <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
520                                             <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
521                                             <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
522                                             [% END %]
523                                             [% IF item.onloan %]
524                                             <button type="submit" class="btn btn-default"><i class="fa fa-check"></i> Confirm checkin and mark missing items as lost</button>
525                                             <button type="submit" class="btn btn-default" name="do_not_verify_items_bundle_contents" value="1"><i class="fa fa-check"></i> Confirm checkin without verifying bundle contents</button>
526                                             [% ELSE %]
527                                             <button type="submit" class="btn btn-default"><i class="fa fa-check"></i> Confirm inventory check and mark items as lost</button>
528                                             [% END %]
529                                             <button type="button" data-dismiss="modal" class="btn btn-default"><i class="fa fa-xmark"></i> Cancel</button>
530                                         </div>
531                                     </form>
532                                 </div>
533                             </div>
534                         </div>
535                         [% END %]
536
537                         [% IF wrongbranch %]
538                             <div id="wrong-branch-modal" class="modal fade audio-alert-action block">
539                                 <div class="modal-dialog">
540                                     <div class="modal-content">
541                                         <div class="modal-header">
542                                             <h3>
543                                                 Cannot check in
544                                             </h3>
545                                         </div>
546                                         <div class="modal-body">
547                                             <p>
548                                                 <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
549                                                     [% item.barcode | html %]: [% title | html %]
550                                                 </a>
551                                             </p>
552                                             <p>
553                                                 <strong>
554                                                     NOT CHECKED IN
555                                                 </strong>
556                                             </p>
557                                             <p>
558                                                 This item must be checked in at following library:
559                                                 <strong>
560                                                     [% Branches.GetName( rightbranch ) | html %]
561                                                 </strong>
562                                             </p>
563                                             [% INCLUDE all_checkin_messages %]
564                                         </div> <!-- /.modal-body -->
565                                         <div class="modal-footer">
566                                             <button type="button" data-dismiss="modal" class="btn btn-default"><i class="fa fa-check"></i> OK</button>
567                                         </div>
568                                     </div> <!-- /.modal-content -->
569                                 </div> <!-- /.modal-dialog -->
570                             </div> <!-- /#wrong-branch-modal -->
571                         [% END # /IF wrongbranch %]
572
573                         <!-- case of a mistake in transfer loop -->
574                         [% UNLESS ( hold_auto_filled && diffbranch ) %]
575                             [% IF WrongTransfer && !transfertodo %]
576                                 [% IF Koha.Preference('TransfersBlockCirc') %]
577                                     <div id="wrong-transfer-modal" class="modal fade audio-alert-action block">
578                                 [% ELSE %]
579                                     <div id="wrong-transfer-modal" class="modal fade audio-alert-action noblock">
580                                 [% END %]
581                                     <div class="modal-dialog">
582                                         <div class="modal-content">
583                                             <form method="post" action="returns.pl" name="wrongtransferform" id="wrongtransferform">
584                                                 [% INCLUDE 'csrf-token.inc' %]
585                                                 <input type="hidden" name="op" value="cud-transfer" />
586                                                 <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
587                                                 <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
588                                                 <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
589                                                 <input type="hidden" name="transit" value="[% NewTransfer | html %]" />
590                                                 [% FOREACH inputloo IN inputloop %]
591                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
592                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
593                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
594                                                 [% END %]
595
596                                                 <div class="modal-header">
597                                                     <h3>
598                                                         Wrong transfer detected, please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]
599                                                     </h3>
600                                                 </div>
601
602                                                 <div class="modal-body">
603                                                     <p>
604                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a>
605                                                     </p>
606
607                                                     [% INCLUDE all_checkin_messages %]
608                                                 </div>
609
610                                                 <div class="modal-footer">
611                                                     <!-- CONFIRM -->
612                                                     <button class="btn btn-default approve" type="submit" accesskey="y"><i class="fa fa-check"></i> OK (Y)</button>
613                                                     <!-- PRINT SLIP -->
614                                                     <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>
615                                                     <!-- CANCEL TRANSFER -->
616                                                     <button type="button" data-dismiss="modal" class="btn btn-default deny cancel" accesskey="x"><i class="fa fa-times"></i> Cancel transfer (X)</button>
617                                                 </div> <!-- /.modal-footer -->
618                                             </form> <!-- /wrongtransferform -->
619                                         </div> <!-- /.modal-content -->
620                                     </div> <!-- /.modal-dialog -->
621                                 </div> <!-- /#wrong-transfer-modal -->
622                             [% END # /IF WrongTransfer && !transfertodo %]
623                         [% END # /UNLESS hold_auto_filled && diffbranch %]
624
625                         [% IF ( found ) %]
626                             [% IF ( waiting ) %]
627                                 <div id="hold-found1" class="modal fade audio-alert-action block">
628                                     <div class="modal-dialog">
629                                         <div class="modal-content">
630                                             <form method="post" action="returns.pl" class="confirm">
631                                                 [% INCLUDE 'csrf-token.inc' %]
632                                                 <div class="modal-header">
633                                                     <h3>
634                                                         Hold found (item is already waiting):
635                                                         <br/>
636                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
637                                                         <div class="hold-found-barcode">
638                                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% item.barcode | html %]</a>
639                                                         </div>
640                                                     </h3>
641                                                 </div>
642
643                                                 <div class="modal-body">
644                                                     [% IF ( reservenotes ) %]
645                                                         <h4>Notes: [% reservenotes | html %]</h4>
646                                                     [% END %]
647
648                                                     <h4>Hold for:</h4>
649                                                     <ul>
650                                                         <li>
651                                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
652                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
653                                                         </li>
654                                                         [% INCLUDE display_holdpatron_address %]
655                                                         [% IF ( patron.phone ) %]
656                                                             <li> [% patron.phone | html %]</li>
657                                                         [% END %]
658
659                                                         [% IF ( patron.email ) %]
660                                                             <li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>
661                                                         [% END %]
662
663                                                         [% IF ( patron.is_debarred ) %]
664                                                             <li class="error">Patron is RESTRICTED</li>
665                                                         [% END %]
666
667                                                         [% IF ( patron.gonenoaddress ) %]
668                                                             <li class="error">Patron's address is in doubt</li>
669                                                         [% END %]
670                                                     </ul>
671
672                                                     [% IF ( transfertodo ) %]
673                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
674                                                     [% ELSE %]
675                                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
676                                                     [% END %]
677
678                                                     [% FOREACH inputloo IN inputloop %]
679                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
680                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
681                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
682                                                     [% END %]
683
684                                                     <input type="hidden" name="op" value="cud-affect_reserve" />
685                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
686                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
687                                                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
688                                                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
689                                                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
690                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
691                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
692                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
693
694                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
695                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
696                                                     [% INCLUDE all_checkin_messages %]
697                                                 </div> <!-- /.modal-body -->
698
699                                                 <div class="modal-footer">
700                                                     <input type="hidden" name="cancel_reserve" value="0" />
701                                                     <input type="hidden" name="cancel_reason" value="" />
702                                                     <input id="confirm-hold-barcode" type="hidden" name="barcode" value="[% barcode | html %]" />
703
704                                                     <button type="submit" class="btn btn-default approve" data-dismiss="modal" accesskey="y">
705                                                         <i class="fa fa-check"></i> Confirm hold (Y)
706                                                     </button>
707
708                                                     <input type="hidden" name="print_slip" value="0" />
709                                                     <button type="button" class="btn btn-default print" accesskey="P">
710                                                         <i class="fa fa-print"></i> Print slip and confirm (P)
711                                                     </button>
712                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default" accesskey="I">
713                                                         <i class="fa fa-times"></i> Ignore (I)
714                                                     </button>
715
716                                                     <fieldset class="action">
717                                                         [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
718                                                         [% IF hold_cancellation.count %]
719                                                             <select name="cancellation-reason" id="cancellation-reason">
720                                                                 <option value="">No reason given</option>
721                                                                 [% FOREACH reason IN hold_cancellation %]
722                                                                     <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
723                                                                 [% END %]
724                                                             </select>
725                                                         [% END %]
726                                                         <button type="button" class="btn btn-default deny cancel-hold" accesskey="X">
727                                                             <i class="fa fa-trash-can"></i> Cancel hold (X)
728                                                         </button>
729                                                     </fieldset>
730
731                                                 </div> <!-- /.modal-footer -->
732                                             </form> <!-- /.confirm -->
733                                         </div> <!-- /.modal-content -->
734                                     </div> <!-- /.modal-dialog -->
735                                 </div> <!-- /#hold-found1 -->
736                             [% END # /IF waiting %]
737
738                             [% IF transfer || needstransfer %]
739                                 [% IF Koha.Preference('TransfersBlockCirc') %]
740                                     <div id="item-transfer-modal" class="modal fade audio-alert-action block">
741                                 [% ELSE %]
742                                     <div id="item-transfer-modal" class="modal fade audio-alert-action noblock">
743                                 [% END %]
744                                     <div class="modal-dialog">
745                                         <div class="modal-content">
746                                             <form method="post" action="returns.pl" name="mainform" id="mainform">
747                                                 [% INCLUDE 'csrf-token.inc' %]
748
749                                                 <input type="hidden" name="print_slip" value="0" />
750
751                                                 <div class="modal-header">
752                                                     <h3>
753                                                         Please return this item to [% IF transfer %][% Branches.GetName( transfer ) | html %][% ELSE %][% Branches.GetName( returnbranch ) | html %][% END %]
754                                                     </h3>
755                                                 </div>
756                                                 <div class="modal-body">
757                                                     <p>
758                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
759                                                             [% item.barcode | html %]: [% title | html %]
760                                                         </a>
761                                                     </p>
762                                                     [% IF !transfer %]
763                                                         <p>
764                                                             Transfer now?
765                                                         </p>
766                                                     [% END %]
767                                                     <input type="hidden" name="tobranch" value="[% returnbranch | html %]" />
768                                                     <input type="hidden" name="transferitem" value="[% itemnumber | html %]" />
769                                                     <input type="hidden" name="barcode" value="0" />
770                                                     <input type="hidden" name="op" value="cud-dotransfer" />
771                                                     <input type="hidden" name="trigger" value="[% trigger | html %]" />
772                                                     [% INCLUDE all_checkin_messages %]
773                                                 </div>
774                                                 <div class="modal-footer">
775                                                     [% IF !transfer %]
776                                                         <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve" accesskey="y"><i class="fa fa-check"></i> Yes (Y)</button>
777                                                         <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>
778                                                         <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>
779                                                     [% ELSE %]
780                                                         <button type="button" data-dismiss="modal" class="btn btn-default" accesskey="y"><i class="fa fa-check"></i> OK (Y)</button>
781                                                         <button type="button" data-dismiss="modal" class="btn btn-default 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>
782                                                     [% END %]
783                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
784                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
785                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
786                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
787                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
788                                                     [% FOREACH inputloo IN inputloop %]
789                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
790                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
791                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
792                                                     [% END %]
793                                                 </div> <!-- /.modal-footer -->
794                                             </form> <!-- /#mainform -->
795                                         </div> <!-- /.modal-content -->
796                                     </div> <!-- /.modal-dialog -->
797                                 </div> <!-- /#item-transfer-modal -->
798                             [% END # /IF transfer || needstransfer %]
799
800                             <!-- case of simple return no issue or transfer but with a hold  -->
801                             [% IF ( reserved and !recalled and !waitingrecall ) %]
802                                 <!-- reserved -->
803                                 <div id="hold-found2" class="modal fade audio-alert-action block">
804                                     <div class="modal-dialog">
805                                         <div class="modal-content">
806                                             <form method="post" action="returns.pl" class="confirm">
807                                                 [% INCLUDE 'csrf-token.inc' %]
808
809                                                 <input type="hidden" name="print_slip" value="0" />
810
811                                                 <div class="modal-header">
812                                                     <h3>
813                                                         Hold found:
814                                                         <br/>
815                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
816                                                         <div class="hold-found-barcode">
817                                                             (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% item.barcode | html %]</a>)
818                                                         </div>
819                                                     </h3>
820                                                 </div>
821
822                                                 <div class="modal-body">
823                                                     [% IF ( reservenotes ) %]
824                                                         <h4>Notes:</h4>
825                                                         <p>[% reservenotes | html %]</p>
826                                                         <hr />
827                                                     [% END %]
828                                                     <h5>Hold for:</h5>
829                                                     <ul>
830                                                         <li>
831                                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
832                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
833                                                         </li>
834
835                                                         [% INCLUDE display_holdpatron_address %]
836
837                                                         [% IF ( patron.phone ) %]
838                                                             <li>[% patron.phone | html %]</li>
839                                                         [% END %]
840
841                                                         [% IF ( patron.email ) %]
842                                                             <li>
843                                                                 [% IF ( transfertodo ) %]
844                                                                     [% patron.email | html %]
845                                                                 [% ELSE %]
846                                                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
847                                                                 [% END %]
848                                                             </li>
849                                                         [% END %]
850
851                                                         [% UNLESS ( transfertodo) %]
852                                                             [% INCLUDE display_bormessagepref %]
853                                                             [% IF patron.primary_contact_method %]
854                                                                 <li id="main_contact_method">Main contact method: <span>[% patron.primary_contact_method | html %]</span></li>
855                                                             [% END %]
856                                                         [% END %]
857
858                                                         [% IF ( patron.is_debarred ) %]
859                                                             <li class="error">Patron is RESTRICTED</li>
860                                                         [% END %]
861
862                                                         [% IF ( patron.gonenoaddress ) %]
863                                                             <li class="error">Patron's address is in doubt</li>
864                                                         [% END %]
865                                                     </ul>
866                                                     [% IF ( transfertodo ) %]
867                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
868                                                     [% ELSE %]
869                                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
870                                                     [% END %]
871
872                                                     [% FOREACH inputloo IN inputloop %]
873                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
874                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
875                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
876                                                     [% END %]
877
878                                                     <input type="hidden" name="op" value="cud-affect_reserve" />
879                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
880                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
881                                                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
882                                                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
883                                                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
884                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
885                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
886                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
887                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
888                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
889                                                     [% INCLUDE all_checkin_messages %]
890                                                 </div>
891
892                                                 <div class="modal-footer">
893                                                     [% IF ( transfertodo ) %]
894                                                         <button type="submit" class="btn btn-default approve" accesskey="y">
895                                                             <i class="fa fa-check"></i> Confirm hold and transfer (Y)
896                                                         </button>
897                                                         <button type="button" class="btn btn-default print" accesskey="p">
898                                                             <i class="fa fa-print"></i> Print slip, transfer, and confirm (P)
899                                                         </button>
900                                                     [% ELSE %]
901                                                         <button type="submit" class="btn btn-default approve" accesskey="y">
902                                                             <i class="fa fa-check"></i> Confirm hold (Y)
903                                                         </button>
904                                                         <button type="button" class="btn btn-default print" accesskey="p">
905                                                             <i class="fa fa-print"></i> Print slip and confirm (P)
906                                                         </button>
907                                                     [% END %]
908
909                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny" accesskey="i">
910                                                         <i class="fa fa-times"></i> Ignore (I)
911                                                     </button>
912                                                 </div> <!-- /.modal-footer -->
913                                             </form> <!-- /.confirm -->
914                                         </div> <!-- /.modal-content -->
915                                     </div> <!-- /.modal-dialog -->
916                                 </div> <!-- /#hold-found2 -->
917                             [% END #/IF reserved %]
918
919                             [% IF ( recalled ) %]
920                                 <!-- recalled -->
921                                 <div id="recalled" class="modal fade audio-alert-action block">
922                                     <div class="modal-dialog">
923                                         <div class="modal-content">
924                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" class="confirm">
925                                                 [% INCLUDE 'csrf-token.inc' %]
926
927                                                 <div class="modal-header">
928                                                     <h3>
929                                                         Recall found:
930                                                         <br/>
931                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% recall.biblio_id | uri %]">[% recall.biblio.title | html %]</a>
932                                                         [% IF recall.item %]
933                                                             <div class="recall-found-barcode">
934                                                                 (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% recall.biblio_id | uri %]&amp;itemnumber=[% recall.item_id | uri %]">[% recall.item.barcode | html %]</a>)
935                                                             </div>
936                                                         [% END %]
937                                                     </h3>
938                                                 </div>
939
940                                                 <div class="modal-body">
941                                                     [% IF ( recall.notes ) %]
942                                                         <h4>Notes:</h4>
943                                                         <p>[% recall.notes | html %]</p>
944                                                         <hr />
945                                                     [% END %]
946                                                     <h5>Recall placed by:</h5>
947                                                     <ul>
948                                                         <li>
949                                                             [% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_recalls" %]
950                                                             <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
951                                                         </li>
952
953                                                         [% INCLUDE display_holdpatron_address patron=recall.patron %]
954
955                                                         [% IF ( recall.patron.phone ) %]
956                                                             <li>[% recall.patron.phone | html %]</li>
957                                                         [% END %]
958
959                                                         [% IF ( recall.patron.email ) %]
960                                                             <li>
961                                                                 [% IF ( transfertodo ) %]
962                                                                     [% recall.patron.email | html %]
963                                                                 [% ELSE %]
964                                                                     <a id="boremail" href="mailto:[% recall.patron.email | html %]">[% recall.patron.email | html %]</a>
965                                                                 [% END %]
966                                                             </li>
967                                                         [% END %]
968
969                                                         [% UNLESS ( transfertodo) %]
970                                                             [% INCLUDE display_bormessagepref %]
971                                                         [% END %]
972
973                                                         [% IF ( recall.patron.is_debarred ) %]
974                                                             <li class="error">Patron is RESTRICTED</li>
975                                                         [% END %]
976
977                                                         [% IF ( recall.patron.gonenoaddress ) %]
978                                                             <li class="error">Patron's address is in doubt</li>
979                                                         [% END %]
980                                                     </ul>
981                                                     [% IF ( transfertodo ) %]
982                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
983                                                     [% ELSE %]
984                                                         <h4><strong>Recall at</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
985                                                     [% END %]
986
987                                                     <input type="hidden" name="op" value="cud-affect_recall">
988                                                     <input type="hidden" name="recall_id" value="[% recall.id | html %]">
989                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]">
990                                                     <input type="hidden" name="returnbranch" value="[% Branches.GetLoggedInBranchcode | html %]">
991                                                     <input type="hidden" name="recall_slip" value="0">
992
993                                                 </div>
994
995                                                 <div class="modal-footer">
996                                                     [% IF ( transfertodo ) %]
997                                                         <button type="submit" class="btn btn-default approve" accesskey="Y">
998                                                             <i class="fa fa-check"></i> Confirm recall and transfer (Y)
999                                                         </button>
1000                                                         <button type="button" class="btn btn-default print-recall" accesskey="P">
1001                                                             <i class="fa fa-print"></i> Print slip, transfer, and confirm (P)
1002                                                         </button>
1003                                                     [% ELSE %]
1004                                                         <button type="submit" class="btn btn-default approve" accesskey="Y">
1005                                                             <i class="fa fa-check"></i> Confirm recall (Y)
1006                                                         </button>
1007                                                         <button type="button" class="btn btn-default print-recall" accesskey="P">
1008                                                             <i class="fa fa-print"></i> Print slip and confirm (P)
1009                                                         </button>
1010                                                     [% END %]
1011
1012                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default">
1013                                                         <i class="fa fa-times"></i> Ignore
1014                                                     </button>
1015                                                 </div> <!-- /.modal-footer -->
1016                                             </form> <!-- /.confirm -->
1017                                         </div> <!-- /.modal-content -->
1018                                     </div> <!-- /.modal-dialog -->
1019                                 </div> <!-- /#recalled -->
1020                             [% END #/IF recalled %]
1021
1022                             [% IF ( waitingrecall ) %]
1023                                 <!-- recalled -->
1024                                 <div id="recalledwaiting" class="modal fade audio-alert-action block">
1025                                     <div class="modal-dialog">
1026                                         <div class="modal-content">
1027                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" class="confirm">
1028                                                 [% INCLUDE 'csrf-token.inc' %]
1029
1030                                                 <div class="modal-header">
1031                                                     <h3>
1032                                                         Recall found (item is already waiting):
1033                                                         <br/>
1034                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% recall.biblio_id | uri %]">[% recall.biblio.title | html %]</a>
1035                                                         [% IF recall.item %]
1036                                                             <div class="recall-found-barcode">
1037                                                                 (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% recall.biblio_id | uri %]&amp;itemnumber=[% recall.item_id | uri %]">[% recall.item.barcode | html %]</a>)
1038                                                             </div>
1039                                                         [% END %]
1040                                                     </h3>
1041                                                 </div>
1042
1043                                                 <div class="modal-body">
1044                                                     [% IF ( recall.notes ) %]
1045                                                         <h4>Notes:</h4>
1046                                                         <p>[% recall.notes | html %]</p>
1047                                                         <hr />
1048                                                     [% END %]
1049                                                     <h5>Recall placed by:</h5>
1050                                                     <ul>
1051                                                         <li>
1052                                                             [% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_recalls" %]
1053                                                             <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
1054                                                         </li>
1055
1056                                                         [% INCLUDE display_holdpatron_address patron=recall.patron %]
1057
1058                                                         [% IF ( recall.patron.phone ) %]
1059                                                             <li>[% recall.patron.phone | html %]</li>
1060                                                         [% END %]
1061
1062                                                         [% IF ( recall.patron.email ) %]
1063                                                             <li>
1064                                                                 [% IF ( transfertodo ) %]
1065                                                                     [% recall.patron.email | html %]
1066                                                                 [% ELSE %]
1067                                                                     <a id="boremail" href="mailto:[% recall.patron.email | html %]">[% recall.patron.email | html %]</a>
1068                                                                 [% END %]
1069                                                             </li>
1070                                                         [% END %]
1071
1072                                                         [% UNLESS ( transfertodo) %]
1073                                                             [% INCLUDE display_bormessagepref %]
1074                                                         [% END %]
1075
1076                                                         [% IF ( recall.patron.is_debarred ) %]
1077                                                             <li class="error">Patron is RESTRICTED</li>
1078                                                         [% END %]
1079
1080                                                         [% IF ( recall.patron.gonenoaddress ) %]
1081                                                             <li class="error">Patron's address is in doubt</li>
1082                                                         [% END %]
1083                                                     </ul>
1084                                                     [% IF ( transfertodo ) %]
1085                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
1086                                                     [% ELSE %]
1087                                                         <h4><strong>Wait for pickup at</strong> [% Branches.GetName( recall.pickup_library_id ) | html %]</h4>
1088                                                     [% END %]
1089
1090                                                     <input type="hidden" name="op" value="cud-affect_recall">
1091                                                     <input type="hidden" name="recall_id" value="[% recall.id | html %]">
1092                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]">
1093                                                     <input type="hidden" name="returnbranch" value="[% Branches.GetLoggedInBranchcode | html %]">
1094                                                     <input type="hidden" name="recall_slip" value="0">
1095
1096                                                 </div>
1097
1098                                                 <div class="modal-footer">
1099                                                     <button type="submit" class="btn btn-default approve" accesskey="Y">
1100                                                         <i class="fa fa-check"></i> Confirm recall (Y)
1101                                                     </button>
1102                                                     <button type="button" class="btn btn-default print-recall" accesskey="P">
1103                                                         <i class="fa fa-print"></i> Print slip and confirm (P)
1104                                                     </button>
1105
1106                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny" accesskey="I">
1107                                                         <i class="fa fa-times"></i> Ignore (I)
1108                                                     </button>
1109                                                 </div> <!-- /.modal-footer -->
1110                                             </form> <!-- /.confirm -->
1111                                         </div> <!-- /.modal-content -->
1112                                     </div> <!-- /.modal-dialog -->
1113                                 </div> <!-- /#recalledwaiting-->
1114                             [% END #/IF recalledwaiting %]
1115                         [% END # /IF found %]
1116
1117                         <div class="static_checkin_messages">
1118                             [% INCLUDE all_checkin_messages %]
1119                         </div>
1120
1121                         <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
1122                             [% INCLUDE 'csrf-token.inc' %]
1123                             <fieldset id="circ_returns_checkin">
1124                                 <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>
1125                                 <h1>Check in</h1>
1126                                 <div class="row">
1127                                     <div class="col-sm-6">
1128                                             <div class="form-control-group">
1129                                                 [% IF ( exemptfine || dropboxmode ) %]
1130                                                     <input name="barcode" id="barcode" size="14" placeholder="Enter item barcode" class="barcode focus input-warning" type="text" />
1131                                                 [% ELSE %]
1132                                                     <input name="barcode" id="barcode" size="14" placeholder="Enter item barcode" class="barcode focus" type="text" />
1133                                                 [% END %]
1134                                                 <input type="hidden" name="op" value="cud-checkin">
1135
1136                                                 <div id="show-circ-settings">
1137                                                     <a href="#" title="Checkin settings"><i class="fa-solid fa-sliders"></i></a>
1138                                                 </div>
1139
1140                                                 <button type="submit" class="btn btn-primary">Check in</button>
1141                                                 [% FOREACH inputloo IN inputloop %]
1142                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
1143                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
1144                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
1145                                                 [% END %]
1146                                             </div>
1147                                     </div>
1148                                     <div class="col-sm-6">
1149                                         [% IF ( exemptfine ) %]
1150                                             <div id="exemptfines" class="checkin-active-setting">
1151                                         [% ELSE %]
1152                                             <div id="exemptfines" class="checkin-active-setting" style="display:none;">
1153                                         [% END %]
1154                                             <p><i class="fa fa-check"></i> Fines for returned items are forgiven.</p>
1155                                         </div>
1156
1157                                         [% IF ( forgivemanualholdsexpire ) %]
1158                                             <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting">
1159                                         [% ELSE %]
1160                                             <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting" style="display:none;">
1161                                         [% END %]
1162                                                 <p><i class="fa fa-check"></i> Fines are not charged for manually cancelled holds.</p>
1163                                             </div>
1164
1165                                         [% IF ( dropboxmode ) %]
1166                                             <div id="dropboxmode" class="checkin-active-setting">
1167                                         [% ELSE %]
1168                                             <div id="dropboxmode" class="checkin-active-setting" style="display:none;">
1169                                         [% END %]
1170                                             <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>
1171                                         </div>
1172                                         [% IF ( return_date_override_remember ) %]
1173                                             <div id="return_date_remember" class="checkin-active-setting">
1174                                         [% ELSE %]
1175                                             <div id="return_date_remember" class="checkin-active-setting" style="display:none;">
1176                                         [% END %]
1177                                             <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>
1178                                         </div>
1179                                     </div>
1180                                 </div>
1181
1182                                 <div class="circ-settings">
1183                                     [% IF Koha.Preference('SpecifyReturnDate') %]
1184                                         <div class="date-select" id="return_date_override_fields">
1185                                             <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
1186
1187                                             <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" />
1188
1189                                             <div class="circ-setting">
1190                                                 [% IF ( return_date_override_remember ) %]
1191                                                     <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" checked="checked" />
1192                                                 [% ELSE %]
1193                                                     <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" />
1194                                                 [% END %]
1195                                                 <label for="return_date_override_remember"> Remember return date for next check in</label>
1196                                             </div>
1197                                         </div> <!-- /.date-select -->
1198                                     [% END %]
1199
1200                                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
1201                                         <div id="forgive-overdue-fines" class="circ-setting">
1202                                             [% IF ( exemptfine ) %]
1203                                                 <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
1204                                             [% ELSE %]
1205                                                 <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
1206                                             [% END %]
1207                                             <label for="exemptcheck">Forgive overdue charges</label>
1208                                         </div>
1209                                     [% END %] <!-- overduecharges -->
1210
1211                                     <div id="book-drop-mode" class="circ-setting">
1212                                         [% IF ( dropboxmode ) %]
1213                                             <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
1214                                         [% ELSE %]
1215                                             <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
1216                                         [% END %]
1217                                         <label for="dropboxcheck">Book drop mode</label>
1218                                     </div>
1219
1220                                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
1221                                         <div class="forgive-manual-hold-fees circ-setting">
1222                                             [% IF ( forgivemanualholdsexpire ) %]
1223                                                 <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
1224                                             [% ELSE %]
1225                                                 <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
1226                                             [% END %]
1227                                             <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
1228                                         </div>
1229                                     [% END %] <!-- overduecharges -->
1230
1231                                 </div> <!-- /.circ-settings -->
1232                             </fieldset> <!-- /#circ_returns_checkin -->
1233                         </form> <!-- /#checkin-form -->
1234
1235                         [% IF ( riloop ) %]
1236                             <div class="page-section">
1237                                 <h2>Checked-in items</h2>
1238                                 <table id="checkedintable">
1239                                     <thead>
1240                                         <tr>
1241                                             <th class="ci-duedate">Due date</th>
1242                                             <th class="ci-title">Title</th>
1243                                             <th class="ci-author">Author</th>
1244                                             <th class="ci-barcode">Barcode</th>
1245                                             <th class="ci-homelibrary">Home library</th>
1246                                             <th class="ci-transferlibrary">Transfer to</th>
1247                                             <th class="ci-transferreason">Transfer reason</th>
1248                                             <th class="ci-shelvinglocation">Shelving location</th>
1249                                             <th class="ci-callnumber">Call number</th>
1250                                             <th class="ci-dateaccessioned">Date acquired</th>
1251                                             <th class="ci-recordlevelitemtype">Record-level itemtype</th>
1252                                             <th class="ci-itemtype">Item type</th>
1253                                             <th class="ci-collection">Collection</th>
1254                                             <th class="ci-patron">Patron</th>
1255                                             <th class="ci-note">Note</th>
1256                                         </tr>
1257                                     </thead>
1258
1259                                     [% FOREACH riloo IN riloop %]
1260                                         <tr>
1261                                             <td class="ci-duedate">
1262                                                 [% IF ( riloo.not_returned ) %]
1263                                                     <span class="problem">Item was not checked in</span>
1264                                                 [% END %]
1265                                                 [% IF ( riloo.duedate ) %]
1266                                                     [% IF ( riloo.return_overdue ) %]
1267                                                         <span class="overdue">[% riloo.duedate | $KohaDates as_due_date => 1 %] (overdue)</span>
1268                                                     [% ELSE %]
1269                                                         [% riloo.duedate | $KohaDates as_due_date => 1 %]
1270                                                     [% END %]
1271                                                 [% ELSE %]
1272                                                     <span>Not checked out</span>
1273                                                 [% END %]
1274                                                 [% IF ( riloo.damaged ) %]
1275                                                     <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %]</span>
1276                                                 [% END %]
1277                                                 [% IF ( riloo.withdrawn ) %]
1278                                                     <span class="withdrawn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => riloo.withdrawn ) | html %]</span>
1279                                                 [% END %]
1280                                             </td>
1281                                             <td class="ci-title">
1282                                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]">
1283                                                     [% riloo.itemtitle | html %]
1284                                                     [% FOREACH subtitle IN riloo.subtitle.split(' \\| ') %] <span class="subtitle">[% subtitle | html %]</span>[% END %]
1285                                                     [% FOREACH part_number IN riloo.part_number.split(' \\| ') %] <span class="part_number">[% part_number | html %]</span>[% END %]
1286                                                     [% FOREACH part_name IN riloo.part_name.split(' \\| ') %] <span class="part_name">[% part_name | html %]<span>[% END %]
1287                                                 </a>
1288                                                 [% IF ( riloo.enumchron ) %]
1289                                                     <br/>
1290                                                     <span class="item_enumeration" style="white-space: nowrap;">[% riloo.enumchron | html %]</span>
1291                                                 [% END %]
1292                                             </td>
1293                                             <td class="ci-author">[% riloo.itemauthor | html %]</td>
1294                                             <td class="ci-barcode">
1295                                                 <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>
1296                                             </td>
1297                                             <td class="ci-homelibrary">
1298                                                 [% Branches.GetName( riloo.homebranch ) | html %]
1299                                             </td>
1300                                             <td class="ci-transferlibrary">
1301                                                 [% Branches.GetName( riloo.transferbranch ) | html %]
1302                                             </td>
1303                                             <td class="ci-transferreason">
1304                                                  [%- SWITCH riloo.transferreason -%]
1305                                                      [%- CASE 'Manual' -%]<span>Manual</span>
1306                                                      [%- CASE 'StockrotationAdvance' -%]<span>Stock rotation advance</span>
1307                                                      [%- CASE 'StockrotationRepatriation' -%]<span>Stock rotation repatriation</span>
1308                                                      [%- CASE 'ReturnToHome' -%]<span>Return to home library</span>
1309                                                      [%- CASE 'ReturnToHolding' -%]<span>Return to holding library</span>
1310                                                      [%- CASE 'RotatingCollection' -%]<span>Rotating collection</span>
1311                                                      [%- CASE 'Reserve' -%]<span>Hold</span>
1312                                                      [%- CASE 'LostReserve' -%]<span>Lost hold</span>
1313                                                      [%- CASE 'CancelReserve' -%]<span>Cancelled hold</span>
1314                                                      [%- CASE 'TransferCancellation' -%]<span>Transfer was cancelled whilst in transit</span>
1315                                                      [%- CASE 'Recall' -%]<span>Recall</span>
1316                                                      [%- CASE 'RecallCancellation' -%]<span>Cancelled recall</span>
1317                                                  [%- END -%]
1318                                             </td>
1319                                             <td class="ci-shelvinglocation">
1320                                                 <span class="shelvingloc">[% riloo.location | html %]</span>
1321                                             </td>
1322                                             <td class="ci-callnumber">
1323                                                 [% riloo.itemcallnumber | html %]
1324                                             </td>
1325                                             <td class="ci-dateaccessioned">
1326                                                 [% riloo.dateaccessioned | $KohaDates %]
1327                                             </td>
1328                                             <td class="ci-recordlevelitemtype">
1329                                                 [% ItemTypes.GetDescription( riloo.recordtype ) | html %]
1330                                             </td>
1331                                             <td class="ci-itemtype">
1332                                                 [% ItemTypes.GetDescription( riloo.itemtype ) | html %]
1333                                             </td>
1334                                             <td class="ci-collection">
1335                                                 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => riloo.ccode) | html %]
1336                                             </td>
1337                                             <td class="ci-patron">
1338                                                 [% IF ( riloo.duedate ) %]
1339                                                     [% INCLUDE 'patron-title.inc' patron=riloo.patron hide_patron_infos_if_needed=1 invert_name=1 %]
1340                                                     [% IF riloo.borissuescount %]
1341                                                         <span class="results_summary nowrap">
1342                                                             <span class="label">Checkouts:</span>
1343                                                             <span class="number_box">
1344                                                                 <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% riloo.patron.borrowernumber | uri %]">[% riloo.borissuescount | html %]</a>
1345                                                             </span>
1346                                                         </span>
1347                                                     [% END %]
1348                                                     [% IF riloo.patron.privacy < 2 %] [%# 2 is the privacy rule "Never" (Delete my history immediately) %]
1349                                                         <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>
1350                                                     [% END %]
1351                                                 [% ELSE %]
1352                                                     Not checked out
1353                                                 [% END %]
1354                                             </td>
1355                                             <td class="ci-note">
1356                                                 [% IF ( riloo.patron.borrowernotes ) %]
1357                                                     <p><span class="circ-hlt patron-note">[% riloo.patron.borrowernotes | $raw | html_line_break %]</span></p>
1358                                                 [% END %]
1359                                                 [% IF ( riloo.itemnote ) %]
1360                                                     <p><span class="circ-hlt item-note-public">[% riloo.itemnote | html %]</span></p>
1361                                                 [% END %]
1362                                                 [% IF ( riloo.itemnotes_nonpublic ) %]
1363                                                     <p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</span></p>
1364                                                 [% END %]
1365                                             </td>
1366                                         </tr>
1367                                     [% END # /FOREACH riloo %]
1368                                 </table> <!-- /#checkedintable -->
1369                             </div><!-- /.page-section -->
1370                         [% END # /IF riloop %]
1371
1372                     [% IF Koha.Preference('CircSidebar') %]
1373                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
1374                             <div class="col-sm-2 col-sm-pull-10">
1375                                 <aside>
1376                                     [% INCLUDE 'circ-nav.inc' %]
1377                                 </aside>
1378                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1379                         </div> <!-- /.row -->
1380                     [% ELSE %]
1381                             </div> <!-- /.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 -->
1382                         </div> <!-- /.row -->
1383                     [% END %]
1384
1385                 </main>
1386             </div> <!-- /.col-sm-12 -->
1387         </div> <!-- /.row -->
1388
1389     [% IF ( ReturnClaims ) %]
1390         [% INCLUDE 'modals/resolve_return_claim.inc' %]
1391     [% END %]
1392
1393     [% INCLUDE 'modals/bundle_contents.inc' %]
1394
1395     [% IF ( missing_items ) %]
1396     <!-- Bundle missing modal -->
1397     <div class="modal printable" id="bundleMissingModal" tabindex="-1" role="dialog" aria-labelledby="bundleMissingLabel">
1398         <div class="modal-dialog" role="document">
1399             <div class="modal-content">
1400                 <div class="modal-header">
1401                     <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1402                     <h4 class="modal-title" id="bundleMissingLabel">Items missing from bundle at checkin for [% item.barcode | html %]</h4>
1403                 </div>
1404                 <div class="modal-body">
1405                     <table style="width:100%">
1406                         <thead>
1407                             <tr>
1408                                 <th>Barcode</th>
1409                                 <th>Title</th>
1410                             </tr>
1411                         </thead>
1412                         <tbody>
1413                         [% FOREACH bundle_item IN missing_items %]
1414                             <tr>
1415                                 <td>[% bundle_item.barcode | html %]</td>
1416                                 <td>[% INCLUDE 'biblio-title.inc' biblio=bundle_item.biblio %]</td>
1417                             </tr>
1418                         [% END %]
1419                         </tbody>
1420                         <tfoot>
1421                         </tfoot>
1422                     </table>
1423                 </div> <!-- /.modal-body -->
1424                 <div class="modal-footer">
1425                     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1426                     <button type="button" class="printModal btn btn-primary"><i class="fa fa-print"></i> Print</button>
1427                 </div> <!-- /.modal-footer -->
1428             </div> <!-- /.modal-content -->
1429         </div> <!-- /.modal-dialog -->
1430     </div> <!-- /#bundleMissingModal -->
1431     [% END %]
1432
1433 [% IF ( Koha.Preference('CatalogConcerns') ) %]
1434 [% INCLUDE 'modals/add_catalog_concern.inc' %]
1435 [% END %]
1436
1437 [% MACRO jsinclude BLOCK %]
1438     [% INCLUDE 'datatables.inc' %]
1439     [% INCLUDE 'columns_settings.inc' %]
1440     [% INCLUDE 'calendar.inc' %]
1441     [% Asset.js("js/pages/circulation.js") | $raw %]
1442     [% Asset.js("js/modal_printer.js") | $raw %]
1443     [% IF ( ReturnClaims ) %]
1444         <script>
1445             /* Set a variable needed by resolve_claim_modal.js */
1446             var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1447         </script>
1448         [% Asset.js("js/resolve_claim_modal.js") | $raw %]
1449     [% END %]
1450     [% IF ( Koha.Preference('CatalogConcerns') ) %]
1451         <script>
1452             /* Set a variable needed by add_catalog_concern.js */
1453             var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1454         </script>
1455         [% Asset.js("js/modals/add_catalog_concern.js") | $raw %]
1456     [% END %]
1457     <script>
1458         function Dopop(link) {
1459             var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
1460             $("#barcode").focus();
1461         }
1462         $(document).ready(function () {
1463             $("#checkin-form").preventDoubleFormSubmit();
1464             $(".modal.block").modal({ backdrop: 'static'}).on('shown.bs.modal', function() {
1465                 $("#barcode").prop("disabled", true);
1466                 $(".show_checkin_dialog").show();
1467             }).on('hidden.bs.modal', function() {
1468                 $("#barcode").prop("disabled", false).focus();
1469             });
1470             $(".modal.noblock").on('show.bs.modal', function() {
1471                 /* If the modal doesn't block further action, the backdrop should be hidden.
1472                    In order for this to happen smoothly we add a class to the body tag which
1473                    targeted in the CSS */
1474                 $("body").addClass("nobackdrop");
1475             }).modal()
1476             .on('shown.bs.modal', function() {
1477                 $("#barcode").prop("disabled", false).focus();
1478             }).on('hidden.bs.modal', function() {
1479                 $("#barcode").prop("disabled", false).focus();
1480             });
1481
1482             $("body").on("click", ".show_checkin_dialog button", function(e){
1483                 e.preventDefault();
1484                 $(".modal").modal("show");
1485             });
1486             [% IF reserve_id %]
1487                 $(".print-slip").on('click', function(e) {
1488                     e.preventDefault();
1489                     Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
1490                 });
1491                 [% IF print_slip %]
1492                     Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
1493                 [% END %]
1494             [% END %]
1495             var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
1496
1497             [% IF recall_slip %]
1498                 Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]');
1499             [% END %]
1500
1501             var returns_table = KohaTable("checkedintable", {
1502                     "searching":false,
1503                     "paginate":false,
1504                     "info": false,
1505                     "ordering":false,
1506                     "dom": '<"table_controls"B>rt',
1507                     }, table_settings);
1508
1509             $("#exemptcheck").change(function () {
1510                 if (this.checked == true) {
1511                     $("#barcode").addClass("input-warning");
1512                     $("#exemptfines").show();
1513                 } else {
1514                     $("#barcode").removeClass("input-warning");
1515                     $("#exemptfines").hide();
1516                 }
1517                 $("#barcode").focus();
1518             });
1519
1520             $("#dropboxcheck").change(function () {
1521                 if (this.checked == true) {
1522                     $("#barcode").addClass("input-warning");
1523                     $("#dropboxmode").show();
1524
1525                     $("#return_date_override_fields :input").prop('disabled', true);
1526                 } else {
1527                     $("#barcode").removeClass("input-warning");
1528                     $("#dropboxmode").hide();
1529
1530                     $("#return_date_override_fields :input").prop('disabled', false);
1531                 }
1532                 $("#barcode").focus();
1533             });
1534
1535             $("#forgivemanualholdsexpire").change(function () {
1536                 if (this.checked == true) {
1537                     $("#barcode").addClass("input-warning");
1538                     $("#forgivemanualholdsexpire-alert").show();
1539                 } else {
1540                     $("#barcode").removeClass("input-warning");
1541                     $("#forgivemanualholdsexpire-alert").hide();
1542                 }
1543                 $("#barcode").focus();
1544             });
1545
1546             [% IF(overduecharges) %]
1547                 $("#barcode").focus(function () {
1548                     if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
1549                         $("#barcode").addClass("input-warning");
1550                     } else {
1551                         $("#barcode").removeClass("input-warning");
1552                     }
1553                 });
1554                 $("#barcode").blur(function () {
1555                     $("#barcode").removeClass("input-warning");
1556                 });
1557             [% END %]
1558
1559             $('.openWin').on("click",function(e){
1560                 Dopop( $(this).data("url") );
1561             });
1562
1563             $('.submit').on("click",function(e){
1564                 this.form.submit();
1565             });
1566
1567             $('.cancel').on("click",function(e){
1568                 var docancel = $("<input>").attr("type", "hidden").attr("name", "canceltransfer").val(1);
1569                 $('#wrongtransferform').append(docancel);
1570                 this.form.submit();
1571             });
1572
1573             $('.print').on("click",function(e){
1574                 this.form.print_slip.value = 1;
1575                 let barcode = document.getElementById('confirm-hold-barcode');
1576                 if ( barcode ) barcode.remove();
1577                 this.form.submit();
1578             });
1579
1580             $('.print-recall').on("click",function(e){
1581                 this.form.recall_slip.value = 1;
1582                 this.form.submit();
1583             });
1584
1585             $('.approve').on("click",function(e){
1586                 let barcode = document.getElementById('confirm-hold-barcode');
1587                 if ( barcode ) barcode.remove();
1588                 this.form.submit();
1589             });
1590             $('.cancel-hold').on("click",function(e){
1591                 let cancel_form = document.getElementById('cancellation-reason');
1592                 let cancel_reason = '';
1593                 if ( cancel_form ) {
1594                     cancel_reason = cancel_form.value;
1595                 }
1596                 this.form.cancel_reserve.value = 1;
1597                 this.form.cancel_reason.value = cancel_reason;
1598                 this.form.submit();
1599             });
1600
1601             $('.action').on("click",function(e){
1602                 this.checked = false;
1603                 this.form.return_date_override.value = '';
1604                 this.form.return_date_override_remember.checked = false;
1605                 this.form.barcode.focus();
1606                 $("#return_date_remember").hide();
1607                 return false;
1608             });
1609
1610             $("#return_date_override_remember").on("change", function(){
1611                 if( $(this).prop("checked" ) ){
1612                     if( $("#return_date_override").val() == "" ){
1613                         $("#saved_return_date").text( _("No date selected") );
1614                     } else {
1615                         $("#saved_return_date").text( $("#return_date_override").val() );
1616                     }
1617                     $("#return_date_remember").show();
1618                 } else {
1619                     $("#return_date_remember").hide();
1620                 }
1621             });
1622             $('[data-toggle="tooltip"]').tooltip();
1623
1624             $(".printcheckinslip").on("click", function(e){
1625                 e.preventDefault();
1626                 var borrowernumber = $(this).data('borrowernumber');
1627                 window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&amp;print=checkinslip", "printwindow");
1628             });
1629
1630             // item bundles
1631             $('#verify-items-bundle-contents-barcodes').on('input', function (ev) {
1632                 let char = ev.target.value.slice(-1);
1633                 if ( char.match(/\n/) ) {
1634                     const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim().toUpperCase() });
1635                     const expected = [];
1636                     let found = 0;
1637                     $('#items-bundle-contents-table tbody > tr').each(function () {
1638                         const barcode = this.getAttribute('data-barcode').toUpperCase();
1639                         expected.push(barcode);
1640                         if (barcodes.includes(barcode)) {
1641                             this.classList.add('ok');
1642                             found++;
1643                         } else {
1644                             this.classList.remove('ok');
1645                         }
1646                     });
1647                     const last = barcodes[barcodes.length -2];
1648                     const feedback = $('#bundle-feedback');
1649                     let string;
1650                     if ( !expected.includes(last) ) {
1651                         feedback.fadeOut(100, function(){
1652                             string = _("Unexpected: ") +last;
1653                             feedback.addClass('alert-danger').removeClass('alert-success').html(string).fadeIn(100);
1654                         });
1655                     } else {
1656                         feedback.fadeOut(100, function(){
1657                             string = _("Verified: ")+last;
1658                             feedback.addClass('alert-success').removeClass('alert-danger').html(string).fadeIn(100);
1659                         });
1660                     }
1661                     $('#verify-progress').show();
1662                     $('#verified').text(found);
1663                     $('#expected').text(expected.length);
1664                 }
1665             });
1666
1667             $('.bundle_remove').on('click', function() {
1668                 var component_itemnumber = $(this).data('itemnumber');
1669                 var host_itemnumber = $(this).data('hostnumber');
1670                 var alert = $(this).closest('div');
1671                 var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/item/" + component_itemnumber;
1672                 $.ajax({
1673                     type: "DELETE",
1674                     url: unlink_item_url,
1675                     success: function(){
1676                         alert.remove();
1677                     }
1678                 });
1679             });
1680
1681             $('#items-bundle-contents-table').dataTable($.extend(true, {}, dataTablesDefaults, {
1682                 "searching": false,
1683                 "paginate": false,
1684                 "info": false,
1685                 "order": [[ 1, 'asc' ], [ 0, 'asc' ]]
1686             }));
1687
1688             [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %]
1689                 $("#wrong-transfer-modal").on('hidden.bs.modal',function(){
1690                     $("#wrongtransferform").submit();
1691                 });
1692                 [% IF (transfer) %]
1693                     $("#item-transfer-modal").on('hidden.bs.modal',function(){
1694                         $("#mainform").submit();
1695                     });
1696                 [% END %]
1697             [% END %]
1698         });
1699     </script>
1700
1701 [% END %]
1702
1703 [% INCLUDE 'intranet-bottom.inc' %]