View | Details | Raw Unified | Return to bug 21034
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-868 / +888 lines)
Lines 11-975 Link Here
11
[% INCLUDE 'doc-head-open.inc' %]
11
[% INCLUDE 'doc-head-open.inc' %]
12
[% SET destination = "circ" %]
12
[% SET destination = "circ" %]
13
<title>Koha &rsaquo; Circulation
13
<title>Koha &rsaquo; Circulation
14
[% IF patron %]
14
    [% IF patron %]
15
  &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %]
15
        &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %]
16
[% END %]
16
    [% END %]
17
</title>
17
</title>
18
[% INCLUDE 'doc-head-close.inc' %]
18
[% INCLUDE 'doc-head-close.inc' %]
19
[% Asset.css("css/datatables.css") %]
19
[% Asset.css("css/datatables.css") %]
20
</head>
20
</head>
21
21
22
<body id="circ_circulation" class="circ">
22
<body id="circ_circulation" class="circ">
23
    [% INCLUDE 'header.inc' %]
24
    [% INCLUDE 'circ-search.inc' %]
23
25
24
[% INCLUDE 'header.inc' %]
26
    <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;
25
[% INCLUDE 'circ-search.inc' %]
27
        [% IF patron %]
26
28
            <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
27
<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;
29
        [% ELSE %]
28
[% IF patron %]
30
            <strong>Checkouts</strong>
29
    <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
31
        [% END %]
30
[% ELSE %]
31
    <strong>Checkouts</strong>
32
[% END %]
33
</div>
34
[% IF ( $borrowers ) %]
35
<div id="doc" class="yui-t7">
36
37
   <div id="bd">
38
	<div id="yui-main">
39
	<div class="yui-g">
40
[% ELSE %]
41
<div id="doc3" class="yui-t2">
42
43
   <div id="bd">
44
	<div id="yui-main">
45
	<div class="yui-b">
46
[% END %]
47
48
[% IF patron %]
49
[% INCLUDE 'members-toolbar.inc' %]
50
[% END %]
51
52
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
53
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
54
55
[% IF autoswitched %]
56
    <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
57
[% END %]
58
59
[% IF additional_materials %]
60
    <div id="materials" class="dialog message">Note about the accompanying materials: <br />
61
    [% additional_materials %]
62
    </div>
32
    </div>
63
[% END %]
64
33
65
[% IF ( alert.ITEM_LOST ) %]
34
    [% IF ( $borrowers ) %]
66
    <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
35
        <div id="doc" class="yui-t7">
67
[% END %]
36
           <div id="bd">
68
37
                <div id="yui-main">
69
[% IF ( alert.OTHER_CHARGES ) %]
38
                    <div class="yui-g">
70
    <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES %]</div>
39
    [% ELSE %]
71
[% END %]
40
        <div id="doc3" class="yui-t2">
41
            <div id="bd">
42
                <div id="yui-main">
43
                    <div class="yui-b">
44
    [% END %]
72
45
73
[% IF alert.HIGHHOLDS %]
46
                    [% IF patron %]
74
    <div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate %] ([% alert.HIGHHOLDS.duration %] days).</div>
47
                        [% INCLUDE 'members-toolbar.inc' %]
75
[% END %]
48
                    [% END %]
76
49
77
[% IF ( nopermission ) %]
50
                    <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
78
    <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
51
                    [% IF ( was_renewed ) %]
79
[% END %]
52
                        <div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>
53
                    [% END %]
80
54
81
[% IF ( NEEDSCONFIRMATION ) %]
55
                    [% IF autoswitched %]
82
<div class="yui-g">
56
                        <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
57
                    [% END %]
83
58
84
<div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
59
                    [% IF additional_materials %]
85
[% IF CAN_user_circulate_force_checkout %]
60
                        <div id="materials" class="dialog message">
86
  <h3>Please confirm checkout</h3>
61
                            Note about the accompanying materials: <br />
87
[% ELSE %]
62
                            [% additional_materials %]
88
  <h3>Cannot check out</h3>
63
                        </div>
89
[% END %]
64
                    [% END %]
90
65
91
<ul>
66
                    [% IF ( alert.ITEM_LOST ) %]
92
[%IF ( AGE_RESTRICTION ) %]
67
                        <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
93
    <li>Age restriction [% AGE_RESTRICTION %].
68
                    [% END %]
94
      [% IF CAN_user_circulate_force_checkout %]
95
        Check out anyway?
96
      [% END %]
97
    </li>
98
[% END %]
99
69
100
[% IF ( DEBT ) %]
70
                    [% IF ( alert.OTHER_CHARGES ) %]
101
    <li>The patron has a debt of [% DEBT | $Price %].</li>
71
                        <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES %]</div>
102
[% END %]
72
                    [% END %]
103
73
104
[% IF ( DEBT_GUARANTEES ) %]
74
                    [% IF alert.HIGHHOLDS %]
105
    <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li>
75
                        <div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate %] ([% alert.HIGHHOLDS.duration %] days).</div>
106
[% END %]
76
                    [% END %]
107
77
108
[% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
78
                    [% IF ( nopermission ) %]
109
    <li>Rental charge for this item: [% RENTALCHARGE %]</li>
79
                        <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
110
[% END %]
80
                    [% END %]
111
81
112
[% IF ( RENEW_ISSUE ) %]
82
                    [% IF ( NEEDSCONFIRMATION ) %]
113
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
83
                        <div class="yui-g">
114
[% END %]
84
                            <div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
85
                                [% IF CAN_user_circulate_force_checkout %]
86
                                    <h3>Please confirm checkout</h3>
87
                                [% ELSE %]
88
                                    <h3>Cannot check out</h3>
89
                                [% END %]
90
91
                                <ul>
92
                                    [%IF ( AGE_RESTRICTION ) %]
93
                                        <li>
94
                                            Age restriction [% AGE_RESTRICTION %].
95
                                            [% IF CAN_user_circulate_force_checkout %]
96
                                                Check out anyway?
97
                                            [% END %]
98
                                        </li>
99
                                    [% END %]
115
100
116
[% IF ( RESERVE_WAITING ) %]
101
                                    [% IF ( DEBT ) %]
117
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% reswaitingdate | $KohaDates %]</li>
102
                                        <li>The patron has a debt of [% DEBT | $Price %].</li>
118
[% END %]
103
                                    [% END %]
119
104
120
[% IF ( RESERVED ) %]
105
                                    [% IF ( DEBT_GUARANTEES ) %]
121
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% resreservedate | $KohaDates %]</li>
106
                                        <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li>
122
[% END %]
107
                                    [% END %]
123
108
124
[% IF ( ISSUED_TO_ANOTHER ) %]
109
                                    [% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
125
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
110
                                        <li>Rental charge for this item: [% RENTALCHARGE %]</li>
126
      [% IF CAN_user_circulate_force_checkout %]
111
                                    [% END %]
127
        Check in and check out?
128
      [% END %]
129
    </li>
130
[% END %]
131
112
132
[% IF TOO_MANY and TOO_MANY == 'TOO_MANY_CHECKOUTS' %]
113
                                    [% IF ( RENEW_ISSUE ) %]
133
    <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
114
                                        <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
134
[% END %]
115
                                    [% END %]
135
116
136
[% IF TOO_MANY and TOO_MANY == 'TOO_MANY_ONSITE_CHECKOUTS' %]
117
                                    [% IF ( RESERVE_WAITING ) %]
137
    <li>Too many on-site checked out. [% current_loan_count %] on-site checked out, only [% max_loans_allowed %] are allowed.</li>
118
                                        <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% reswaitingdate | $KohaDates %]</li>
138
[% END %]
119
                                    [% END %]
139
120
140
[% IF ( BORRNOTSAMEBRANCH ) %]
121
                                    [% IF ( RESERVED ) %]
141
    <li>This patron is from a different library ([% Branches.GetName( BORRNOTSAMEBRANCH ) %])</li>
122
                                        <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% resreservedate | $KohaDates %]</li>
142
[% END %]
123
                                    [% END %]
143
124
144
[% IF ( PATRON_CANT ) %]
125
                                    [% IF ( ISSUED_TO_ANOTHER ) %]
