Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
1 [% USE KohaDates %]
2 [% USE Branches %]
3 [% USE Koha %]
4 [% USE Borrowers %]
5 [% USE ItemTypes %]
6 [% USE AuthorisedValues %]
7
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11
12 [% INCLUDE 'calendar.inc' %]
13 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
14 [% INCLUDE 'timepicker.inc' %]
15
16 <script type="text/javascript">
17 //<![CDATA[
18 function Dopop(link) {
19     var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
20     $("#barcode").focus();
21 }
22 $(document).ready(function () {
23
24     [% IF print_slip %]
25         Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
26     [% END %]
27
28     $("#return_date_override").datetimepicker({
29         onClose: function(dateText, inst) { $("#barcode").focus(); },
30         defaultDate: -1,
31         hour: 23,
32         minute: 59,
33         maxDate: 0
34     });
35     $("#return_date_override").on("blur", function() {
36             check_valid_return_date();
37     });
38     $("#checkin-form").submit(function( event ) {
39         if ( !check_valid_return_date() ) {
40             event.preventDefault();
41         }
42     });
43
44     function check_valid_return_date() {
45         if ( $("#return_date_override").val() ) {
46             var datetime = DateTime_from_syspref( $("#return_date_override").val() );
47             var now = new Date();
48             if ( !datetime || datetime > now ) {
49                 alert("Invalid return date/time!");
50                 $("#return_date_override").val("")
51                 return false;
52             }
53         }
54         return true;
55     }
56
57     $("#exemptcheck").change(function () {
58         if (this.checked == true) {
59             $("#barcode").addClass("alert");
60             $("#exemptfines").show();
61         } else {
62             $("#barcode").removeClass("alert");
63             $("#exemptfines").hide();
64         }
65         $("#barcode").focus();
66     });
67     $("#dropboxcheck").change(function () {
68         if (this.checked == true) {
69             $("#barcode").addClass("alert");
70             $("#dropboxmode").show();
71
72             $("#return_date_override_fields :input").attr("disabled", true);
73             $("#return_date_override").datetimepicker("disable");
74         } else {
75             $("#barcode").removeClass("alert");
76             $("#dropboxmode").hide();
77
78             $("#return_date_override_fields :input").attr("disabled", false);
79             $("#return_date_override").datetimepicker("enable");
80         }
81         $("#barcode").focus();
82     });
83     $("#forgivemanualholdsexpire").change(function () {
84         if (this.checked == true) {
85             $("#barcode").addClass("alert");
86             $("#forgivemanualholdsexpire-alert").show();
87         } else {
88             $("#barcode").removeClass("alert");
89             $("#forgivemanualholdsexpire-alert").hide();
90         }
91         $("#barcode").focus();
92     });
93     [% IF(overduecharges) %] $("#barcode").focus(function () {
94         if (($("#exemptcheck").attr("checked") == true) || ($("#dropboxcheck").attr("checked") == true)) {
95             $("#barcode").addClass("alert");
96         } else {
97             $("#barcode").removeClass("alert");
98         }
99     });
100     $("#barcode").blur(function () {
101         $("#barcode").removeClass("alert");
102     });
103     [% END %]
104 });
105 //]]>
106 </script>
107 </head>
108 <body id="circ_returns" class="circ">
109 <span class="audio-alert-success"></span>
110
111 [% INCLUDE 'header.inc' %]
112 [% INCLUDE 'checkin-search.inc' %]
113
114 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Check in</div>
115
116 <div id="doc" class="yui-t7">
117
118    <div id="bd">
119         <div id="yui-main">
120
121 <div class="yui-g">
122
123 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
124     <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
125 [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
126     <div class="dialog alert"><strong>Error:</strong> The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.</div>
127 [% END %]
128
129 [% IF additional_materials %]
130     <div class="dialog message" id="materials">Note about the accompanying materials: <br />
131     [% additional_materials %]
132     </div>
133 [% END %]
134
135 [% IF ( collectionItemNeedsTransferred ) %]
136  <div id="rotating-collection" class="dialog message">
137         <h3>Please transfer item to: [% collectionBranch %]</h3>
138             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
139             <p>This item is part of a rotating collection.</p>
140 </div>
141 [% END %]
142
143 <!-- Patron has fines -->
144 [% IF ( fines ) %]
145     <div class="dialog alert">
146         <h3>Patron has outstanding fines of [% fines %].</h3>
147         <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber %]">Make payment</a>.</p>
148     </div>
149 [% END %]
150
151 <!-- Patron has waiting holds -->
152 [% IF ( waiting_holds ) %]
153     <div id="awaiting-pickup" class="dialog message">
154         <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
155         <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
156     </div>
157 [% END %]
158
159 <!-- Patron is restricted and checkin was backdated -->
160 [% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
161     <div id="restricted_backdated" class="dialog message">
162         <h3>
163             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">
164                 [% borrower.firstname %] [% borrower.surname %]
165             </a>
166             is restricted. Please verify this patron should still be restricted.
167         </h3>
168     </div>
169 [% END %]
170
171 [% IF ( wrongbranch ) %]
172     <div class="dialog alert"><h3>Cannot check in</h3>
173         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
174         </p><strong>NOT CHECKED IN</strong></p>
175         <p>This item must be checked in at following library: <strong>[% Branches.GetName( rightbranch ) %]</strong></p>
176     </div>
177 [% END %]
178 <!-- case of a mistake in transfer loop -->
179 [% IF ( WrongTransfer ) %]
180     <div id="return2" class="dialog message">
181         <!-- WrongTransfer -->
182         <h3>Please return item to: [% Branches.GetName( TransferWaitingAt ) %]</h3>
183             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
184         <ul><li><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;">Print transfer slip</a></li><li><a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel transfer</a></li></ul>
185 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
186         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
187             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
188         <li>[% wborstnum %] [% wboraddress %][% IF ( wboraddress2 ) %]<br />
189                 [% wboraddress2 %]<br />[% END %]
190         [% wborcity %]  [% wborzip %]</li>
191         [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
192                 [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
193         </ul>
194
195     <form method="post" action="returns.pl" class="confirm">
196             <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" />
197             <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" />
198             <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
199             <input type="submit" class="approve" value="Confirm" />
200             <input type="hidden" name="print_slip" value="0" />
201             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
202             <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
203             <input type="submit" value="Print slip and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
204         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
205         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
206     </form>
207     [% END %]</div>
208 [% END %]
209
210 [% IF ( found ) %]
211 <!-- found -->
212 <!-- case of a reservation found, and display info -->
213     [% IF ( waiting ) %]
214         <!-- waiting -->
215
216     <div id="hold-found1" class="dialog message audio-alert-action">
217         <h3>Hold found (item is already waiting)</h3>
218         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
219         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
220         <h4>Hold for:</h4>
221                         <ul>
222             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
223             <li>[% borstnum %] [% boraddress %]<br />
224                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
225             [% borcity %] [% borzip %]</li>
226            [% IF ( borphone ) %]<li> [% borphone %]</li>[% END %]
227                    [% IF ( boremail ) %]<li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>[% END %]
228 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
229 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]</ul>
230                 [% IF ( transfertodo ) %]
231             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
232                 [% ELSE %]
233                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
234         [% END %]
235         <form method="post" action="returns.pl" class="confirm">
236             <input type="hidden" name="cancel_reserve" value="0" />
237             <input type="submit" class="deny" value="Cancel" onclick="this.form.cancel_reserve.value = 1; this.form.submit();" />
238
239             <input type="submit" class="approve" value="Confirm" />
240
241             <input type="hidden" name="print_slip" value="0" />
242             <input type="submit" value="Print and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
243             [% FOREACH inputloo IN inputloop %]
244                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
245                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
246                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
247             [% END %]
248                 <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
249                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
250                 <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
251                 <input type="hidden" name="resbarcode" value="[% barcode %]" />
252                 <input type="hidden" name="diffBranch" value="[% destbranch %]" />
253                 <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
254                 <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
255                 <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
256
257                 <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
258                 <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
259                 </form>
260         </div>
261     [% END %]
262
263     [% IF ( diffbranch ) %]
264                 <!-- diffbranch -->
265         <div id="transfer-needed" class="dialog message audio-alert-action">
266             <h3>Hold needing transfer found</h3>
267                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
268                 <h4>Hold for: </h4>
269                     <ul>
270                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
271                         <li>[% borstnum %] [% boraddress %]<br />
272                                                 [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
273                                                 [% borcity %]  [% borzip %]</li>
274                         [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
275                         [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
276 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
277 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
278                     </ul>
279                 [% IF ( transfertodo ) %]
280             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
281                 [% ELSE %]
282                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
283         [% END %]
284
285         <form method="post" action="returns.pl" class="confirm">
286             <input type="submit" class="approve" value="Confirm" />
287             <input type="hidden" name="print_slip" value="0" />
288             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
289             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
290             <input type="submit" value="Print slip and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
291             [% FOREACH inputloo IN inputloop %]
292                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
293                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
294                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
295             [% END %]
296             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
297             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
298             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
299             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
300             <input type="hidden" name="barcode" value="0" />
301
302             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
303             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
304         </form>
305                 </div>
306     [% END %]
307
308     [% IF ( transfer ) %]
309     <!-- transfer: item with no reservation, must be returned according to home library circulation rules -->
310         <div id="return1" class="dialog message audio-alert-action">
311             <h3>Please return item to: [% Branches.GetName( returnbranch ) %]</h3>
312             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
313             <ul><li><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% returnbranch %]&amp;op=slip'); return true;">Print slip</a> )</li></ul>
314         </div>
315     [% END %]
316
317     [% IF ( needstransfer ) %]
318         <!-- needstransfer -->
319     <div id="item-transfer" class="dialog message audio-alert-action"><h3> This item needs to be transferred to [% Branches.GetName( returnbranch ) %]</h3>
320     Transfer now?<br />
321     <form method="post" action="returns.pl" name="mainform" id="mainform">
322     [% IF itemnumber %]
323         <input type="submit" name="dotransfer" value="Yes, Print slip" class="print" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% returnbranch %]&amp;op=slip'); return true;" />
324     [% END %]
325         <input type="submit" name="dotransfer" value="Yes" class="submit" />
326         <input type="submit" name="notransfer" value="No" class="submit" />
327     <input type="hidden" name="tobranch" value="[% returnbranch %]" />
328         <input type="hidden" name="transferitem" value="[% itemnumber %]" />
329         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
330         <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
331         <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
332         [% FOREACH inputloo IN inputloop %]
333         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
334         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
335         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
336         [% END %]
337         <input type="hidden" name="barcode" value="0" />
338         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
339         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
340         </form>   </div>
341     [% END %]
342
343     [% IF ( diffbranch ) %]
344         <!-- diffbranch -->
345         <h3 class="audio-alert-action">Item consigned:</h3>
346         <table>
347         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
348         <tr>
349             <th>Hold for:</th>
350             <td>[% name %]</td>
351         </tr>
352         </table>
353         <form method="post" action="returns.pl"><input type="submit" value="OK" />
354             [% FOREACH inputloo IN inputloop %]
355                 [% UNLESS ( inputloo.first ) %]
356                     <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
357                     <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
358                     <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
359                 [% END %]
360             [% END %]
361
362             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
363             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
364
365             <input type="hidden" name="barcode" value="0" />
366         </form>
367     [% END %]
368
369
370     <!-- case of simple return no issue or transfer but with a reservation  -->
371     [% IF ( reserved ) %]
372         <!--  reserved  -->
373
374     <div id="hold-found2" class="dialog message audio-alert-action">
375       <h3>Hold found</h3>
376           <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
377         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
378         <h5>Hold for:</h5>
379                 <ul>
380             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
381                 [% borsurname %], [% borfirstname %]
382             </a> ([% borcnum %])</li>
383             <li>[% borstnum %] [% boraddress %]<br />
384                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
385                         [% borcity %] [% borzip %]</li>
386             [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
387             [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
388 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
389 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
390         </ul>
391         [% IF ( transfertodo ) %]
392             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
393                 [% ELSE %]
394                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
395         [% END %]
396         <form method="post" action="returns.pl" class="confirm">
397             <input type="hidden" name="print_slip" value="0" />
398             [% IF ( transfertodo ) %]
399                 <input type="submit" class="approve" value="Confirm hold and transfer" />
400                 <input type="submit" value="Print slip, transfer, and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit()" />
401             [% ELSE %]
402                 <input type="submit" class="approve" value="Confirm hold" />
403                 <input type="submit" value="Print slip and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
404             [% END %]
405                 <input type="submit" class="deny" value="Ignore" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;" />
406             [% FOREACH inputloo IN inputloop %]
407         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
408         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
409         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %]
410             <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
411             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
412             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
413             <input type="hidden" name="resbarcode" value="[% barcode %]" />
414             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
415             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
416             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
417             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
418             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
419             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
420         </form>
421         </div>
422     [% END %]
423 [% END %]
424
425 [% IF ( errmsgloop ) %]
426     <div class="dialog alert audio-alert-warning">
427         <h3>Check in message</h3>
428         [% IF itembiblionumber %]
429             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
430         [% END %]
431         [% FOREACH errmsgloo IN errmsgloop %]
432                     [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
433                         <p class="problem">
434                             Not for loan status updated.
435                             <br />Old value:
436                             [% IF errmsgloo.NotForLoanStatusUpdated.from %]
437                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %].
438                             [% ELSE %]
439                                 Available for loan.
440                             [% END %]
441                             <br />New value:
442                             [% IF errmsgloo.NotForLoanStatusUpdated.to %]
443                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %].
444                             [% ELSE %]
445                                 Available for loan.
446                             [% END %]
447                         </p>
448                     [% END %]
449                     [% IF ( errmsgloo.badbarcode ) %]
450                         <p class="problem">No item with barcode: [% errmsgloo.msg %]</p>
451                     [% END %]
452                     [% IF ( errmsgloo.ispermanent ) %]
453                         <p class="problem">Please return item to: [% errmsgloo.msg %]</p>
454                     [% END %]
455                     [% IF ( errmsgloo.notissued ) %]
456                         <p class="problem">Not checked out.</p>
457                     [% END %]
458                     [% IF ( errmsgloo.localuse) %]
459                         <p class="problem">Local use recorded</p>
460                     [% END %]
461                     [% IF ( errmsgloo.waslost ) %]
462                         <p class="problem">Item was lost, now found.</p>
463                         [% IF ( LostItemFeeRefunded ) %]
464                             <p class="problem">A refund has been applied to the borrowing patron's account.</p>
465                         [% ELSE %]
466                             <p class="problem">Any lost item fees for this item will remain on the patron's account.</p>
467                         [% END %]
468                     [% END %]
469                     [% IF ( errmsgloo.withdrawn ) %]
470                         [% IF BlockReturnOfWithdrawnItems %]
471                            <h5>Cannot check in</h5>
472                            <p><strong>NOT CHECKED IN</strong></p>
473                            <p class="problem">Item is withdrawn.</p>
474                         [% ELSE %]
475                            <p class="problem">Item is withdrawn.</p>
476                         [% END %]
477                     [% END %]
478                     [% IF ( errmsgloo.debarred ) %]
479                         <p class="problem"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber %]">[% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %].</p>
480                     [% END %]
481                     [% IF ( errmsgloo.prevdebarred ) %]
482                         <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
483                     [% END %]
484                     [% IF ( errmsgloo.foreverdebarred ) %]
485                         <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction.</p>
486                     [% END %]
487
488             [% END %]
489         [% ELSE %]
490         [% END %]
491     </div>
492
493 [% IF ( checkinmsg ) %]
494     [% IF ( checkinmsgtype == 'alert' ) %]
495         <div class="dialog alert">
496     [% ELSE %]
497         <div class="dialog message">
498     [% END %]
499             <p class="problem">[% checkinmsg | html_line_break %]</p>
500         </div>
501 [% END%]
502
503     <div id="exemptfines" class="dialog message" style="display:none;">
504         <p>Fines for returned items are forgiven.</p>
505     </div>
506     <div id="forgivemanualholdsexpire-alert" class="dialog message" style="display:none;">
507         <p>Fines are not charged for manually cancelled holds.</p>
508     </div>
509     <div id="dropboxmode" class="dialog message" style="display:none;">
510         <p>Book drop mode.  (Effective checkin date is [% dropboxdate %] ).</p>
511     </div>
512 </div>
513         <div class="yui-g">
514     <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
515     <div class="yui-u first">
516             <fieldset>
517         <legend>Check in</legend>
518             <label for="barcode">Enter item barcode: </label>
519                         [% IF ( exemptfine ) %]
520                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
521                         [% ELSIF ( dropboxmode ) %]
522                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
523                         [% ELSE %]
524                         <input name="barcode" id="barcode" size="14" class="focus"/>
525                         [% END %]
526             <input type="submit" class="submit" value="Submit" />
527
528             [% IF Koha.Preference('SpecifyReturnDate') %]
529                 <div class="date-select" id="return_date_override_fields">
530                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
531
532                     <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" />
533
534                     <label for="return_date_override_remember"> Remember for next check in:</label>
535                     [% IF ( return_date_override_remember ) %]
536                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" />
537                     [% ELSE %]
538                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" />
539                     [% END %]
540
541                     <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.return_date_override.value = ''; this.form.return_date_override_remember.checked = false; this.form.barcode.focus(); return false;" />
542             </div>
543         [% END %]
544             [% FOREACH inputloo IN inputloop %]
545                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
546                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
547                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
548             [% END %]
549
550
551             </fieldset>
552             </div>
553             <div class="yui-u">
554             <fieldset id="checkin_options">
555                 <legend>Options</legend>
556                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
557                     <p>
558                         [% IF ( exemptfine ) %]
559                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
560                         [% ELSE %]
561                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
562                         [% END %]
563                         <label for="exemptcheck">Forgive overdue charges</label>
564                     </p>
565                     [% END %] <!-- overduecharges -->
566                     <p>
567                         [% IF ( dropboxmode ) %]
568                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
569                         [% ELSE %]
570                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
571                         [% END %]
572                         <label for="dropboxcheck">Book drop mode</label>
573                     </p>
574                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
575                     <p>
576                         [% IF ( forgivemanualholdsexpire ) %]
577                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
578                         [% ELSE %]
579                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
580                         [% END %]
581                         <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
582                     </p>
583                     [% END %] <!-- overduecharges -->
584             </fieldset>
585         </div>
586     </form>
587 </div>
588
589 [% IF ( riloop ) %]
590     <h2>Checked-in items</h2>
591     <table id="checkedintable">
592     <tr><th class="ci-duedate">Due date</th><th class="ci-title">Title</th><th class="ci-author">Author</th><th class="ci-barcode">Barcode</th><th class="ci-homelibrary">Home library</th><th class="ci-holdinglibrary">Holding library</th><th class="ci-shelvinglocation">Shelving location</th><th class="ci-callnumber">Call number</th><th class="ci-type">Type</th><th class="ci-patron">Patron</th><th class="ci-note">Note</th></tr>
593
594         [% FOREACH riloo IN riloop %]
595             <tr>
596             <td class="ci-duedate">[% IF ( riloo.duedate ) %]
597                     [% IF ( riloo.return_overdue ) %]
598                         <span class="overdue">[% riloo.duedate %] (overdue)</span>
599                     [% ELSE %][% riloo.duedate %]
600                     [% END %]
601                 [% ELSE %]Not checked out
602                 [% END %]
603             </td>
604             <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
605                     [% riloo.itemtitle |html %]</a></td>
606             <td class="ci-author">[% riloo.itemauthor %]</td>
607             <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
608             <td class="ci-homelibrary">[% Branches.GetName( riloo.homebranch ) %]</td>
609             <td class="ci-holdinglibrary">[% Branches.GetName( riloo.holdingbranch ) %]</td>
610             <td class="ci-shelvinglocation">[% riloo.location %]</td>
611             <td class="ci-callnumber">[% riloo.itemcallnumber %]</td>
612             <td class="ci-type">[% ItemTypes.GetDescription( riloo.itemtype ) %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) %]</td>
613             <td class="ci-patron">[% IF ( riloo.duedate ) %]
614                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
615                     [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
616                 </a>
617             [% ELSE %]Not checked out[% END %]</td>
618             <td class="ci-note">
619                 [% IF ( riloo.bornote ) %]<p><span class="circ-hlt">[% riloo.bornote %]</p></span>[% END %]
620                 [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt">[% riloo.itemnote %]</p></span>[% END %]
621                 [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt">[% riloo.itemnotes_nonpublic %]</p></span>[% END %]
622             </td>
623            </tr>
624         [% END %]
625     </table></div>
626 [% END %]
627
628
629 </div>
630 [% INCLUDE 'intranet-bottom.inc' %]