44cdb94df95c3c0dc0c114bcba87b85a86608339
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / moremember.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% USE AuthorisedValues %]
5 [% USE ColumnsSettings %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Patrons &rsaquo;
9 [% UNLESS blocking_error %]
10     Patron details for [% INCLUDE 'patron-title.inc' no_html = 1 %]
11 [% END %]
12 </title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
15 </head>
16
17 <body id="pat_moremember" class="pat">
18 [% INCLUDE 'header.inc' %]
19 [% INCLUDE 'patron-search.inc' %]
20
21 <div id="breadcrumbs">
22          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23 &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
24 &rsaquo; [% UNLESS blocking_error %]Patron details for [% INCLUDE 'patron-title.inc' %][% END %]
25 </div>
26
27 <div id="doc3" class="yui-t2">
28    
29    <div id="bd">
30         <div id="yui-main">
31         <div class="yui-b">
32
33 [% INCLUDE 'members-toolbar.inc' %]
34
35 [% IF ( error ) %]
36 <div class="dialog alert">
37     [% IF ( error == 'CANT_DELETE_STAFF' ) %]
38         <h3>Unable to delete staff user</h3>
39         <p>Insufficient privileges.</p>
40     [% END %]
41     [% IF ( error == 'CANT_DELETE_YOURSELF' ) %]
42         <h3>Not allowed to delete own account</h3>
43         <p>Deleting your own account would lock you out of Koha.</p>
44     [% END %]
45     [% IF ( error == 'CANT_DELETE_OTHERLIBRARY' ) %]
46         <h3>Unable to delete patrons from other libraries with current settings</h3>
47         <p>Insufficient privileges.</p>
48     [% END %]
49     [% IF ( error == 'CANT_DELETE' ) %]
50         <h3>Unable to delete patron</h3>
51         <p>Insufficient privileges.</p>
52     [% END %]
53 </div>
54 [% END %]
55 <div class="yui-g">
56
57     [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% patron.dateexpiry | $KohaDates %]</div>[% END %]
58
59     [% IF fines %]
60     <div id="circmessages" class="circmessage attention">
61       <ul>
62         [% INCLUDE 'blocked-fines.inc' %]
63       </ul>
64     </div>
65     [% END %]
66     <div id="messages" class="circmessage">
67         <h4>Messages:</h4>
68         <ul>
69             [% FOREACH patron_message IN patron_messages %]
70                 <li>
71                     [% IF(patron_message.message_type == "L") %]
72                         <span class="circ-hlt">
73                     [% ELSE %]
74                         <span>
75                     [% END %]
76                         [% patron_message.message_date | $KohaDates %]
77                         [% Branches.GetName( patron_message.branchcode ) %]
78                         [% IF patron_message.manager_id %]
79                             ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron_message.manager_id %]">[% patron_message.get_column('manager_firstname') %] [% patron_message.get_column('manager_surname') %]</a> )
80                         [% END %]
81                         <i>"[% patron_message.message | html %]"</i>
82                     </span>
83                     [% IF patron_message.branchcode == branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
84                         <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id %]&amp;borrowernumber=[% patron_message.borrowernumber %]&amp;from=moremember" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
85                     [% END %]
86                 </li>
87             [% END %]
88         </ul>
89         <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>
90     </div>
91
92     [% IF ( flagged ) %]
93     <div id="circmessages" class="circmessage attention">
94         <ul>
95         [% IF ( userdebarred ) %]
96             <li class="blocker">Patron's account is restricted
97                [% IF ( userdebarreddate ) %]
98                    until [% userdebarreddate %]
99                [% END %]
100
101                [% IF ( debarredcomment ) %]
102                    with the explanation: <i>
103                    [% IF debarredcomment.search('OVERDUES_PROCESS') %]
104                        Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
105                    [% ELSE %]
106                        [% debarredcomment | html_line_break %]
107                    [% END %]
108                     </i>
109                [% END %]
110                 <a href="#reldebarments" id="view_restrictions">View restrictions</a>
111             </li>
112         [% END %]
113         [% IF ( patron.gonenoaddress ) %]<li class="blocker">Patron's address is in doubt.</li>[% END %]
114         [% IF ( lost ) %]<li class="blocker">Patron's card has been reported lost.</li>[% END %]
115         </ul>
116     </div>
117     [% END %]
118 <h3>[% UNLESS ( I ) %]
119    [% patron.title | html %] [% patron.firstname | html %] [% END %] [% patron.surname | html %] ([% patron.cardnumber | html %])</h3>
120  <div class="yui-u first">
121 <div id="patron-information" style="padding : .5em;">
122
123     [% IF ( patron.othernames ) %]&ldquo;[% patron.othernames | html %]&rdquo;[% END %]
124
125     <div class = "address">
126         [% IF Koha.Preference( 'AddressFormat' ) %]
127             [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
128         [% ELSE %]
129             [% INCLUDE 'member-display-address-style-us.inc' %]
130         [% END %]
131     </div>
132                     
133         <div class="rows">
134     <ol>
135         [% IF ( patron.phone ) %]<li><span class="label">Primary phone: </span><a href="tel:[% patron.phone %]">[% patron.phone | html %]</a></li>[% END %]
136         [% IF ( patron.phonepro ) %]<li><span class="label">Secondary phone: </span><a href="tel:[% patron.phonepro %]">[% patron.phonepro | html %]</a></li>[% END %]
137         [% IF ( patron.mobile ) %]<li><span class="label">Other phone: </span><a href="tel:[% patron.mobile %]">[% patron.mobile | html %]</a></li>[% END %]
138         [% IF ( patron.fax ) %]<li><span class="label">Fax: </span>[% patron.fax |html %]</li>[% END %]
139         [% IF ( patron.email ) %]<li class="email"><span class="label">Primary email:</span><a title="[% patron.email %]" href="mailto:[% patron.email | url %]">[% patron.email | html %]</a></li>[% END %]
140         [% IF ( patron.emailpro ) %]<li class="email"><span class="label">Secondary email: </span><a title="[% patron.emailpro %]" href="mailto:[% patron.emailpro | url %]">[% patron.emailpro | html %]</a></li>[% END %]
141         [% UNLESS ( I ) %]
142             [% IF ( patron.initials ) %]<li><span class="label">Initials: </span>[% patron.initials | html %]</li>[% END %]
143             [% IF ( patron.dateofbirth ) %]<li><span class="label">Date of birth:</span>[% patron.dateofbirth | $KohaDates %] ([% age %] years)</li>[% END %]
144             [% IF ( patron.sex ) %]<li><span class="label">Gender:</span>
145                 [% IF ( patron.sex == 'F' ) %]Female[% ELSIF ( patron.sex == 'M' ) %]Male[% ELSE %][% patron.sex %][% END %]
146             </li>[% END %]
147         [% END %]
148         [% IF guarantees %]
149             <li>
150                 <span class="label">Guarantees:</span>
151                 <ul>
152                     [% FOREACH guarantee IN guarantees %]
153                         [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
154                             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
155                         [% ELSE %]
156                             <li>[% guarantee.firstname | html %] [% guarantee.surname | html %]</li>
157                         [% END %]
158                     [% END %]
159                 </ul>
160             </li>
161         [% ELSIF guarantor %]
162             <li>
163                 <span class="label">Guarantor:</span>
164                 [% IF guarantor.borrowernumber AND logged_in_user.can_see_patron_infos( guarantor ) %]
165                     <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a>
166                 [% ELSE %]
167                     [% guarantor.firstname | html %] [% guarantor.surname | html %]
168                 [% END %]
169             </li>
170         [% END %]
171     </ol>
172 </div>
173       <div class="action">
174         [% IF ( guarantor.borrowernumber ) %]
175         <a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=1&amp;guarantorid=[% guarantor.borrowernumber %]">Edit</a>
176         [% ELSE %]
177         <a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=1">Edit</a>
178         [% END %]</div>
179
180 </div>
181
182 <!-- Begin Upload Patron Image Section -->
183
184 <div id="manage-patron-image">
185 [% IF ( patronimages ) %]
186     [% IF ( CAN_user_tools_batch_upload_patron_images ) %]
187         <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
188             <fieldset class="brief">
189             [% IF ( patron.image ) %]
190                 <legend>Manage patron image</legend>
191                 <div class="hint">To update the image for [% patron.title | html %] [% patron.surname | html %], select a new image file and click 'Upload.' <br />Click the 'Delete' button to remove the current image.
192             [% ELSE %]
193                 <legend>Upload patron image</legend>
194                 <div class="hint">[% patron.title %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title %] [% patron.surname | html %], enter the name of an image file to upload.
195             [% END %]
196                     <br />Only PNG, GIF, JPEG, XPM formats are supported.
197                 </div>
198                 <input type="hidden" id="image" name="filetype" value="image" />
199                 <input type="hidden" id="cardnumber" name="cardnumber" value="[% patron.cardnumber | html %]" />
200                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
201                 <ol>
202                     <li>
203                        <label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
204                     </li>
205                 </ol>
206                 <fieldset class="action">
207                     <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
208                     <input type="submit" value="Upload" class="submit" />
209                     <input name="op" type="hidden" value="Upload" />
210                     [% IF ( patron.image ) %]<a id="delpicture" href="/cgi-bin/koha/tools/picture-upload.pl?op=Delete&amp;borrowernumber=[% patron.borrowernumber %]&amp;csrf_token=[% csrf_token %]" class="delete">Delete</a>[% END %]
211                 </fieldset>
212             </fieldset>
213         </form>
214     [% END %]
215 [% END %]
216 </div>
217
218 <!-- End Upload Patron Image Section -->
219
220 [% IF Koha.Preference('HouseboundModule') %]
221 <div id="houseboundroles">
222 <h3>Housebound roles</h3>
223 <div class="rows">
224   <ol>
225     <li>
226       <span class="label">Chooser:</span>
227       [% IF ( housebound_role.housebound_chooser == 1 ) %]
228         Yes
229       [% ELSE %]
230         No
231       [% END %]
232     </li>
233     <li>
234       <span class="label">Deliverer:</span>
235       [% IF ( housebound_role.housebound_deliverer == 1 ) %]
236         Yes
237       [% ELSE %]
238         No
239       [% END %]
240     </li>
241   </ol>
242 </div>
243 </div>
244 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=4">Edit</a></div>
245 [% END %]
246
247 [% IF ( ExtendedPatronAttributes ) %]
248 [% UNLESS ( no_patron_attribute_types ) %]
249 <div id="patron-extended-attributes" style="padding-top: 1em;">
250 <h3>Additional attributes and identifiers</h3>
251 [% FOREACH attribute IN attributes_loop %]
252     [% IF attribute.class %]
253         <div id="aai_[% attribute.class %]" class="rows">
254     [% ELSE %]
255         <div id="aai" class="rows">
256     [% END %]
257         <h4>[% attribute.lib %]</h4>
258         <ol>
259         [% FOREACH item IN attribute.items %]
260             <li>
261                 <span class="label">[% item.description %]: </span>
262                 [% IF ( item.value_description ) %]
263                     [% item.value_description %]
264                 [% ELSE %]
265                     [% item.value| html_line_break %]
266                 [% END %]
267             </li>
268         [% END %]
269         </ol>
270     </div>
271 [% END %]
272 </div>
273 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=4">Edit</a></div>
274 [% END %]
275 [% END %]
276
277
278 [% IF ( EnhancedMessagingPreferences ) %]
279 <div id="patron-messaging-prefs" style="padding-top: 1em;">
280 <h3>Patron messaging preferences</h3>
281 [% INCLUDE 'messaging-preference-form.inc' %]
282  [% IF ( SMSSendDriver ) %]
283       <div class="rows"> <ol><li><span class="label">SMS number:</span><a href="sms:[% patron.smsalertnumber %]">[% patron.smsalertnumber %]</a>
284      </li></ol></div>
285  [% END %]
286 </div>
287 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=5">Edit</a></div>
288 [% END %]
289
290 </div>
291  <div class="yui-u"> 
292  <div id="patron-library-details">
293  <h3>Library use</h3>
294 <div class="rows"> 
295 <ol>
296     <li><span class="label">Card number: </span>[% patron.cardnumber %]</li>
297     <li><span class="label">Borrowernumber: </span> [% patron.borrowernumber %]</li>
298     <li><span class="label">Category: </span>[% patron.category.description %] ([% patron.categorycode %])</li>
299     <li><span class="label">Registration date: </span>[% patron.dateenrolled | $KohaDates %]</li>
300
301     <li><span class="label">Expiration date: </span>
302     [% IF ( was_renewed ) %]
303             <strong class="reregistrinfo">[% patron.dateexpiry | $KohaDates %]</strong>
304     [% ELSE %]
305             [% patron.dateexpiry | $KohaDates %]
306     [% END %]
307     </li>
308     
309     <li><span class="label">Library: </span>[% branchname %]</li>
310
311     [% IF ( OPACPrivacy ) %]<li><span class="label">Privacy Pref:</span>
312          [% IF ( privacy0 ) %]Forever[% END %]
313          [% IF ( privacy1 ) %]Default[% END %]
314          [% IF ( privacy2 ) %]Never[% END %]
315     </li>[% END %]
316
317     <li>
318         <span class="label">Show checkouts to guarantor</span>
319         [% IF privacy_guarantor_checkouts %]
320             Yes
321         [% ELSE %]
322             No
323         [% END %]
324     </li>
325
326     [% IF ( patron.sort1 ) %]<li><span class="label">Sort field 1:</span>[% AuthorisedValues.GetByCode('Bsort1', patron.sort1) |html %]</li>[% END %]
327     [% IF ( patron.sort2 ) %]<li><span class="label">Sort field 2:</span>[% AuthorisedValues.GetByCode('Bsort2', patron.sort2) |html %]</li>[% END %]
328     <li><span class="label">Username: </span>[% patron.userid |html  %]</li>
329     <li><span class="label">Password: </span>
330     [% IF ( patron.password ) %]
331         *******
332     [% ELSE %]
333         <span class="problem"><a href="/cgi-bin/koha/members/member-password.pl?member=[% patron.borrowernumber %]">Undefined</a></span>
334     [% END %] 
335     </li>
336     [% IF ( patron.borrowernotes ) %]<li><span class="label">Circulation note: </span>[% patron.borrowernotes |html %]</li>[% END %]
337     [% IF ( patron.opacnote ) %]<li><span class="label">OPAC note:</span>[% patron.opacnote |html %]</li>[% END %]
338     [% IF Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 %]
339         [% IF ( sync == 1 ) %]
340             <li><span class="label">Activate sync: </span>Yes</li>
341             [% IF ( syncstatus ) %]<li><span class="label">Sync status: </span>[% syncstatus %]</li>[% END %]
342             [% IF ( lastsync ) %]<li><span class="label">Last sync: </span>[% lastsync | $KohaDates %]</li>[% END %]
343         [% ELSE %]
344             <li><span class="label">Activate sync: </span>No</li>
345         [% END %]
346     [% END %]
347     [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
348       <li><span class="label">Check previous checkouts: </span>
349         [% IF ( patron.checkprevcheckout == 'yes' ) %]
350         Yes
351         [% ELSIF ( patron.checkprevcheckout == 'no' ) %]
352         No
353         [% ELSE %]
354         Inherited
355         [% END %]
356       </li>
357     [% END %]
358     [% IF Koha.Preference('TranslateNotices') %]
359         <li>
360             <span class="label">Preferred language for notices: </span>
361             [% patron.translated_language %]
362         </li>
363     [% END %]
364         </ol>
365         </div>
366  </div>
367     <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=3">Edit</a></div>
368  
369  <div id="patron-alternate-address" style="padding-top: 1em;">
370     <h3>Alternate address</h3>
371
372     [% IF Koha.Preference( 'AddressFormat' ) %]
373         [% INCLUDE "member-display-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
374     [% ELSE %]
375         [% INCLUDE 'member-display-alt-address-style-us.inc' %]
376     [% END %]
377
378     <div class="rows">  <ol>
379       [% IF ( patron.B_phone ) %]<li><span class="label">Phone: </span><a href="tel:[% patron.B_phone %]">[% patron.B_phone |html  %]</a></li>[% END %]
380       [% IF ( patron.B_email ) %]<li class="email"><span class="label">Email: </span><a title="[% patron.B_email %]" href="mailto:[% patron.B_email | url %]">[% B_email |html %]</a></li>[% END %]
381       [% IF ( patron.contactnote ) %]<li><span class="label">Contact note: </span> [% patron.contactnote |html %]</li>[% END %]
382       </ol>
383     </div>
384 </div>
385 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=6">Edit</a></div>
386
387  <div id="patron-alternative-contact" style="padding-top: 1em;">
388  <h3>Alternative contact</h3>
389    <div class="rows"> <ol><li><span class="label">Surname: </span>[% patron.altcontactsurname | html %]</li>
390     <li><span class="label">First name: </span>[% patron.altcontactfirstname | html %]</li>
391     <li><span class="label">Address: </span>[% patron.altcontactaddress1 | html %]</li>
392     <li><span class="label">Address 2: </span>[% patron.altcontactaddress2 | html %]</li>
393     <li><span class="label">City: </span>[% patron.altcontactaddress3 | html %]</li>
394     [% IF ( patron.altcontactstate ) %]<li><span class="label">State: </span>[% patron.altcontactstate | html %]</li>[% END %]
395     <li><span class="label">ZIP/Postal code: </span>[% patron.altcontactzipcode | html %]</li>
396     [% IF ( patron.altcontactcountry ) %]<li><span class="label">Country: </span>[% patron.altcontactcountry | html %]</li>[% END %]
397     [% IF ( patron.altcontactphone ) %]<li><span class="label">Phone: </span><a href="tel:[% patron.altcontactphone | url %]">[% patron.altcontactphone | html %]</a></li>[% END %]
398     </ol></div>
399 </div>
400 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber %]&amp;step=2">Edit</a></div>
401
402 </div>
403 </div>
404 <div id="finesholdsissues" class="toptabs">
405     <ul>
406         <li><a href="#checkouts">[% issuecount %] Checkout(s)</a></li>
407         [% IF relatives_issues_count %]
408             <li><a href="#relatives-issues" id="relatives-issues-tab">Relatives' checkouts</a></li>
409         [% END %]
410         <li><a href="#finesandcharges">Fines &amp; Charges</a></li>
411         <li>
412             [% IF ( holds_count ) %]
413                 <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
414             [% ELSE %]
415                 <a href="#reserves" id="holds-tab">0 Holds</a>
416             [% END %]
417         </li>
418         [% IF Koha.Preference('ArticleRequests') %]
419             <li>
420                 <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
421             </li>
422         [% END %]
423         <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
424
425         [% SET enrollments = patron.get_club_enrollments(1) %]
426         [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
427         [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
428             <li>
429                 <a id="clubs-tab-link" href="#clubs-tab">
430                     Clubs ([% enrollments.count %]/[% enrollable.count %])
431                 </a>
432             </li>
433         [% END %]
434     </ul>
435
436 [% INCLUDE "checkouts-table.inc" %]
437
438 [% IF ( relatives_issues_count ) %]
439     <div id="relatives-issues">
440         <table id="relatives-issues-table" style="width: 100% !Important;">
441             <thead>
442                 <tr>
443                     <th scope="col">Due date hidden not formatted</th>
444                     <th scope="col">Due date</th>
445                     <th scope="col">Title</th>
446                     <th scope="col">Item type</th>
447                     <th scope="col">Location</th>
448                     <th scope="col">Checked out on</th>
449                     <th scope="col">Checked out from</th>
450                     <th scope="col">Call no</th>
451                     <th scope="col">Charge</th>
452                     <th scope="col">Fine</th>
453                     <th scope="col">Price</th>
454                     <th scope="col">Patron</th>
455                 </tr>
456             </thead>
457         </table>
458     </div>
459 [% END %]
460
461 <div id="finesandcharges">
462     [% IF ( totaldue_raw ) %]
463         <p>Total due: [% totaldue %]</p>
464     [% ELSE %]
465         <p>No outstanding charges</p>
466     [% END %]
467 </div>
468
469 [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
470     <div id="clubs-tab">
471         Loading...
472     </div>
473 [% END %]
474
475 [% INCLUDE borrower_debarments.inc %]
476
477 <div id="reserves">
478 [% IF ( holds_count ) %]
479     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
480         <input type="hidden" name="from" value="circ" />
481         <table id="holds-table" style="width: 100% !Important;">
482             <thead>
483                 <tr>
484                     <th>Hold date</th>
485                     <th>Title</th>
486                     <th>Call number</th>
487                     <th>Barcode</th>
488                     <th>Pickup at</th>
489                     <th>Expiration</th>
490                     <th>Priority</th>
491                     <th>Delete?</th>
492                     <th>Suspend?</th>
493                 </tr>
494             </thead>
495         </table>
496
497         <fieldset class="action">
498             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
499         </fieldset>
500     </form>
501
502     [% IF Koha.Preference('SuspendHoldsIntranet') %]
503     <fieldset class="action">
504         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
505             <input type="hidden" name="from" value="borrower" />
506             <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
507             <input type="submit" value="Suspend all holds" />
508
509             [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
510             <label for="suspend_until">until</label>
511             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker"/>
512             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
513             [% END %]
514         </form>
515     </fieldset>
516
517     <fieldset class="action">
518         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
519             <input type="hidden" name="from" value="borrower" />
520             <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
521             <input type="hidden" name="suspend" value="0" />
522             <input type="submit" value="Resume all suspended holds" />
523         </form>
524     </fieldset>
525     [% END # IF SuspendHoldsIntranet %]
526
527     [% ELSE %]<p>Patron has nothing on hold.</p>[% END %]
528         </div>
529
530
531 [% IF Koha.Preference('ArticleRequests') %]
532     [% INCLUDE 'patron-article-requests.inc' %]
533 [% END %]
534
535 </div>
536
537 </div>
538 </div>
539 <div class="yui-b">
540 [% INCLUDE 'circ-menu.inc' %]
541 </div>
542 </div>
543
544 [% MACRO jsinclude BLOCK %]
545     [% INCLUDE 'datatables.inc' %]
546     [% INCLUDE 'columns_settings.inc' %]
547     [% INCLUDE 'strings.inc' %]
548     [% INCLUDE 'calendar.inc' %]
549     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
550     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
551     [% INCLUDE 'timepicker.inc' %]
552     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
553     <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
554     <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
555     <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
556     <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
557     <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
558     <script type="text/javascript">
559         /* Set some variable needed in circulation.js */
560         var interface = "[% interface %]";
561         var theme = "[% theme %]";
562         var borrowernumber = "[% patron.borrowernumber %]";
563         var branchcode = "[% Branches.GetLoggedInBranchcode() %]";
564         var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
565         var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %]
566         var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
567         var script = "moremember";
568         var relatives_borrowernumbers = new Array();
569         [% FOREACH b IN relatives_borrowernumbers %]
570             relatives_borrowernumbers.push("[% b %]");
571         [% END %]
572
573         var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
574         var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
575
576         columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
577
578         $(document).ready(function() {
579             if ( $('#clubs-tab').length ) {
580                 $('#clubs-tab-link').on('click', function() {
581                     $('#clubs-tab').text(_("Loading..."));
582                     $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
583                 });
584             }
585
586             $('#finesholdsissues').tabs({
587                 // Correct table sizing for tables hidden in tabs
588                 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
589                 "show": function(event, ui) {
590                     var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
591                     if ( oTable.length > 0 ) {
592                         oTable.fnAdjustColumnSizing();
593                     }
594                 },
595                 "activate": function( event, ui ) {
596                     $('#'+ui.newTab.context.id).click();
597                 }
598             } );
599             $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
600                 "sDom": 't',
601                 "aoColumnDefs": [
602                     { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false }
603                 ],
604                 "aoColumns": [
605                     { "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null,null,null
606                 ],
607                 "bPaginate": false
608             }));
609             [% IF ( patron.image ) %]
610                 $('#delpicture').click(function(){
611                      return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
612                 });
613                 $('#manage-patron-image').find("input[value*=Upload]").click(function(){
614                     if($("#uploadfile").val() == ""){
615                         alert(_("Please choose a file to upload"));
616                         return false;
617                     }
618                     return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
619                 });
620             [% END %]
621
622             $("#suspend_until").datepicker({
623                 onClose: function(dateText, inst) {
624                     validate_date(dateText, inst);
625                 },
626                 minDate: 1, // require that hold suspended until date is after today
627             }).on("change", function(e, value) {
628                 if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
629             });
630
631             $("#view_restrictions").on("click",function(){
632                 $('#debarments-tab-link').click();
633             });
634          });
635         function uncheck_sibling(me){
636             nodename=me.getAttribute("name");
637             if (nodename =="barcodes[]"){
638                 var Node=me.parentNode.previousSibling;
639                 while (Node.nodeName!="TD"){Node=Node.previousSibling}
640                 var Nodes=Node.childNodes;
641                 for (var i=0;i < Nodes.length;i++){
642                     if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
643                         Nodes[i].checked=false;
644                     }
645                 }
646             } else {
647                 var Node=me.parentNode.nextSibling;
648                 while (Node.nodeName!="TD"){Node=Node.nextSibling}
649                 var Nodes=Node.childNodes;
650                 for (var i=0;i<Nodes.length;i++){
651                     if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
652                       Nodes[i].checked=false;
653                     }
654                }
655             }
656         }
657
658         function validate1(date) {
659             var today = new Date();
660             if ( date < today ) {
661                 return true;
662             } else {
663                 return false;
664             }
665         };
666     </script>
667 [% END %]
668
669 [% INCLUDE 'intranet-bottom.inc' %]