145
    <li>This patron can't check out this item per library circulation policy.</li>
126
                                        <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
146
[% END %]
127
                                          [% IF CAN_user_circulate_force_checkout %]
128
                                            Check in and check out?
129
                                          [% END %]
130
                                        </li>
131
                                    [% END %]
147
132
148
[% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
133
                                    [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_CHECKOUTS' %]
149
    <li>No circulation rule is defined for this patron and itemtype combination.</li>
134
                                        <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
150
[% END %]
135
                                    [% END %]
151
136
152
[% IF ( NOT_FOR_LOAN_FORCING ) %]
137
                                    [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_ONSITE_CHECKOUTS' %]
153
    <li>
138
                                        <li>Too many on-site checked out. [% current_loan_count %] on-site checked out, only [% max_loans_allowed %] are allowed.</li>
154
    [% IF ( itemtype_notforloan ) %]
139
                                    [% END %]
155
        Item type is normally not for loan.
156
    [% ELSIF ( item_notforloan ) %]
157
        [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
158
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
159
    [% END %]
160
      [% IF CAN_user_circulate_force_checkout %]
161
        Check out anyway?
162
      [% END %]
163
    </li>
164
[% END %]
165
140
166
[% IF ( USERBLOCKEDOVERDUE ) %]
141
                                    [% IF ( BORRNOTSAMEBRANCH ) %]
167
    <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
142
                                        <li>This patron is from a different library ([% Branches.GetName( BORRNOTSAMEBRANCH ) %])</li>
168
      [% IF CAN_user_circulate_force_checkout %]
143
                                    [% END %]
169
       Check out anyway?
170
      [% END %]
171
    </li>
172
[% END %]
173
144
174
[% IF ( ITEM_LOST ) %]
145
                                    [% IF ( PATRON_CANT ) %]
175
    <li>This item has been lost with a status of "[% ITEM_LOST %]".
146
                                        <li>This patron can't check out this item per library circulation policy.</li>
176
      [% IF CAN_user_circulate_force_checkout %]
147
                                    [% END %]
177
        Check out anyway?
178
      [% END %]
179
    </li>
180
[% END %]
181
148
182
[% IF HIGHHOLDS %]
149
                                    [% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
183
    <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
150
                                        <li>No circulation rule is defined for this patron and itemtype combination.</li>
184
[% END %]
151
                                    [% END %]
185
152
186
[% IF PREVISSUE %]
153
                                    [% IF ( NOT_FOR_LOAN_FORCING ) %]
187
    <li>Patron has previously checked out this title: <b>[% biblio.title %] [% IF biblio.author %] by [% biblio.author %][% END %]</b>. Check out anyway?</li>
154
                                        <li>
188
[% END %]
155
                                        [% IF ( itemtype_notforloan ) %]
156
                                            Item type is normally not for loan.
157
                                        [% ELSIF ( item_notforloan ) %]
158
                                            [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
159
                                            Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
160
                                        [% END %]
161
                                            [% IF CAN_user_circulate_force_checkout %]
162
                                                Check out anyway?
163
                                            [% END %]
164
                                        </li>
165
                                    [% END %]
189
166
190
[% IF BIBLIO_ALREADY_ISSUED %]
167
                                    [% IF ( USERBLOCKEDOVERDUE ) %]
191
  <li>
168
                                        <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
192
    Patron has already checked out another item from this record.
169
                                            [% IF CAN_user_circulate_force_checkout %]
193
    [% IF CAN_user_circulate_force_checkout %]
170
                                                Check out anyway?
194
      Check out anyway?
171
                                            [% END %]
195
    [% END %]
172
                                        </li>
196
  </li>
173
                                    [% END %]
197
[% END %]
198
</ul>
199
174
200
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
175
                                    [% IF ( ITEM_LOST ) %]
201
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
176
                                        <li>This item has been lost with a status of "[% ITEM_LOST %]".
202
    <input type="hidden" name="restoreduedatespec" />
177
                                            [% IF CAN_user_circulate_force_checkout %]
178
                                                Check out anyway?
179
                                            [% END %]
180
                                        </li>
181
                                    [% END %]
203
182
204
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
183
                                    [% IF HIGHHOLDS %]
184
                                        <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
185
                                    [% END %]
205
186
206
[% IF HIGHHOLDS %]
187
                                    [% IF PREVISSUE %]
207
    <p class="circ-override-high-holds">
188
                                        <li>Patron has previously checked out this title: <b>[% biblio.title %] [% IF biblio.author %] by [% biblio.author %][% END %]</b>. Check out anyway?</li>
208
    <input type="checkbox" name="override_high_holds_tmp" id="override_high_holds_tmp" value="1" />
189
                                    [% END %]
209
    <label for="override_high_holds_tmp">Don't decrease loan length based on holds</label>
210
    </p>
211
[% END %]
212
190
213
[% IF ( RESERVED ) %]
191
                                    [% IF BIBLIO_ALREADY_ISSUED %]
214
    <p>
192
                                        <li>
215
    <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
193
                                            Patron has already checked out another item from this record.
216
    <label for="cancelreserve">Cancel hold</label>
194
                                            [% IF CAN_user_circulate_force_checkout %]
217
    </p>
195
                                                Check out anyway?
218
[% END %]
196
                                            [% END %]
197
                                        </li>
198
                                    [% END %]
199
                                </ul>
200
201
                                [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
202
                                    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
203
                                        <input type="hidden" name="restoreduedatespec" />
204
                                        [% IF (forceallow) %]
205
                                            <input type="hidden" name="forceallow" value="1">
206
                                        [% END %]
207
208
                                        [% IF HIGHHOLDS %]
209
                                            <p class="circ-override-high-holds">
210
                                                <input type="checkbox" name="override_high_holds_tmp" id="override_high_holds_tmp" value="1" />
211
                                                <label for="override_high_holds_tmp">Don't decrease loan length based on holds</label>
212
                                            </p>
213
                                        [% END %]
214
215
                                        [% IF ( RESERVED ) %]
216
                                            <p>
217
                                                <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
218
                                                <label for="cancelreserve">Cancel hold</label>
219
                                            </p>
220
                                        [% END %]
221
222
                                        [% IF ( RESERVE_WAITING ) %]
223
                                            <p>
224
                                                <label for="cancelreserve">Cancel hold</label>
225
                                                <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
226
                                                <label for="revertreserve">Revert waiting status</label>
227
                                                <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
228
                                            </p>
229
                                        [% END %]
230
231
                                        <input type="hidden" name="barcode" value="[% barcode |html %]" />
232
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
233
                                        <input type="hidden" name="issueconfirmed" value="1" />
234
                                        <input type="hidden" name="override_high_holds" value="[% override_high_holds %]"/>
235
                                        [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
236
237
                                        [% IF ( INVALID_DATE ) %]
238
                                            <p>
239
                                                <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
240
                                                <label for="duedatespec">Due date</label>
241
                                            </p>
242
                                        [% ELSE %]
243
                                            <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
244
                                        [% END %]
245
246
                                        <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
247
                                        <input type="hidden" name="branch" value="[% branch %]" />
248
                                        [% IF ( RENEW_ISSUE ) %]
249
                                            <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
250
                                        [% ELSE %]
251
                                            <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
252
                                        [% END %]
253
                                        <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
254
                                        <input type="hidden" name="auto_renew" value="[% auto_renew %]" />
255
                                    </form>
256
                                [% END # /IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
257
258
                                [% IF ( RESERVED ) %]
259
                                    <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
260
                                        <input type="hidden" name="restoreduedatespec" />
261
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
262
                                        <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
263
                                        <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
264
                                        <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;itemnumber=[% item.itemnumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
265
                                    </form>
266
                                [% END %]
267
268
                                [% IF ( RESERVE_WAITING ) %]
269
                                    <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
270
                                        <input type="hidden" name="restoreduedatespec" />
271
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
272
                                        <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
273
                                        <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
274
                                        <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;itemnumber=[% item.itemnumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
275
                                    </form>
276
                                [% END %]
277
278
                                <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
279
                                    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
280
                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
281
                                    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
282
                                    <input type="hidden" name="restoreduedatespec" />
283
                                    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
284
                                    [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
285
                                        [% IF ( RENEW_ISSUE ) %]
286
                                            <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't renew (N)</button>
287
                                        [% ELSE %]
288
                                            <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't check out (N)</button>
289
                                        [% END %]
290
                                    [% ELSE %]
291
                                        <button type="submit" class="deny"><i class="fa fa-times"></i> Continue</button>
292
                                    [% END %]
293
                                </form>
219
294
220
[% IF ( RESERVE_WAITING ) %]
295
                                [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
221
<p>
296
                                    [% UNLESS noissues %]
222
    <label for="cancelreserve">Cancel hold</label>
297
                                        <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% patron.borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
223
    <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
298
                                    [% END %]
224
    <label for="revertreserve">Revert waiting status</label>
299
                                [% END %]
225
    <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
300
                            </div> [% # /circ_needsconfirmation %]
226
</p>
301
                        </div> [% # /.yui-g %]
227
[% END %]
302
                    [% END  # /IF NEEDSCONFIRMATION %]
303
304
                    [% IF ( IMPOSSIBLE ) %]
305
                        <div class="yui-g">
306
                            <div id="circ_impossible" class="dialog alert audio-alert-warning">
307
                                [% IF ( UNKNOWN_BARCODE ) %]
308
                                    <h3>Barcode not found</h3>
309
                                [% END %]
310
                                <!-- RESULT OF ISSUING REQUEST -->
311
                                <ul>
312
                                    [% IF ( STATS ) %]
313
                                        <li>Local use recorded</li>
314
                                    [% END %]
228
315
229
    <input type="hidden" name="barcode" value="[% barcode |html %]" />
316
                                    [% IF ( INVALID_DATE ) %]
230
    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
317
                                        <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
231
    <input type="hidden" name="issueconfirmed" value="1" />
318
                                    [% END %]
232
    <input type="hidden" name="override_high_holds" value="[% override_high_holds %]"/>
233
    [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
234
    [% IF ( INVALID_DATE ) %]
235
    <p>
236
    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
237
    <label for="duedatespec">Due date</label>
238
    </p>
239
    [% ELSE %]
240
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
241
    [% END %]
242
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
243
    <input type="hidden" name="branch" value="[% branch %]" />
244
    [% IF ( RENEW_ISSUE ) %]
245
    <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
246
    [% ELSE %]
247
    <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
248
    [% END %]
249
    <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
250
    <input type="hidden" name="auto_renew" value="[% auto_renew %]" />
251
</form>
252
[% END %]
253
319
254
[% IF ( RESERVED ) %]
320
                                    [% IF ( UNKNOWN_BARCODE ) %]
255
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
321
                                        <li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
256
    <input type="hidden" name="restoreduedatespec" />
322
                                            <div>
257
    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
323
                                                [% IF ( FALLBACK ) %]
258
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
324
                                                    [% IF options %]
259
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
325
                                                        <button type="button" class="approve" data-toggle="modal" data-target="#itemSearchFallback"><i class="fa fa-search"></i> Show matching titles</button>
260
    <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;itemnumber=[% item.itemnumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
326
                                                    [% ELSE %]
261
</form>
327
                                                        <div>No items were found by searching.</div>
262
[% END %]
328
                                                    [% END %]
329
                                                [% END %]
263
330
264
[% IF ( RESERVE_WAITING ) %]
331
                                                [% IF ( fast_cataloging ) %]
265
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
332
                                                    [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
266
    <input type="hidden" name="restoreduedatespec" />
333
                                                        <a class="approve" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% patron.borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]"><i class="fa fa-plus"></i> Add record using fast cataloging</a>
267
    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
334
                                                    [% END %]
268
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
335
                                                [% END %]
269
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
336
                                            </div>
270
    <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;itemnumber=[% item.itemnumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
337
                                        </li>
271
</form>
338
                                    [% END %]
272
[% END %]
273
339
274
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
340
                                    [% IF ( NOT_FOR_LOAN ) %]
275
    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
341
                                        <li>
276
    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
342
                                            [% IF ( itemtype_notforloan ) %]
277
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
343
                                                Item type not for loan.
278
    <input type="hidden" name="restoreduedatespec" />
344
                                            [% ELSIF ( item_notforloan ) %]
279
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
345
                                                [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
280
    [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
346
                                                Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
281
        [% IF ( RENEW_ISSUE ) %]
347
                                            [% END %]
282
        <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't renew (N)</button>
348
                                        </li>
283
        [% ELSE %]
349
                                    [% END %]
284
        <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't check out (N)</button>
285
        [% END %]
286
    [% ELSE %]
287
        <button type="submit" class="deny"><i class="fa fa-times"></i> Continue</button>
288
    [% END %]
289
</form>
290
350
291
[% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
351
                                    [% IF ( WTHDRAWN ) %]
292
    [% UNLESS noissues %]
352
                                        <li>Item has been withdrawn</li>
293
        <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% patron.borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
353
                                    [% END %]
294
    [% END %]
295
[% END %]
296
</div></div>
297
[% END %] <!-- NEEDSCONFIRMATION -->
298
354
299
        [% IF ( IMPOSSIBLE ) %]
355
                                    [% IF ( RESTRICTED ) %]
356
                                        <li>Item is restricted</li>
357
                                    [% END %]
300
358
301
<div class="yui-g">
359
                                    [% IF ( GNA ) %]
302
<div id="circ_impossible" class="dialog alert audio-alert-warning">
360
                                        <li>Patron's address is in doubt</li>
303
    [% IF ( UNKNOWN_BARCODE ) %]
361
                                    [% END %]
304
        <h3>Barcode not found</h3>
305
    [% END %]
306
<!-- RESULT OF ISSUING REQUEST -->
307
        <ul>
308
        [% IF ( STATS ) %]
309
            <li>Local use recorded</li>
310
        [% END %]
311
362
312
        [% IF ( INVALID_DATE ) %]
363
                                    [% IF ( CARD_LOST ) %]
313
            <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
364
                                        <li>Patron's card is lost</li>
314
        [% END %]
365
                                    [% END %]
315
366
316
        [% IF ( UNKNOWN_BARCODE ) %]
367
                                    [% IF ( DEBARRED ) %]
317
            <li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
368
                                        <li>Patron is restricted</li>
369
                                    [% END %]
318
370
319
                <div>
371
                                    [% IF ( NO_MORE_RENEWALS ) %]
320
                    [% IF ( FALLBACK ) %]
372
                                        <li>No more renewals possible</li>
321
                        [% IF options %]
373
                                    [% END %]
322
                            <button type="button" class="approve" data-toggle="modal" data-target="#itemSearchFallback"><i class="fa fa-search"></i> Show matching titles</button>
323
                        [% ELSE %]
324
                            <div>No items were found by searching.</div>
325
                        [% END %]
326
                    [% END %]
327
374
328
                    [% IF ( fast_cataloging ) %]
375
                                    [% IF NO_RENEWAL_FOR_ONSITE_CHECKOUTS %]
329
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
376
                                        <li>This item can not be renewed, it's an on-site checkout</li>
330
                            <a class="approve" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% patron.borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]"><i class="fa fa-plus"></i> Add record using fast cataloging</a>
377
                                    [% END %]
331
                        [% END %]
332
                    [% END %]
333
                </div>
334
378
335
            </li>
379
                                    [%IF ( AGE_RESTRICTION ) %]
336
        [% END %]
380
                                        <li>Age restriction [% AGE_RESTRICTION %].</li>
381
                                    [% END %]
337
382
338
        [% IF ( NOT_FOR_LOAN ) %]
383
                                    [% IF ( EXPIRED ) %]
339
            <li>
384
                                        <li>Patron's card is expired</li>
340
            [% IF ( itemtype_notforloan ) %]
385
                                    [% END %]
341
                Item type not for loan.
342
            [% ELSIF ( item_notforloan ) %]
343
                [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
344
                Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
345
            [% END %]
346
            </li>
347
        [% END %]
348
386
349
        [% IF ( WTHDRAWN ) %]
387
                                    [% IF ( TOO_MANY ) %]
350
            <li>Item has been withdrawn</li>
388
                                        <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
351
        [% END %]
389
                                    [% END %]
352
390
353
        [% IF ( RESTRICTED ) %]
391
                                    [% IF ( ITEMNOTSAMEBRANCH ) %]
354
            <li>Item is restricted</li>
392
                                        <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
355
        [% END %]
393
                                    [% END %]
356
394
357
        [% IF ( GNA ) %]
395
                                    [% IF RETURN_IMPOSSIBLE %]
358
            <li>Patron's address is in doubt</li>
396
                                        <li>This item must be returned to [% Branches.GetName( branch_to_return ) %].</li>
359
        [% END %]
397
                                    [% END %]
360
398
361
        [% IF ( CARD_LOST ) %]
399
                                    [% IF ( USERBLOCKEDWITHENDDATE ) %]
362
            <li>Patron's card is lost</li>
400
                                        <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
363
        [% END %]
401
                                    [% END %]
364
402
365
        [% IF ( DEBARRED ) %]
403
                                    [% IF ( USERBLOCKEDNOENDDATE ) %]
366
            <li>Patron is restricted</li>
404
                                        <li>Patron has an indefinite restriction.</li>
367
        [% END %]
405
                                    [% END %]
368
406
369
        [% IF ( NO_MORE_RENEWALS ) %]
407
                                    [% IF ( USERBLOCKEDOVERDUE ) %]
370
            <li>No more renewals possible</li>
408
                                        <li>Checkouts are BLOCKED because patron has overdue items.</li>
371
        [% END %]
409
                                    [% END %]
372
410
373
        [% IF NO_RENEWAL_FOR_ONSITE_CHECKOUTS %]
411
                                    [% IF (forceallow) %]
374
            <li>This item can not be renewed, it's an on-site checkout</li>
412
                                        <li>Restriction overridden temporarily.</li>
375
        [% END %]
413
                                    [% END %]
414
                                </ul>
415
                            </div> [% # /IF circ_impossible %]
416
                        </div> [% # /.yui-g %]
417
418
                        [% IF ( FALLBACK ) %]
419
                            [% IF options %]
420
421
                                <!-- Modal -->
422
                                <div class="modal" id="itemSearchFallback" tabindex="-1" role="dialog" aria-labelledby="itemSearchFallbackLabel">
423
                                    <div class="modal-dialog modal-wide" role="document">
424
                                        <div class="modal-content">
425
                                            <div class="modal-header">
426
                                                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
427
                                                <h3 id="itemSearchFallbackLabel"><h3>Barcode not found. The following items were found by searching:</h3>
428
                                            </div>
429
                                            <div class="modal-body">
430
                                                <table class="table_borrowers">
431
                                                    [% FOREACH book IN options %]
432
                                                        <tr>
433
                                                            <td>
434
                                                                <a class="popup" target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber %]">[% book.title %]</a>
435
                                                                [% book.barcode %]
436
                                                            </td>
437
                                                            <td>
438
                                                                <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
439
                                                                    [% IF (forceallow) %]
440
                                                                        <input type="hidden" name="forceallow" value="1">
441
                                                                    [% END %]
442
                                                                    <input type="hidden" name="restoreduedatespec" />
443
                                                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
444
                                                                    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
445
                                                                    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
446
                                                                    <input type="hidden" name="branch" value="[% branch %]" />
447
                                                                    <input type="hidden" name="barcode" value="[% book.barcode %]" />
448
                                                                    <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
449
                                                                </form>
450
                                                            </td>
451
                                                        </tr>
452
                                                    [% END %]
453
                                                </table>
454
                                            </div>
455
                                            <div class="modal-footer">
456
                                                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
457
                                            </div>
458
                                        </div>
459
                                    </div>
460
                                </div>
461
                            [% END # /IF options %]
462
                        [% END # /IF FALLBACK %]
463
464
                    [% ELSE # IMPOSSIBLE %]
465
                        [% IF (forceallow) %]
466
                            <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
467
                        [% END %]
468
                    [% END # /IF IMPOSSIBLE %]
376
469
377
        [%IF ( AGE_RESTRICTION ) %]
470
                    <span class="audio-alert-success"></span>
378
            <li>Age restriction [% AGE_RESTRICTION %].</li>
379
        [% END %]
380
471
381
        [% IF ( EXPIRED ) %]
472
                    [% IF ( issued ) %]
382
            <li>Patron's card is expired</li>
473
                        <p>Item checked out</p>
383
        [% END %]
474
                    [% END %]
384
475
385
        [% IF ( TOO_MANY ) %]
476
                    [% IF ( message ) %]
386
            <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
477
                        [% INCLUDE 'patron-toolbar.inc' %]
387
        [% END %]
478
                        <h4>No patron matched <span class="ex">[% message | html %]</span></h4>
479
                    [% END %]
388
480
389
        [% IF ( ITEMNOTSAMEBRANCH ) %]
481
                    [% IF ( borrowers ) %]
390
            <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
482
                        [% INCLUDE 'patron-toolbar.inc' %]
391
        [% END %]
392
483
393
        [% IF RETURN_IMPOSSIBLE %]
484
                        <fieldset id="circ_circulation_selectborrower">
394
            <li>This item must be returned to [% Branches.GetName( branch_to_return ) %].</li>
485
                            [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %]
395
        [% END %]
486
                        </fieldset>
487
                    [% ELSE %]
396
488
397
        [% IF ( USERBLOCKEDWITHENDDATE ) %]
489
                    <!-- BARCODE ENTRY -->
398
            <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
399
        [% END %]
400
490
401
        [% IF ( USERBLOCKEDNOENDDATE ) %]
491
                    [% IF patron %]
402
            <li>Patron has an indefinite restriction.</li>
492
                        <div class="yui-g">
403
        [% END %]
404
493
405
        [% IF ( USERBLOCKEDOVERDUE ) %]
494
                            [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
406
            <li>Checkouts are BLOCKED because patron has overdue items.</li>
495
                                <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>
407
        [% END %]
496
                            [% END %]
408
        </ul>
409
497
410
        [% IF (forceallow) %]
498
                            [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
411
            <li>Restriction overridden temporarily.</li>
499
                                <div class="yui-u first">
412
        [% END %]
500
501
                                    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
502
                                        <input type="hidden" name="restoreduedatespec" />
503
504
                                        [% IF ( issue ) %]
505
                                            <fieldset id="circ_circulation_issue" class="lastchecked">
506
                                        [% ELSE %]
507
                                            <fieldset id="circ_circulation_issue">
508
                                        [% END %]
509
510
                                            [% IF ( DisplayClearScreenButton ) %]
511
                                                <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
512
                                            [% END %]
513
514
                                            [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
515
                                            <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
516
517
                                            [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
518
                                                <div class="hint">Enter item barcode or keyword:</div>
519
                                            [% ELSE %]
520
                                                <div class="hint">Enter item barcode:</div>
521
                                            [% END %]
522
523
                                            [% IF NEEDSCONFIRMATION %]
524
                                                <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
525
                                            [% ELSE %]
526
                                                <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
527
                                            [% END %]
528
                                            <button type="submit" class="btn btn-default">Check out</button>
529
530
                                            <div id="show-checkout-settings">
531
                                                <a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
532
                                            </div>
533
534
                                            <div class="checkout-settings">
535
536
                                                [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
537
                                                    [% IF ( SpecifyDueDate ) %]
538
                                                        <div id="specify-due-date" class="checkout-setting">
539
                                                            <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
540
                                                            [% IF ( duedatespec ) %]
541
                                                                <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
542
                                                            [% ELSE %]
543
                                                                <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
544
                                                            [% END %]
545
                                                            <label for="stickyduedate"> Remember for session:</label>
546
                                                            [% IF ( stickyduedate ) %]
547
                                                                <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
548
                                                            [% ELSE %]
549
                                                                <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
550
                                                            [% END %]
551
                                                            <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
552
                                                        </div>
553
                                                    [% END # /IF SpecifyDueDate %]
554
                                                [% END # /IF noissues && OnSiteCheckoutsForce %]
555
556
                                                [% UNLESS ( noissues ) %]
557
                                                    <div id="set-automatic-renewal" class="checkout-setting">
558
                                                        [% IF NEEDSCONFIRMATION %]
559
                                                            <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
560
                                                        [% ELSE %]
561
                                                            <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
562
                                                        [% END %]
563
564
                                                        <label for="auto_renew">Automatic renewal</label>
565
                                                    </div>
566
                                                    [% IF Koha.Preference('decreaseLoanHighHolds') %]
567
                                                        <div id="set_high_holds_overrride" class="checkout-setting">
568
                                                            [% IF NEEDSCONFIRMATION %]
569
                                                                [% IF override_high_holds %]
570
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
571
                                                                [% ELSE %]
572
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
573
                                                                [% END %]
574
                                                            [% ELSE %]
575
                                                                [% IF override_high_holds %]
576
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
577
                                                                [% ELSE %]
578
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
579
                                                                [% END %]
580
                                                            [% END %]
581
                                                            <label for="override_high_holds">Don't decrease checkout length based on holds</label>
582
                                                        </div>
583
                                                    [% END # /IF decreaseLoanHighHolds %]
584
                                                [% END # /UNLESS noissues %]
585
586
                                                [% IF Koha.Preference('OnSiteCheckouts') %]
587
                                                    <div id="onsite_checkout-select" class="checkout-setting">
588
                                                        [% IF noissues %]
589
                                                            <div class="onsite-checkout-only">
590
                                                                <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
591
                                                                <input type="text" name="duedatespec" id="duedatespec" />
592
                                                                <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
593
                                                            </div>
594
                                                        [% ELSE %]
595
                                                            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" />
596
                                                            <label for="onsite_checkout">On-site checkout</label>
597
                                                        [% END %]
598
                                                    </div>
599
                                                [% END # /IF OnSiteCheckouts%]
600
                                            </div> [% # /.checkout-settings %]
601
602
                                            <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
603
                                            <input type="hidden" name="branch" value="[% branch %]" />
604
                                            <input type="hidden" name="print" value="maybe" />
605
                                            <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
606
                                            [% IF ( CHARGES ) %]
607
                                                <input type="hidden" name="charges" value="yes" />
608
                                            [% END %]
609
                                        </fieldset> [% # /#circ_circulation_issue %]
610
611
                                        [% IF ( issue ) %]
612
                                            <div class="lastchecked">
613
                                                <p><strong>Checked out: </strong>[% issue.item.biblioitemnumber.biblionumber.title %] ([% issue.item.barcode %]). Due on [% issue.date_due | $KohaDates %]</p>
614
                                            </div>
615
                                        [% END %]
616
                                    </form> [% # / #mainform %]
617
                                </div> [% # /.yui-u.first %]
618
619
                            [% END %] [% # /IF !noissues || ( OnSiteCheckouts && OnSiteCheckoutsForce ) %]
620
621
                            [% IF ( noissues ) %]
622
                                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
623
                                    <div class="yui-u">
624
                                [% ELSE %]
625
                                    <div>
626
                                [% END %]
627
                            [% ELSE %]
628
                                <div class="yui-u">
629
                            [% END %]
413
630
414
</div></div>
631
                            [% IF ( noissues ) %]
415
632
                                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
416
        [% IF ( FALLBACK ) %]
633
                                    <div id="circmessages" class="circmessage attention">
417
            [% IF options %]
634
                                [% ELSE %]
418
635
                                    <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
419
                <!-- Modal -->
636
                                    <div id="circmessages" class="circmessage warning">
420
                <div class="modal" id="itemSearchFallback" tabindex="-1" role="dialog" aria-labelledby="itemSearchFallbackLabel">
637
                                [% END %]
421
                    <div class="modal-dialog modal-wide" role="document">
638
                                <h3>
422
                        <div class="modal-content">
639
                                    Cannot check out!
423
                            <div class="modal-header">
640
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
424
                                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
641
                                        <span class="circ-hlt">Only on-site checkouts are allowed</span>
425
                                <h3 id="itemSearchFallbackLabel"><h3>Barcode not found. The following items were found by searching:</h3>
642
                                    [% END %]
426
                            </div>
643
                                </h3>
427
                            <div class="modal-body">
644
                            [% ELSE %]
428
                                <table class="table_borrowers">
645
                                <div id="circmessages" class="circmessage attention">
429
                                    [% FOREACH book IN options %]
646
                                    <h3>Attention:</h3>
430
                                        <tr>
647
                            [% END # /IF noissues %]
431
                                            <td>
648
432
                                                <a class="popup" target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber %]">[% book.title %]</a>
649
                                <ul>
433
                                                [% book.barcode %]
650
                                    [% IF ( has_modifications ) %]
434
                                            </td>
651
                                        <li>
435
                                            <td>
652
                                            <span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
436
                                                <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
653
                                            [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
437
                                                    [% IF (forceallow) %]
654
                                                    <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
438
                                                        <input type="hidden" name="forceallow" value="1">
655
                                            [% END %]
439
                                                    [% END %]
656
                                       </li>
440
                                                    <input type="hidden" name="restoreduedatespec" />
441
                                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
442
                                                    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
443
                                                    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
444
                                                    <input type="hidden" name="branch" value="[% branch %]" />
445
                                                    <input type="hidden" name="barcode" value="[% book.barcode %]" />
446
                                                    <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
447
                                                </form>
448
                                            </td>
449
                                        </tr>
450
                                    [% END %]
657
                                    [% END %]
451
                                </table>
452
                            </div>
453
                            <div class="modal-footer">
454
                                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
455
                            </div>
456
                        </div>
457
                    </div>
458
                </div>
459
            [% END %]
460
        [% END %]
461
462
[% ELSE %]
463
  [% IF (forceallow) %]
464
      <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
465
  [% END %]
466
[% END %] <!-- /impossible -->
467
468
<span class="audio-alert-success"></span>
469
470
[% IF ( issued ) %]
471
<p>Item checked out</p>
472
[% END %]
473
474
[% IF ( message ) %]
475
[% INCLUDE 'patron-toolbar.inc' %]
476
<h4>
477
No patron matched <span class="ex">[% message | html %]</span>
478
</h4>
479
[% END %]
480
658
481
[% IF ( borrowers ) %]
659
                                    [% IF ( warndeparture ) %]
482
[% INCLUDE 'patron-toolbar.inc' %]
660
                                        <li>
661
                                            <span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
662
                                            Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber %]&amp;categorycode=[% categorycode %]">Edit details</a>
663
                                        </li>
664
                                    [% END %]
483
665
484
<fieldset id="circ_circulation_selectborrower">
666
                                    [% IF ( returnbeforeexpiry ) %]
485
    [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %]
667
                                        <li>
486
</fieldset>
668
                                            <span class="circ-hlt">Set due date to expiry:</span>
487
[% ELSE %]
669
                                            You have the ReturnBeforeExpiry system preference enabled this means if the expiry date is before the date due, the date due will be set to the expiry date
670
                                        </li>
671
                                    [% END %]
488
672
489
<!-- BARCODE ENTRY -->
673
                                    [% IF ( expired ) %]
674
                                        <li>
675
                                            <span class="circ-hlt">Expiration:</span> Patron's card has expired.
676
                                            [% IF ( expiry ) %]
677
                                                Patron's card expired on [% expiry | $KohaDates %]
678
                                            [% END %]
679
                                            <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber %]&amp;categorycode=[% categorycode %]">Edit details</a>
680
                                        </li>
681
                                    [% END %]
490
682
491
[% IF patron %]
683
                                    [% IF ( gna ) %]
492
<div class="yui-g">
684
                                        <li class="blocker"><span class="circ-hlt">Address: </span> Patron's address in doubt</li>
685
                                    [% END %]
493
686
494
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
687
                                    [% IF ( lost ) %]
495
    <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>
688
                                        <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
496
[% END %]
689
                                    [% END %]
497
690
498
[% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
691
                                    [% IF ( userdebarred ) %]
499
<div class="yui-u first">
692
                                        <li class="blocker">
693
                                            <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
694
695
                                            [% IF ( userdebarreddate ) %]
696
                                                until [% userdebarreddate | $KohaDates %]
697
                                            [% END %]
698
699
                                            [% IF ( debarredcomment ) %]
700
                                                with the explanation: <br/><i>
701
                                                [% IF debarredcomment.search('OVERDUES_PROCESS') %]
702
                                                    Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
703
                                                [% ELSE %]
704
                                                    [% debarredcomment | html_line_break %]
705
                                                [% END %]
706
                                                </i>
707
                                            [% END %]
708
                                            <br/>
709
                                            <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
710
711
                                            [% IF (noissues && patron && CAN_user_circulate_force_checkout) %]
712
                                                <span class="override_debarment">
713
                                                    <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% patron.borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
714
                                                </span>
715
                                            [% END %]
716
                                       </li>
717
                                    [% END # /IF userdebarred %]
718
719
                                    [% IF ( odues ) %]
720
                                        <li>
721
                                            <span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span>
722
                                            <a href="#checkouts">See highlighted items below</a>
723
                                        </li>
724
                                    [% END %]
500
725
501
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
726
                                    [% IF ( charges ) %]
502
    <input type="hidden" name="restoreduedatespec" />
727
                                        [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
503
[% IF ( issue ) %]
728
                                    [% END %]
504
    <fieldset id="circ_circulation_issue" class="lastchecked">
505
[% ELSE %]
506
    <fieldset id="circ_circulation_issue">
507
[% END %]
508
    [% IF ( DisplayClearScreenButton ) %]
509
        <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
510
    [% END %]
511
729
512
    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
730
                                    [% IF ( charges_guarantees ) %]
731
                                        <li>
732
                                            <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
733
                                                [% IF noissues %]
734
                                                    <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
735
                                                [% END %]
736
                                        </li>
737
                                    [% END %]
513
738
514
    <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
739
                                    [% IF ( credits ) %]
740
                                        <li>
741
                                            <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount | $Price %][% END %]
742
                                        </li>
743
                                    [% END %]
515
744
516
        [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
745
                                </ul>
517
            <div class="hint">Enter item barcode or keyword:</div>
746
                            </div> [% # /.yui-u %]
518
        [% ELSE %]
747
519
            <div class="hint">Enter item barcode:</div>
748
                            [% IF WaitingHolds.count %]
520
        [% END %]
749
                                <div id="holdswaiting" class="circmessage">
750
                                    <h4>Holds waiting:</h4>
751
                                    [% FOREACH w IN WaitingHolds %]
752
                                        <ul>
753
                                            <li>
754
                                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a>
755
                                                ([% ItemTypes.GetDescription( w.item.effective_itemtype ) %]),
756
                                                [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
757
                                                [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %]
758
                                                Hold placed on [% w.reservedate | $KohaDates %].
759
760
                                                <br/>
761
                                                [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]
762
                                                    <strong class="waitinghere">
763
                                                [% ELSE %]
764
                                                    <strong>
765
                                                [% END %]
766
                                                    [% SET expires_on = w.expirationdate %]
767
                                                    Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
768
                                                </strong>
769
                                            </li>
770
                                        </ul>
771
                                    [% END %]
772
                                </div> [% # /#holdswaiting %]
773
                            [% END # /IF WaitingHolds.count %]
774
775
                            [% IF ( notes ) %]
776
                                <div id="circnotes" class="circmessage">
777
                                    <h4>Notes:</h4>
778
                                    <p><span class="circ-hlt">[% notesmsg %]</span></p>
779
                                </div>
780
                            [% END %]
521
781
522
    [% IF NEEDSCONFIRMATION %]
782
                            <div id="messages" class="circmessage">
523
        <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
783
                                <h4>Messages:</h4>
524
    [% ELSE %]
784
                                <ul>
525
        <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
785
                                    [% FOREACH message IN messages %]
526
    [% END %]
786
                                        <li>
527
    <button type="submit" class="btn btn-default">Check out</button>
787
                                            [% IF(message.message_type == "L") %]
788
                                                <span class="circ-hlt">
789
                                            [% ELSE %]
790
                                                <span>
791
                                            [% END %]
792
                                                [% message.message_date | $KohaDates %]
793
                                                [% Branches.GetName( message.branchcode ) %]
794
                                                [% IF message.manager_id %]
795
                                                    ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
796
                                                [% END %]
797
                                                <i>"[% message.message | html %]"</i>
798
                                            </span>
799
                                            [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
800
                                                <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
801
                                            [% END %]
802
                                        </li>
803
                                    [% END %]
804
                                </ul>
805
                                <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
806
                            </div> [% # /#messages %]
807
808
                            </div> [% # /.yui-u %]
809
                        </div> [% # /.yui-g%]
810
811
                        <div class="yui-g">
812
                            <div id="patronlists" class="toptabs">
813
                                <ul id="patronlists-tabs">
814
                                    <li>
815
                                        [% IF ( issuecount ) %]
816
                                            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
817
                                        [% ELSE %]
818
                                            <a href="#checkouts">0 Checkouts</a>
819
                                        [% END %]
820
                                    </li>
821
822
                                    [% IF relatives_issues_count %]
823
                                        <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
824
                                    [% END %]
528
825
529
    <div id="show-checkout-settings">
826
                                    <li>
530
        <a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
827
                                        [% IF ( holds_count ) %]
531
    </div>
828
                                            <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
829
                                        [% ELSE %]
830
                                            <a href="#reserves" id="holds-tab">0 Holds</a>
831
                                        [% END %]
832
                                    </li>
833
834
                                    [% IF Koha.Preference('ArticleRequests') %]
835
                                        <li>
836
                                            <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
837
                                        </li>
838
                                    [% END %]
532
839
533
    <div class="checkout-settings">
840
                                    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count %] Restrictions</a></li>
534
841
535
        [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
842
                                    [% SET enrollments = patron.get_club_enrollments(1) %]
536
            [% IF ( SpecifyDueDate ) %]
843
                                    [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
537
                <div id="specify-due-date" class="checkout-setting">
844
                                    [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
538
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
845
                                        <li>
539
                    [% IF ( duedatespec ) %]
846
                                            <a id="clubs-tab-link" href="#clubs-tab">
540
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
847
                                                Clubs ([% enrollments.count %]/[% enrollable.count %])
541
                    [% ELSE %]
848
                                            </a>
542
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
849
                                        </li>
543
                    [% END %]
850
                                    [% END %]
544
                    <label for="stickyduedate"> Remember for session:</label>
851
                                </ul> [% # /#patronlists-tabs %]
545
                    [% IF ( stickyduedate ) %]
852
546
                        <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
853
                                [% # CURRENT CHECKOUTS %]
547
                    [% ELSE %]
854
                                [% INCLUDE "checkouts-table.inc" %]
548
                        <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
855
549
                    [% END %]
856
                                [% IF ( relatives_issues_count ) %]
550
                    <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
857
                                    <div id="relatives-issues">
551
                </div>
858
                                        <table id="relatives-issues-table">
552
            [% END %]
859
                                            <thead>
553
        [% END %]
860
                                                <tr>
861
                                                    <th scope="col">Due date (unformatted, hidden)</th>
862
                                                    <th scope="col">Due date</th>
863
                                                    <th scope="col">Title</th>
864
                                                    <th scope="col">Item type</th>
865
                                                    <th scope="col">Location</th>
866
                                                    <th scope="col">Checked out on</th>
867
                                                    <th scope="col">Checked out from</th>
868
                                                    <th scope="col">Call no</th>
869
                                                    <th scope="col">Charge</th>
870
                                                    <th scope="col">Fine</th>
871
                                                    <th scope="col">Price</th>
872
                                                    <th scope="col">Patron</th>
873
                                                </tr>
874
                                            </thead>
875
                                        </table>
876
                                    </div>
877
                                [% END %]
878
879
                                [% # CLUBS %]
880
                                [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
881
                                    <div id="clubs-tab">
882
                                        Loading...
883
                                    </div>
884
                                [% END %]
885
886
                                [% # RESTRICTIONS %]
887
                                [% INCLUDE borrower_debarments.inc %]
888
889
                                [% # HOLDS  %]
890
                                <div id="reserves">
891
                                    [% IF ( holds_count ) %]
892
                                        <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
893
                                            <input type="hidden" name="from" value="circ" />
894
                                            <table id="holds-table" style="width: 100% !Important;">
895
                                                <thead>
896
                                                    <tr>
897
                                                        <th>Hold date</th>
898
                                                        <th>Title</th>
899
                                                        <th>Call number</th>
900
                                                        <th>Barcode</th>
901
                                                        <th>Pickup at</th>
902
                                                        <th>Expiration</th>
903
                                                        <th>Priority</th>
904
                                                        <th>Cancel?</th>
905
                                                        <th>Suspend?</th>
906
                                                    </tr>
907
                                                </thead>
908
                                            </table>
909
910
                                            <fieldset class="action">
911
                                                <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
912
                                            </fieldset>
913
                                        </form>
914
915
                                        [% IF Koha.Preference('SuspendHoldsIntranet') %]
916
                                            <fieldset class="action">
917
                                                <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
918
                                                    <input type="hidden" name="from" value="circ" />
919
                                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
920
                                                    <input type="submit" value="Suspend all holds" />
554
921
555
        [% UNLESS ( noissues ) %]
922
                                                    [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
556
            <div id="set-automatic-renewal" class="checkout-setting">
923
                                                        <label for="suspend_until">until</label>
557
                [% IF NEEDSCONFIRMATION %]
924
                                                        <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker"/>
558
                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
925
                                                        <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
559
                [% ELSE %]
926
                                                     [% END %]
560
                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
927
                                                </form>
561
                [% END %]
928
                                            </fieldset>
562
929
563
                <label for="auto_renew">Automatic renewal</label>
930
                                            <fieldset class="action">
564
            </div>
931
                                                <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
565
            [% IF Koha.Preference('decreaseLoanHighHolds') %]
932
                                                    <input type="hidden" name="from" value="circ" />
566
                <div id="set_high_holds_overrride" class="checkout-setting">
933
                                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
567
                    [% IF NEEDSCONFIRMATION %]
934
                                                    <input type="hidden" name="suspend" value="0" />
568
                        [% IF override_high_holds %]
935
                                                    <input type="submit" value="Resume all suspended holds" />
569
                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
936
                                                </form>
570
                        [% ELSE %]
937
                                            </fieldset>
571
                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
938
                                        [% END # IF SuspendHoldsIntranet %]
572
                        [% END %]
939
573
                    [% ELSE %]
940
                                    [% ELSE %]
574
                        [% IF override_high_holds %]
941
                                        <p>Patron has nothing on hold.</p>
575
                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
942
                                    [% END # /#IF holds_count %]
576
                        [% ELSE %]
943
                                </div> [% # /#reserves %]
577
                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
944
945
                                [% # ARTICLE REQUESTS %]
946
                                [% IF Koha.Preference('ArticleRequests') %]
947
                                    [% INCLUDE 'patron-article-requests.inc' %]
948
                                [% END %]
949
950
                                [% ELSIF borrowernumber %]
951
                                    <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
952
                                [% END %]
953
                            </div> [% # /#patronlists %]
954
                        </div> [% # /.yui-g %]
955
                    [% END # /IF patron %]
956
957
                    [% IF Koha.Preference('CircSidebar') %]
958
                        [% UNLESS ( borrowers ) %]
959
                            [% IF not( borrowernumber and patron ) %]
960
                                <div class="yui-b noprint">
961
                                    [% INCLUDE 'circ-nav.inc' %]
962
                                </div>
963
                            [% END %]
578
                        [% END %]
964
                        [% END %]
579
                    [% END %]
965
                    [% END %]
580
                    <label for="override_high_holds">Don't decrease checkout length based on holds</label>
966
                </div> [% # /#yui-main %]
581
                </div>
967
            </div> [% # /.bd %]
582
            [% END %]
968
            [% UNLESS ( borrowers ) %]
583
        [% END %]
969
                [% IF borrowernumber and patron %]
584
970
                    <div class="yui-b">
585
        [% IF Koha.Preference('OnSiteCheckouts') %]
971
                        [% INCLUDE 'circ-menu.inc' %]
586
            <div id="onsite_checkout-select" class="checkout-setting">
587
                [% IF noissues %]
588
                    <div class="onsite-checkout-only">
589
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
590
                        <input type="text" name="duedatespec" id="duedatespec" />
591
                        <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
592
                    </div>
972
                    </div>
593
                [% ELSE %]
594
                    <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
595
                [% END %]
973
                [% END %]
596
            </div>
597
        [% END %]
598
599
    </div> <!-- /.checkout-settings -->
600
601
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
602
          <input type="hidden" name="branch" value="[% branch %]" />
603
          <input type="hidden" name="print" value="maybe" />
604
          <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
605
                [% IF ( CHARGES ) %]
606
                        <input type="hidden" name="charges" value="yes" />
607
                [% END %]
608
</fieldset>
609
[% IF ( issue ) %]
610
    <div class="lastchecked">
611
        <p><strong>Checked out: </strong>[% issue.item.biblioitemnumber.biblionumber.title %] ([% issue.item.barcode %]). Due on [% issue.date_due | $KohaDates %]</p>
612
    </div>
613
[% END %]
614
</form></div>
615
616
[% END %]<!-- /unless noissues -->
617
618
[% IF ( noissues ) %]
619
    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
620
        <div class="yui-u">
621
    [% ELSE %]
622
        <div>
623
    [% END %]
624
[% ELSE %]
625
    <div class="yui-u">
626
[% END %]
627
628
        [% IF ( noissues ) %]
629
            [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
630
                <div id="circmessages" class="circmessage attention">
631
            [% ELSE %]
632
                <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
633
                <div id="circmessages" class="circmessage warning">
634
            [% END %]
974
            [% END %]
635
            <h3>
636
                Cannot check out!
637
                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
638
                    <span class="circ-hlt">Only on-site checkouts are allowed</span>
639
                [% END %]
640
            </h3>
641
        [% ELSE %]
642
            <div id="circmessages" class="circmessage attention">
643
                <h3>Attention:</h3>
644
        [% END %]
645
646
		<ul>
647
648
                   [% IF ( has_modifications ) %]
649
                    <li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
650
                            [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
651
                                    <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
652
                            [% END %]
653
                   </li>
654
                  [% END %]
655
656
			[% IF ( warndeparture ) %]
657
			<li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
658
            Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
659
660
			</li>
661
			[% END %]
662
663
			[% IF ( returnbeforeexpiry ) %]
664
			 <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
665
			 expiry date is before the date due, the date due will be set to the expiry date
666
			 </li>
667
			[% END %]
668
669
			[% IF ( expired ) %]
670
			<li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
671
            [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
672
673
			</li>
674
			[% END %]
675
676
            [% IF ( gna ) %]
677
			<li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
678
			[% END %]
679
680
            [% IF ( lost ) %]
681
			<li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
682
			[% END %]
683
684
            [% IF ( userdebarred ) %]
685
               <li class="blocker">
686
                   <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
687
688
                   [% IF ( userdebarreddate ) %]
689
                       until [% userdebarreddate | $KohaDates %]
690
                   [% END %]
691
692
                   [% IF ( debarredcomment ) %]
693
                       with the explanation: <br/><i>
694
			   [% IF debarredcomment.search('OVERDUES_PROCESS') %]
695
	                       Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
696
	                   [% ELSE %]
697
	                       [% debarredcomment | html_line_break %]
698
	                   [% END %]
699
                    </i>
700
                   [% END %]
701
                   <br/>
702
                   <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
703
                    [% IF (noissues && patron && CAN_user_circulate_force_checkout) %]
704
                        <span class="override_debarment">
705
                            <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% patron.borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
706
                        </span>
707
                    [% END %]
708
               </li>
709
            [% END %]
710
711
                [% IF ( odues ) %]<li><span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a></li>
712
            [% END %]
713
714
            [% IF ( charges ) %]
715
                [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
716
            [% END %]
717
718
            [% IF ( charges_guarantees ) %]
719
                <li>
720
                    <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
721
                        [% IF noissues %]
722
                            <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
723
                        [% END %]
724
                </li>
725
            [% END %]
726
727
728
            [% IF ( credits ) %]
729
                <li>
730
                    <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount | $Price %][% END %]
731
                </li>
732
            [% END %]
733
734
			</ul>
735
        </div>
975
        </div>
736
976
737
            [% IF WaitingHolds.count %]
977
        <!-- Modal -->
738
                <div id="holdswaiting" class="circmessage">
978
        <div id="barcodeSubmittedModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
739
                    <h4>Holds waiting:</h4>
979
            <div class="modal-dialog">
740
                    [% FOREACH w IN WaitingHolds %]
980
                <div class="modal-content">
741
                        <ul>
981
                    <div class="modal-header">
742
                            <li>
982
                        <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
743
                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a>
983
                    </div>
744
                                ([% ItemTypes.GetDescription( w.item.effective_itemtype ) %]),
984
                    <div class="modal-body">
745
                                [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
985
                        <p>You have already submitted a barcode, please wait for the checkout to process...</p>
746
                                [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %]
986
                    </div>
747
                                Hold placed on [% w.reservedate | $KohaDates %].
748
749
                                <br/>
750
                                [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
751
                                    [% SET expires_on = w.expirationdate %]
752
                                    Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
753
                                </strong>
754
                            </li>
755
                        </ul>
756
                    [% END %]
757
                </div>
987
                </div>
758
            [% END %]
988
            </div>
759
760
	[% IF ( notes ) %]
761
			<div id="circnotes" class="circmessage">
762
			<h4>Notes:</h4>
763
            <p><span class="circ-hlt">[% notesmsg %]</span></p>
764
			</div>
765
766
767
    <!-- /If notes -->[% END %]
768
769
    <div id="messages" class="circmessage">
770
        <h4>Messages:</h4>
771
        <ul>
772
            [% FOREACH message IN messages %]
773
                <li>
774
                    [% IF(message.message_type == "L") %]
775
                        <span class="circ-hlt">
776
                    [% ELSE %]
777
                        <span>
778
                    [% END %]
779
                        [% message.message_date | $KohaDates %]
780
                        [% Branches.GetName( message.branchcode ) %]
781
                        [% IF message.manager_id %]
782
                            ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
783
                        [% END %]
784
                        <i>"[% message.message | html %]"</i>
785
                    </span>
786
                    [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
787
                        <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
788
                    [% END %]
789
                </li>
790
            [% END %]
791
        </ul>
792
        <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
793
    </div>
794
795
</div>
796
</div>
797
798
<div class="yui-g"><div id="patronlists" class="toptabs">
799
800
<ul>
801
    <li>
802
        [% IF ( issuecount ) %]
803
            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
804
        [% ELSE %]
805
            <a href="#checkouts">0 Checkouts</a>
806
        [% END %]
807
    </li>
808
809
    [% IF relatives_issues_count %]
810
        <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
811
    [% END %]
812
813
    <li>
814
        [% IF ( holds_count ) %]
815
            <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
816
        [% ELSE %]
817
            <a href="#reserves" id="holds-tab">0 Holds</a>
818
        [% END %]
819
    </li>
820
821
    [% IF Koha.Preference('ArticleRequests') %]
822
        <li>
823
            <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
824
        </li>
825
    [% END %]
826
827
    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count %] Restrictions</a></li>
828
829
    [% SET enrollments = patron.get_club_enrollments(1) %]
830
    [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
831
    [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
832
        <li>
833
            <a id="clubs-tab-link" href="#clubs-tab">
834
                Clubs ([% enrollments.count %]/[% enrollable.count %])
835
            </a>
836
        </li>
837
    [% END %]
838
839
</ul>
840
841
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
842
843
[% INCLUDE "checkouts-table.inc" %]
844
845
[% IF ( relatives_issues_count ) %]
846
    <div id="relatives-issues">
847
        <table id="relatives-issues-table">
848
            <thead>
849
                <tr>
850
                    <th scope="col">Due date (unformatted, hidden)</th>
851
                    <th scope="col">Due date</th>
852
                    <th scope="col">Title</th>
853
                    <th scope="col">Item type</th>
854
                    <th scope="col">Location</th>
855
                    <th scope="col">Checked out on</th>
856
                    <th scope="col">Checked out from</th>
857
                    <th scope="col">Call no</th>
858
                    <th scope="col">Charge</th>
859
                    <th scope="col">Fine</th>
860
                    <th scope="col">Price</th>
861
                    <th scope="col">Patron</th>
862
                </tr>
863
            </thead>
864
        </table>
865
    </div>
866
[% END %]
867
868
[% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
869
    <div id="clubs-tab">
870
        Loading...
871
    </div>
872
[% END %]
873
874
[% INCLUDE borrower_debarments.inc %]
875
876
<div id="reserves">
877
[% IF ( holds_count ) %]
878
    <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
879
        <input type="hidden" name="from" value="circ" />
880
        <table id="holds-table" style="width: 100% !Important;">
881
            <thead>
882
                <tr>
883
                    <th>Hold date</th>
884
                    <th>Title</th>
885
                    <th>Call number</th>
886
                    <th>Barcode</th>
887
                    <th>Pickup at</th>
888
                    <th>Expiration</th>
889
                    <th>Priority</th>
890
                    <th>Cancel?</th>
891
                    <th>Suspend?</th>
892
                </tr>
893
            </thead>
894
        </table>
895
896
        <fieldset class="action">
897
            <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
898
        </fieldset>
899
    </form>
900
901
    [% IF Koha.Preference('SuspendHoldsIntranet') %]
902
    <fieldset class="action">
903
        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
904
            <input type="hidden" name="from" value="circ" />
905
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
906
            <input type="submit" value="Suspend all holds" />
907
908
            [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
909
            <label for="suspend_until">until</label>
910
            <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker"/>
911
            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
912
             [% END %]
913
        </form>
914
    </fieldset>
915
916
    <fieldset class="action">
917
        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
918
            <input type="hidden" name="from" value="circ" />
919
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
920
            <input type="hidden" name="suspend" value="0" />
921
            <input type="submit" value="Resume all suspended holds" />
922
	</form>
923
    </fieldset>
924
    [% END # IF SuspendHoldsIntranet %]
925
926
[% ELSE %]
927
	<p>Patron has nothing on hold.</p>
928
[% END %]
929
</div> <!-- reservesloop -->
930
931
[% IF Koha.Preference('ArticleRequests') %]
932
    [% INCLUDE 'patron-article-requests.inc' %]
933
[% END %]
934
935
[% ELSIF borrowernumber %]
936
    <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
937
[% END %]
938
</div></div>
939
[% END %]
940
[% IF Koha.Preference('CircSidebar') %]
941
[% UNLESS ( borrowers ) %]
942
    [% IF not( borrowernumber and patron ) %]
943
        <div class="yui-b noprint">
944
            [% INCLUDE 'circ-nav.inc' %]
945
        </div>
946
    [% END %]
947
[% END %]
948
[% END %]
949
</div>
950
</div>
951
[% UNLESS ( borrowers ) %]
952
    [% IF borrowernumber and patron %]
953
        <div class="yui-b">
954
            [% INCLUDE 'circ-menu.inc' %]
955
        </div>
989
        </div>
956
    [% END %]
957
[% END %]
958
</div>
959
<!-- Modal -->
960
<div id="barcodeSubmittedModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
961
    <div class="modal-dialog">
962
    <div class="modal-content">
963
    <div class="modal-header">
964
        <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
965
    </div>
966
967
    <div class="modal-body">
968
        <p>You have already submitted a barcode, please wait for the checkout to process...</p>
969
    </div>
970
    </div>
971
    </div>
972
</div>
973
990
974
[% MACRO jsinclude BLOCK %]
991
[% MACRO jsinclude BLOCK %]
975
    [% INCLUDE 'strings.inc' %]
992
    [% INCLUDE 'strings.inc' %]
Lines 1022-1028 No patron matched <span class="ex">[% message | html %]</span> Link Here
1022
            $.removeCookie("holdfor", { path: '/' });
1039
            $.removeCookie("holdfor", { path: '/' });
1023
        [% END %]
1040
        [% END %]
1024
1041
1025
        [% UNLESS ( patron.borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
1042
        [% UNLESS ( patron.borrowernumber ) %]
1043
            [% UNLESS ( borrowers ) %]
1044
                window.onload=function(){ $('#findborrower').focus(); };
1045
            [% END %]
1046
        [% END %]
1026
1047
1027
        // On-site checkout
1048
        // On-site checkout
1028
        function toggle_onsite_checkout(){
1049
        function toggle_onsite_checkout(){
1029
- 

Return to bug 21034