Bug 11360 [QA Followup] - Fix styles and button order
[koha_ffzg] / 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 [% USE ColumnsSettings %]
8
9 [% BLOCK display_bormessagepref %]
10     [% IF ( bormessagepref ) %]
11         <li>Patron notification:
12             [% FOREACH mtt IN bormessagepref.keys %]
13                 [%~ IF ( mtt == 'email' ) %] Email[% END ~%]
14                 [%~ IF ( mtt == 'phone' ) %] Phone[% END ~%]
15                 [%~ IF ( mtt == 'sms' ) %] SMS[% END ~%]
16                 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
17             [% END %]
18         </li>
19            [% ELSE %]
20         <li>Patron is not notified.</li>
21     [% END %]
22 [% END %]
23
24 [% INCLUDE 'doc-head-open.inc' %]
25 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
26 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
27 [% INCLUDE 'doc-head-close.inc' %]
28 [% INCLUDE 'datatables.inc' %]
29 [% INCLUDE 'columns_settings.inc' %]
30 [% INCLUDE 'calendar.inc' %]
31 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
32 [% INCLUDE 'timepicker.inc' %]
33
34 <script type="text/javascript">
35 //<![CDATA[
36 function Dopop(link) {
37     var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
38     $("#barcode").focus();
39 }
40 $(document).ready(function () {
41     $(".modal").modal({ backdrop: 'static' }).on('shown', function() {
42         $("#barcode").prop("disabled", true);
43     }).on('hidden', function() {
44         $("#barcode").prop("disabled", false).focus();
45     });
46
47     [% IF print_slip %]
48         Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
49     [% END %]
50
51     var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
52     var returns_table = KohaTable("#checkedintable", {
53             "bFilter":false,
54             "bPaginate":false,
55             "bInfo":false,
56             "bSort":false,
57             "dom": 'B<"clearfix">t',
58             }, columns_settings);
59
60     $("#return_date_override").datetimepicker({
61         onClose: function(dateText, inst) { $("#barcode").focus(); },
62         defaultDate: -1,
63         hour: 23,
64         minute: 59,
65         maxDate: 0
66     });
67     $("#return_date_override").on("blur", function() {
68             check_valid_return_date();
69     });
70     $("#checkin-form").submit(function( event ) {
71         if ( !check_valid_return_date() ) {
72             event.preventDefault();
73         }
74     });
75
76     function check_valid_return_date() {
77         if ( $("#return_date_override").val() ) {
78             var datetime = DateTime_from_syspref( $("#return_date_override").val() );
79             var now = new Date();
80             if ( !datetime || datetime > now ) {
81                 alert("Invalid return date/time!");
82                 $("#return_date_override").val("")
83                 return false;
84             }
85         }
86         return true;
87     }
88
89     $("#exemptcheck").change(function () {
90         if (this.checked == true) {
91             $("#barcode").addClass("alert");
92             $("#exemptfines").show();
93         } else {
94             $("#barcode").removeClass("alert");
95             $("#exemptfines").hide();
96         }
97         $("#barcode").focus();
98     });
99     $("#dropboxcheck").change(function () {
100         if (this.checked == true) {
101             $("#barcode").addClass("alert");
102             $("#dropboxmode").show();
103
104             $("#return_date_override_fields :input").prop('disabled', true);
105             $("#return_date_override").datetimepicker("disable");
106         } else {
107             $("#barcode").removeClass("alert");
108             $("#dropboxmode").hide();
109
110             $("#return_date_override_fields :input").prop('disabled', false);
111             $("#return_date_override").datetimepicker("enable");
112         }
113         $("#barcode").focus();
114     });
115     $("#forgivemanualholdsexpire").change(function () {
116         if (this.checked == true) {
117             $("#barcode").addClass("alert");
118             $("#forgivemanualholdsexpire-alert").show();
119         } else {
120             $("#barcode").removeClass("alert");
121             $("#forgivemanualholdsexpire-alert").hide();
122         }
123         $("#barcode").focus();
124     });
125     [% IF(overduecharges) %] $("#barcode").focus(function () {
126         if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
127             $("#barcode").addClass("alert");
128         } else {
129             $("#barcode").removeClass("alert");
130         }
131     });
132     $("#barcode").blur(function () {
133         $("#barcode").removeClass("alert");
134     });
135     [% END %]
136     $('.openWin').on("click",function(e){
137         e.preventDefault();
138         Dopop( $(this).data("url") );
139     });
140 });
141 //]]>
142 </script>
143 </head>
144 <body id="circ_returns" class="circ">
145 <span class="audio-alert-success"></span>
146
147 [% INCLUDE 'header.inc' %]
148 [% INCLUDE 'checkin-search.inc' %]
149
150 <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>
151
152 <div id="doc" class="yui-t7">
153
154    <div id="bd">
155         <div id="yui-main">
156
157 <div class="yui-g">
158
159 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
160     <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>
161 [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
162     <div class="dialog alert"><strong>Error:</strong> The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.</div>
163 [% END %]
164
165 [% IF additional_materials %]
166     <div class="dialog message" id="materials">Note about the accompanying materials: <br />
167     [% additional_materials %]
168     </div>
169 [% END %]
170
171 [% IF ( collectionItemNeedsTransferred ) %]
172  <div id="rotating-collection" class="dialog message">
173         <h3>Please transfer item to: [% collectionBranchName %]</h3>
174             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
175             <p>This item is part of a rotating collection.</p>
176             <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% collectionBranch %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
177 </div>
178 [% END %]
179
180 <!-- Patron has fines -->
181 [% IF ( fines ) %]
182     <div class="dialog alert">
183         <h3>Patron has outstanding fines of [% fines %].</h3>
184         <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber %]">Make payment</a>.</p>
185     </div>
186 [% END %]
187
188 <!-- Patron has waiting holds -->
189 [% IF ( waiting_holds ) %]
190     <div id="awaiting-pickup" class="dialog message">
191         <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
192         <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
193     </div>
194 [% END %]
195
196 <!-- Patron is restricted and checkin was backdated -->
197 [% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
198     <div id="restricted_backdated" class="dialog message">
199         <h3>
200             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">
201                 [% borrower.firstname %] [% borrower.surname %]
202             </a>
203             is restricted. Please verify this patron should still be restricted.
204         </h3>
205     </div>
206 [% END %]
207
208 [% IF ( wrongbranch ) %]
209     <div class="dialog alert"><h3>Cannot check in</h3>
210         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
211         </p><strong>NOT CHECKED IN</strong></p>
212         <p>This item must be checked in at following library: <strong>[% Branches.GetName( rightbranch ) %]</strong></p>
213     </div>
214 [% END %]
215 <!-- case of a mistake in transfer loop -->
216 [% IF ( WrongTransfer ) %]
217     <div id="return2" class="dialog message">
218         <!-- WrongTransfer -->
219         <h3>Please return item to: [% Branches.GetName( TransferWaitingAt ) %]</h3>
220             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
221         <button type="submit" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip"><i class="fa fa-print"></i> Print transfer slip</button>
222         <button class="deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button>
223 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
224         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
225             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
226         <li>[% wborstnum %] [% wboraddress %][% IF ( wboraddress2 ) %]<br />
227                 [% wboraddress2 %]<br />[% END %]
228         [% wborcity %]  [% wborzip %]</li>
229         [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
230                 [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
231         </ul>
232
233     <form method="post" action="returns.pl" class="confirm">
234             <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" />
235             <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" />
236             <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
237             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
238             <input type="hidden" name="print_slip" value="0" />
239             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
240             <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
241             <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
242         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
243         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
244     </form>
245     [% END %]</div>
246 [% END %]
247
248 [% IF ( found ) %]
249     [% IF ( waiting ) %]
250         <div id="hold-found1" class="modal fade audio-alert-action">
251             <form method="post" action="returns.pl" class="confirm">
252                 <div class="modal-header">
253                     <h3>
254                         Hold found (item is already waiting):
255                         <br/>
256                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">
257                             [% itembarcode |html %]: [% title |html %]
258                         </a>
259                     </h3>
260                 </div>
261
262                 <div class="modal-body">
263                     [% IF ( reservenotes ) %]
264                         <h4>Notes: [% reservenotes %]</h4>
265                     [% END %]
266
267                     <h4>Hold for:</h4>
268
269                     <li>
270                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])
271                     </li>
272
273                     <li>
274                         [% borstnum %] [% boraddress %]<br />
275                         [% IF ( boraddress2 ) %]
276                             [% boraddress2 %]<br />
277                         [% END %]
278                         [% borcity %] [% borzip %]
279                     </li>
280
281                     [% IF ( borphone ) %]
282                         <li> [% borphone %]</li>
283                     [% END %]
284
285                     [% IF ( boremail ) %]
286                         <li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>
287                     [% END %]
288
289                     [% IF ( debarred ) %]
290                         <li class="error">Patron is RESTRICTED</li>
291                     [% END %]
292
293                     [% IF ( gonenoaddress ) %]
294                         <li class="error">Patron's address is in doubt</li>
295                     [% END %]
296
297                     [% IF ( transfertodo ) %]
298                         <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
299                     [% ELSE %]
300                         <h4><strong>Hold at</strong> [% destbranchname %]</h4>
301                     [% END %]
302
303                     [% FOREACH inputloo IN inputloop %]
304                         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
305                         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
306                         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
307                     [% END %]
308
309                     <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
310                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
311                     <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
312                     <input type="hidden" name="resbarcode" value="[% barcode | html %]" />
313                     <input type="hidden" name="diffBranch" value="[% destbranch %]" />
314                     <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
315                     <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
316                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
317
318                     <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
319                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
320                 </div>
321
322                 <div class="modal-footer">
323                     <input type="hidden" name="cancel_reserve" value="0" />
324
325                     <button type="submit" class="btn approve">
326                         <i class="fa fa-check"></i> Confirm
327                     </button>
328
329                     <input type="hidden" name="print_slip" value="0" />
330                     <button type="submit" class="btn print" onclick="this.form.print_slip.value = 1; this.form.submit();">
331                         <i class="fa fa-print"></i> Print and confirm
332                     </button>
333
334                     <button type="submit" class="btn deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();">
335                         <i class="fa fa-times"></i> Cancel hold
336                     </button>
337                 </div>
338             </form>
339         </div>
340     [% END %]
341
342     [% IF ( diffbranch ) %]
343                 <!-- diffbranch -->
344         <div id="transfer-needed" class="dialog message audio-alert-action">
345             <h3>Hold needing transfer found</h3>
346                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
347                 <h4>Hold for: </h4>
348                     <ul>
349                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
350                         <li>[% borstnum %] [% boraddress %]<br />
351                                                 [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
352                                                 [% borcity %]  [% borzip %]</li>
353                         [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
354                         [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
355 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
356 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
357                     </ul>
358                 [% IF ( transfertodo ) %]
359             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
360                 [% ELSE %]
361                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
362         [% END %]
363
364         <form method="post" action="returns.pl" class="confirm">
365             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
366             <input type="hidden" name="print_slip" value="0" />
367             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
368             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
369             <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</button>
370             [% FOREACH inputloo IN inputloop %]
371                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
372                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
373                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
374             [% END %]
375             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
376             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
377             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
378             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
379             <input type="hidden" name="barcode" value="0" />
380
381             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
382             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
383         </form>
384                 </div>
385     [% END %]
386
387     [% IF ( transfer ) %]
388     <!-- transfer: item with no reservation, must be returned according to home library circulation rules -->
389         <div id="return1" class="dialog message audio-alert-action">
390             <h3>Please return item to: [% Branches.GetName( returnbranch ) %]</h3>
391             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
392             <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% returnbranch %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
393         </div>
394     [% END %]
395
396     [% IF ( needstransfer ) %]
397         <!-- needstransfer -->
398     <div id="item-transfer" class="dialog message audio-alert-action"><h3> This item needs to be transferred to [% Branches.GetName( returnbranch ) %]</h3>
399     Transfer now?<br />
400     <form method="post" action="returns.pl" name="mainform" id="mainform">
401     [% IF itemnumber %]
402         <button type="submit" name="dotransfer" class="print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% returnbranch %]&amp;op=slip"><i class="fa fa-print"></i> Yes, print slip</button>
403     [% END %]
404         <button type="submit" name="dotransfer" class="submit"><i class="fa fa-check"></i> Yes</button>
405         <button type="submit" name="notransfer" class="submit"><i class="fa fa-times"></i> No</button>
406     <input type="hidden" name="tobranch" value="[% returnbranch %]" />
407         <input type="hidden" name="transferitem" value="[% itemnumber %]" />
408         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
409         <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
410         <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
411         [% FOREACH inputloo IN inputloop %]
412         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
413         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
414         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
415         [% END %]
416         <input type="hidden" name="barcode" value="0" />
417         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
418         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
419         </form>   </div>
420     [% END %]
421
422     [% IF ( diffbranch ) %]
423         <!-- diffbranch -->
424         <h3 class="audio-alert-action">Item consigned:</h3>
425         <table>
426         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
427         <tr>
428             <th>Hold for:</th>
429             <td>[% name %]</td>
430         </tr>
431         </table>
432         <form method="post" action="returns.pl"><input type="submit" value="OK" />
433             [% FOREACH inputloo IN inputloop %]
434                 [% UNLESS ( inputloo.first ) %]
435                     <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
436                     <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
437                     <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
438                 [% END %]
439             [% END %]
440
441             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
442             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
443
444             <input type="hidden" name="barcode" value="0" />
445         </form>
446     [% END %]
447
448
449     <!-- case of simple return no issue or transfer but with a reservation  -->
450     [% IF ( reserved ) %]
451         <!--  reserved  -->
452         <div id="hold-found2" class="modal fade audio-alert-action">
453             <form method="post" action="returns.pl" class="confirm">
454                 <div class="modal-header">
455                     <h3>
456                         Hold found:
457                         <br/>
458                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">
459                             [% itembarcode |html %]: [% title |html %]
460                         </a>
461                 </div>
462
463                 <div class="modal-body">
464                     [% IF ( reservenotes ) %]
465                         <h4>Notes: [% reservenotes %]</h4>
466                     [% END %]
467                     <h5>Hold for:</h5>
468
469                         <li>
470                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
471                                 [% borsurname %], [% borfirstname %]
472                             </a>
473                             ([% borcnum %])
474                         </li>
475
476                         <li>
477                             [% borstnum %] [% boraddress %]<br />
478                             [% IF ( boraddress2 ) %]
479                                 [% boraddress2 %]<br />
480                             [% END %]
481                             [% borcity %] [% borzip %]
482                         </li>
483
484 <<<<<<< HEAD
485     <div id="hold-found2" class="dialog message audio-alert-action">
486       <h3>Hold found</h3>
487           <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
488         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
489         <h5>Hold for:</h5>
490                 <ul>
491             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
492                 [% borsurname %], [% borfirstname %]
493             </a> ([% borcnum %])</li>
494             <li>[% borstnum %] [% boraddress %]<br />
495                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
496                         [% borcity %] [% borzip %]</li>
497             [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
498             [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
499             [% UNLESS ( transfertodo) %]
500                 [% INCLUDE display_bormessagepref %]
501             [% END %]
502 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
503 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
504         </ul>
505         [% IF ( transfertodo ) %]
506             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
507                 [% ELSE %]
508                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
509         [% END %]
510         <form method="post" action="returns.pl" class="confirm">
511             <input type="hidden" name="print_slip" value="0" />
512             [% IF ( transfertodo ) %]
513                 <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold and transfer</button>
514                 <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit()"><i class="fa fa-print"></i> Print slip, transfer, and confirm</button>
515             [% ELSE %]
516                 <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold</button>
517                 <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
518             [% END %]
519                 <button type="submit" class="deny" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;"><i class="fa fa-times"></i> Ignore</button>
520             [% FOREACH inputloo IN inputloop %]
521         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
522         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
523         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %]
524             <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
525             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
526             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
527             <input type="hidden" name="resbarcode" value="[% barcode | html %]" />
528             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
529             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
530             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
531             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
532             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
533             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
534         </form>
535         </div>
536 =======
537                         [% IF ( borphone ) %]
538                             <li>[% borphone %]</li>
539                         [% END %]
540
541                         [% IF ( boremail ) %]
542                             <li>
543                                 [% IF ( transfertodo ) %]
544                                     [% boremail %]
545                                 [% ELSE %]
546                                     <a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>
547                                 [% END %]
548                             </li>
549                         [% END %]
550
551                         [% IF ( debarred ) %]
552                             <li class="error">Patron is RESTRICTED</li>
553                         [% END %]
554
555                         [% IF ( gonenoaddress ) %]
556                             <li class="error">Patron's address is in doubt</li>
557                         [% END %]
558
559                     [% IF ( transfertodo ) %]
560                         <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
561                     [% ELSE %]
562                         <h4><strong>Hold at</strong> [% destbranchname %]</h4>
563                     [% END %]
564
565                     <input type="hidden" name="print_slip" value="0" />
566
567
568                     [% FOREACH inputloo IN inputloop %]
569                         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
570                         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
571                         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
572                     [% END %]
573
574                     <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
575                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
576                     <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
577                     <input type="hidden" name="resbarcode" value="[% barcode %]" />
578                     <input type="hidden" name="diffBranch" value="[% destbranch %]" />
579                     <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
580                     <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
581                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
582                     <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
583                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
584                 </div>
585
586                 <div class="modal-footer">
587                     [% IF ( transfertodo ) %]
588                         <button type="submit" class="btn approve">
589                             <i class="fa fa-check"></i> Confirm hold and transfer
590                         </button>
591                         <button type="submit" class="btn print" onclick="this.form.print_slip.value = 1; this.form.submit()">
592                             <i class="fa fa-print"></i> Print slip, transfer, and confirm
593                         </button>
594                     [% ELSE %]
595                         <button type="submit" class="btn approve">
596                             <i class="fa fa-check"></i> Confirm hold
597                         </button>
598                         <button type="submit" class="btn print" onclick="this.form.print_slip.value = 1; this.form.submit();">
599                             <i class="fa fa-print"></i> Print slip and confirm
600                         </button>
601                     [% END %]
602
603                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;">
604                         <i class="fa fa-times"></i> Ignore
605                     </button>
606                 </div>
607             </form>
608         </div>
609 >>>>>>> Bug 11360 - Disable barcode field and submit button when a hold is found
610     [% END %]
611 [% END %]
612
613 [% IF ( errmsgloop ) %]
614     <div class="dialog alert audio-alert-warning">
615         <h3>Check in message</h3>
616         [% IF itembiblionumber %]
617             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
618         [% END %]
619         [% FOREACH errmsgloo IN errmsgloop %]
620                     [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
621                         <p class="problem">
622                             Not for loan status updated.
623                             <br />Old value:
624                             [% IF errmsgloo.NotForLoanStatusUpdated.from %]
625                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %].
626                             [% ELSE %]
627                                 Available for loan.
628                             [% END %]
629                             <br />New value:
630                             [% IF errmsgloo.NotForLoanStatusUpdated.to %]
631                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %].
632                             [% ELSE %]
633                                 Available for loan.
634                             [% END %]
635                         </p>
636                     [% END %]
637                     [% IF ( errmsgloo.badbarcode ) %]
638                         <p class="problem">No item with barcode: [% errmsgloo.msg | html %]</p>
639                     [% END %]
640                     [% IF ( errmsgloo.ispermanent ) %]
641                         <p class="problem">Please return item to: [% errmsgloo.msg %]</p>
642                     [% END %]
643                     [% IF ( errmsgloo.notissued ) %]
644                         <p class="problem">Not checked out.</p>
645                     [% END %]
646                     [% IF ( errmsgloo.localuse) %]
647                         <p class="problem">Local use recorded</p>
648                     [% END %]
649                     [% IF ( errmsgloo.waslost ) %]
650                         <p class="problem">Item was lost, now found.</p>
651                         [% IF ( LostItemFeeRefunded ) %]
652                             <p class="problem">A refund has been applied to the borrowing patron's account.</p>
653                         [% ELSE %]
654                             <p class="problem">Any lost item fees for this item will remain on the patron's account.</p>
655                         [% END %]
656                     [% END %]
657                     [% IF ( errmsgloo.withdrawn ) %]
658                         [% IF BlockReturnOfWithdrawnItems %]
659                            <h5>Cannot check in</h5>
660                            <p><strong>NOT CHECKED IN</strong></p>
661                            <p class="problem">Item is withdrawn.</p>
662                         [% ELSE %]
663                            <p class="problem">Item is withdrawn.</p>
664                         [% END %]
665                     [% END %]
666                     [% IF ( errmsgloo.debarred ) %]
667                         <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>
668                     [% END %]
669                     [% IF ( errmsgloo.prevdebarred ) %]
670                         <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
671                     [% END %]
672                     [% IF ( errmsgloo.foreverdebarred ) %]
673                         <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction.</p>
674                     [% END %]
675
676             [% END %]
677         [% ELSE %]
678         [% END %]
679     </div>
680
681 [% IF ( checkinmsg ) %]
682     [% IF ( checkinmsgtype == 'alert' ) %]
683         <div class="dialog alert">
684     [% ELSE %]
685         <div class="dialog message">
686     [% END %]
687             <p class="problem">[% checkinmsg | html_line_break %]</p>
688         </div>
689 [% END%]
690
691     <div id="exemptfines" class="dialog message" style="display:none;">
692         <p>Fines for returned items are forgiven.</p>
693     </div>
694     <div id="forgivemanualholdsexpire-alert" class="dialog message" style="display:none;">
695         <p>Fines are not charged for manually cancelled holds.</p>
696     </div>
697     <div id="dropboxmode" class="dialog message" style="display:none;">
698         <p>Book drop mode.  (Effective checkin date is [% dropboxdate %] ).</p>
699     </div>
700 </div>
701         <div class="yui-g">
702     <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
703     <div class="yui-u first">
704             <fieldset>
705         <legend>Check in</legend>
706             <label for="barcode">Enter item barcode: </label>
707                         [% IF ( exemptfine ) %]
708                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
709                         [% ELSIF ( dropboxmode ) %]
710                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
711                         [% ELSE %]
712                         <input name="barcode" id="barcode" size="14" class="focus"/>
713                         [% END %]
714             <input type="submit" class="submit" value="Submit" />
715
716             [% IF Koha.Preference('SpecifyReturnDate') %]
717                 <div class="date-select" id="return_date_override_fields">
718                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
719
720                     <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" />
721
722                     <label for="return_date_override_remember"> Remember for next check in:</label>
723                     [% IF ( return_date_override_remember ) %]
724                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" />
725                     [% ELSE %]
726                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" />
727                     [% END %]
728
729                     <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;" />
730             </div>
731         [% END %]
732             [% FOREACH inputloo IN inputloop %]
733                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
734                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
735                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
736             [% END %]
737
738
739             </fieldset>
740             </div>
741             <div class="yui-u">
742             <fieldset id="checkin_options">
743                 <legend>Options</legend>
744                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
745                     <p>
746                         [% IF ( exemptfine ) %]
747                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
748                         [% ELSE %]
749                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
750                         [% END %]
751                         <label for="exemptcheck">Forgive overdue charges</label>
752                     </p>
753                     [% END %] <!-- overduecharges -->
754                     <p>
755                         [% IF ( dropboxmode ) %]
756                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
757                         [% ELSE %]
758                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
759                         [% END %]
760                         <label for="dropboxcheck">Book drop mode</label>
761                     </p>
762                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
763                     <p>
764                         [% IF ( forgivemanualholdsexpire ) %]
765                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
766                         [% ELSE %]
767                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
768                         [% END %]
769                         <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
770                     </p>
771                     [% END %] <!-- overduecharges -->
772             </fieldset>
773         </div>
774     </form>
775 </div>
776
777 [% IF ( riloop ) %]
778     <h2>Checked-in items</h2>
779     <table id="checkedintable">
780     <thead><tr><th class="ci-duedate">Due date</th><th class="ci-title">Title</th><th class="ci-author">Author</th><th class="ci-barcode">Barcode</th><th class="ci-homelibrary">Home library</th><th class="ci-holdinglibrary">Holding library</th><th class="ci-shelvinglocation">Shelving location</th><th class="ci-callnumber">Call number</th><th class="ci-dateaccessioned">Date acquired</th><th class="ci-type">Type</th><th class="ci-patron">Patron</th><th class="ci-note">Note</th></tr></thead>
781
782         [% FOREACH riloo IN riloop %]
783             <tr>
784             <td class="ci-duedate">[% IF ( riloo.duedate ) %]
785                     [% IF ( riloo.return_overdue ) %]
786                         <span class="overdue">[% riloo.duedate %] (overdue)</span>
787                     [% ELSE %][% riloo.duedate %]
788                     [% END %]
789                 [% ELSE %]Not checked out
790                 [% END %]
791             </td>
792             <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
793                     [% riloo.itemtitle |html %]
794                 </a>
795                 [% IF ( riloo.enumchron ) %]
796                     <br/>
797                     <span class="item_enumeration" style="white-space: nowrap;">[% riloo.enumchron %]</span>
798                 [% END %]
799             </td>
800             <td class="ci-author">[% riloo.itemauthor %]</td>
801             <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>
802             <td class="ci-homelibrary">[% Branches.GetName( riloo.homebranch ) %]</td>
803             <td class="ci-holdinglibrary">[% Branches.GetName( riloo.holdingbranch ) %]</td>
804             <td class="ci-shelvinglocation">[% riloo.location %]</td>
805             <td class="ci-callnumber">[% riloo.itemcallnumber %]</td>
806             <td class="ci-dateaccessioned">[% riloo.dateaccessioned | $KohaDates %]</td>
807             <td class="ci-type">[% ItemTypes.GetDescription( riloo.itemtype ) %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) %]</td>
808             <td class="ci-patron">[% IF ( riloo.duedate ) %]
809                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
810                     [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
811                 </a>
812             [% ELSE %]Not checked out[% END %]</td>
813             <td class="ci-note">
814                 [% IF ( riloo.bornote ) %]<p><span class="circ-hlt patron-note">[% riloo.bornote %]</p></span>[% END %]
815                 [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt item-note-public">[% riloo.itemnote %]</p></span>[% END %]
816                 [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic %]</p></span>[% END %]
817             </td>
818            </tr>
819         [% END %]
820     </table></div>
821 [% END %]
822
823
824 </div>
825 [% INCLUDE 'intranet-bottom.inc' %]