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