0b6e26c0be1fcea125f5247302244ee3da302c03
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-memberentry.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE Categories %]
5 [% USE Koha %]
6 [% USE Branches %]
7 [% USE KohaDates %]
8 [% USE Math %]
9 [% SET userupdateview = 1 %]
10 [% BLOCK streetnumber %]
11     [% UNLESS hidden.defined('streetnumber') %]
12         <li>
13             [% IF mandatory.defined('streetnumber') %]
14                 <label for="borrower_streetnumber" class="required">Street number:</label>
15             [% ELSE %]
16                 <label for="borrower_streetnumber">Street number:</label>
17             [% END %]
18
19             <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber | html %]" />
20             [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
21         </li>
22     [% END %]
23 [% END %]
24
25 [% INCLUDE 'doc-head-open.inc' %]
26     <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
27 [% INCLUDE 'doc-head-close.inc' %]
28 [% BLOCK cssinclude %][% END %]
29 </head>
30
31 [% IF action == 'edit' %]
32 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
33 [% ELSE %]
34 <body id="opac-patron-registration" class="opac">
35 [% END %]
36 [% INCLUDE 'masthead.inc' %]
37
38 <div class="main">
39     <ul class="breadcrumb">
40         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
41         [% IF action == 'edit' %]
42             <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">&rsaquo;</span></li>
43             <li><a href="#">Your personal details</a></li>
44         [% ELSE %]
45             <li><a href="#">Register a new account</a></li>
46         [% END %]
47     </ul>
48
49     <div class="container-fluid">
50         <div class="row-fluid">
51             <div class="span2">
52                 <div id="navigation">
53                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
54                 </div>
55             </div>
56             <div class="span10">
57                 [% IF action == 'edit' %]
58                     <div id="update-account">
59                 [% ELSE %]
60                     <div id="add-account">
61                 [% END %]
62
63                 [% IF action == 'edit' %]
64                     [% UNLESS OPACPatronDetails %]
65                         <div class="alert alert-info">To make changes to your record please contact the library.</div>
66                     [% END %]
67                     [% IF nochanges %]
68                         <div class="alert alert-error">No changes were made.</div>
69                     [% END %]
70                 [% END %]
71
72                 [% IF empty_mandatory_fields %]
73                     <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
74                 [% END %]
75
76                 [% IF invalid_form_fields %]
77                     <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
78                         <ul>
79                             [% FOREACH field IN invalid_form_fields %]
80                                 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
81                                 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
82                                 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
83                                 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
84                                 [% IF field == "password_too_short" %]
85                                     <li>Password must be at least [% minPasswordLength | html %] characters long.</li>
86                                 [% END %]
87                                 [% IF field == "password_too_weak" %]
88                                     <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
89                                 [% END %]
90                                 [% IF field == "password_has_whitespaces" %]
91                                     <li>Password must not contain leading or trailing whitespaces.</li>
92                                 [% END %]
93                                 [% IF field == "duplicate_email" %]
94                                     <li>This email address already exists in our database.</li>
95                                 [% END %]
96                             [% END %]
97                         </ul>
98                         <span>Please correct and resubmit.</span>
99                     </div>
100                 [% END %]
101
102                 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
103                     <div class="alert alert-error">
104                         [% IF cardnumber_wrong_length %]
105                         <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
106                         [% ELSIF cardnumber_already_exists %]
107                         <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
108                         [% END %]
109                         <span>Please correct and resubmit.</span>
110                     </div>
111                 [% END %]
112
113                 [% IF failed_captcha %]
114                     <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
115                 [% END %]
116
117                 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
118                     <fieldset class="rows" id="memberentry_privacy">
119                         <legend id="privacy_legend">Privacy</legend>
120                         <ol>
121                             <li>
122                                 <label>Allow your guarantor to view your current checkouts?</label>
123                                 <select id="privacy_guarantor_checkouts">
124                                     <option value="0">No</option>
125                                     [% IF borrower.privacy_guarantor_checkouts %]
126                                         <option value="1" selected="selected">Yes</option>
127                                     [% ELSE %]
128                                         <option value="1">Yes</option>
129                                     [% END %]
130                                 </select>
131                                 <span class="hint">
132                                     <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
133                                     <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
134                                 </span>
135                                 <span class="hint">
136                                     Your guarantor is <i>[% guarantor.firstname | html %] [% guarantor.surname | html %]</i>
137                                 </span>
138                             </li>
139                         </ol>
140                     </fieldset>
141                 [% END %]
142                 [% IF ( extended_unique_id_failed_code ) %]
143                     <div class="alert" id="extended_unique_id_failed"><a href="#patron-attr-start-[% extended_unique_id_failed_code | uri %]">[% extended_unique_id_failed_description _ ': ' | html %]</a> Value is already in use ([% extended_unique_id_failed_value | html %])</div>
144                 [% END %]
145
146                 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
147
148                 [%# Following on one line for translatability %]
149                 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
150                     <fieldset class="rows" id="memberentry_library">
151
152                         <legend id="library_legend">Library</legend>
153                             <ol>
154                                 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
155                                 <li>
156                                     [% IF mandatory.defined('cardnumber') %]
157                                         <label for="borrower_cardnumber" class="required">Library card number:</label>
158                                     [% ELSE %]
159                                         <label for="borrower_cardnumber">Library card number:</label>
160                                     [% END %]
161                                     [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
162                                         [% borrower.cardnumber | html %]
163                                     [% ELSE %]
164                                         [% IF minlength_cardnumber == maxlength_cardnumber %]
165                                             <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
166                                             [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
167                                             <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
168                                         [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
169                                             <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
170                                             [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
171                                             <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
172                                         [% ELSIF maxlength_cardnumber %]
173                                             <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
174                                             [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
175                                             <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
176                                         [% ELSE %]
177                                             <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" />
178                                             [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
179                                             <div class="hint">There is no minimum or maximum character length.</div>
180                                         [% END %]
181                                     [% END %]
182                                 </li>
183                                 [% END %]
184
185                                 [% UNLESS hidden.defined('dateexpiry') %]
186                                 <li>
187                                     <label>Expiration date:</label>
188                                     [% borrower.dateexpiry | $KohaDates  %]
189                                 </li>
190                                 [% END %]
191
192                                 [% UNLESS hidden.defined('branchcode') %]
193                                     <li>
194                                         [% IF mandatory.defined('branchcode') %]
195                                             <label for="borrower_branchcode" class="required">Home library:</label>
196                                         [% ELSE %]
197                                             <label for="borrower_branchcode">Home library:</label>
198                                         [% END %]
199
200                                         <select id="borrower_branchcode" name="borrower_branchcode">
201                                             [% FOREACH l IN libraries %]
202                                                 [% IF l.branchcode == borrower.branchcode %]
203                                                     <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
204                                                 [% ELSE %]
205                                                     <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
206                                                 [% END %]
207                                             [% END %]
208                                         </select>
209                                     </li>
210                                 [% END %]
211
212                                 [% UNLESS hidden.defined('categorycode') %]
213                                     <li>
214                                         <label for="borrower_categorycode">
215                                         Category:</label>
216
217                                         [% IF borrower %]
218                                             [% Categories.GetName( borrower.categorycode ) | html %]
219                                             <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
220                                         [% ELSE %]
221                                             <select id="borrower_categorycode" name="borrower_categorycode">
222                                                 [% FOREACH c IN Categories.all() %]
223                                                     [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
224                                                         <option value="[% c.categorycode | html %]" selected="selected">[% c.description | html %]</option>
225                                                     [% ELSE %]
226                                                         <option value="[% c.categorycode | html %]">[% c.description | html %]</option>
227                                                     [% END %]
228                                                 [% END %]
229                                             </select>
230                                         [% END %]
231                                     </li>
232                                 [% END %]
233                             </ol>
234                         </fieldset>
235                 [% END # / defined 'branchcode' %]
236
237                 [%# Following on one line for translatability %]
238                 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
239                     <div class="row-fluid">
240                         [% IF ( display_patron_image ) %]
241                             <div class="span8">
242                         [% ELSE %]
243                             <div class="span12">
244                         [% END %]
245                             <fieldset class="rows" id="memberentry_identity">
246                                 <legend id="identity_legend">Identity</legend>
247
248                                 <ol>
249                                     [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
250                                         <li>
251                                             [% IF mandatory.defined('title') %]
252                                                 <label for="borrower_title" class="required">Salutation:</label>
253                                             [% ELSE %]
254                                                 <label for="borrower_title">Salutation:</label>
255                                             [% END %]
256
257                                             <select id="borrower_title" name="borrower_title">
258                                                 <option value=""></option>
259                                                 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
260                                                     [% IF mt == borrower.title %]
261                                                         <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
262                                                     [% ELSE %]
263                                                         <option value="[% mt | html %]">[% mt | html %]</option>
264                                                     [% END %]
265                                                 [% END %]
266                                             </select>
267                                         </li>
268                                     [% END %]
269
270                                     [% UNLESS hidden.defined('surname') %]
271                                         <li>
272                                             [% IF mandatory.defined('surname') %]
273                                                 <label for="borrower_surname" class="required">Surname:</label>
274                                             [% ELSE %]
275                                                 <label for="borrower_surname">Surname:</label>
276                                             [% END %]
277
278                                             <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
279                                             [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
280                                         </li>
281                                     [% END %]
282
283                                     [% UNLESS hidden.defined('firstname') %]
284                                         <li>
285                                             [% IF mandatory.defined('firstname') %]
286                                                 <label for="borrower_firstname" class="required">First name:</label>
287                                             [% ELSE %]
288                                                 <label for="borrower_firstname">First name:</label>
289                                             [% END %]
290
291                                             <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
292                                             [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
293                                         </li>
294                                     [% END %]
295
296                                     [% UNLESS hidden.defined('dateofbirth') %]
297                                         <li>
298                                             [% IF mandatory.defined('dateofbirth') %]
299                                                 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
300                                             [% ELSE %]
301                                                 <label for="borrower_dateofbirth">Date of birth:</label>
302                                             [% END %]
303
304                                             <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
305
306                                             [% UNLESS action == 'edit' && !OPACPatronDetails %]
307                                                 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
308                                                     <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
309                                                 [% END %]
310                                             [% END %]
311
312                                             [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
313                                         </li>
314                                     [% END %]
315
316                                     [% UNLESS hidden.defined('initials') %]
317                                         <li>
318                                             [% IF mandatory.defined('initials') %]
319                                                 <label for="borrower_initials" class="required">Initials:</label>
320                                             [% ELSE %]
321                                                 <label for="borrower_initials">Initials:</label>
322                                             [% END %]
323
324                                             <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
325                                             [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
326                                         </li>
327                                     [% END %]
328
329                                     [% UNLESS hidden.defined('othernames') %]
330                                         <li>
331                                             [% IF mandatory.defined('othernames') %]
332                                                 <label for="borrower_othernames" class="required">Other names:</label>
333                                             [% ELSE %]
334                                                 <label for="borrower_othernames">Other names:</label>
335                                             [% END %]
336
337                                             <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
338                                             [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
339                                         </li>
340                                     [% END %]
341
342                                     [% UNLESS hidden.defined('sex') %]
343                                         <li class="lradio">
344                                             <label for="sex-female" class="radio inline">Female:</label>
345                                             [% IF borrower.sex == 'F' %]
346                                                 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
347                                             [% ELSE %]
348                                                 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
349                                             [% END %]
350
351                                             <label for="sex-male" class="radio inline">Male:</label>
352                                             [% IF borrower.sex == 'M' %]
353                                                 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
354                                             [% ELSE %]
355                                                 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
356                                             [% END %]
357
358                                             <label for="sex-none" class="radio inline">None specified: </label>
359                                             [% IF borrower.sex == '' %]
360                                                 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
361                                             [% ELSE %]
362                                                 <input type="radio" name="borrower_sex" id="sex-none" value="" />
363                                             [% END %]
364
365                                             [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
366                                         </li>
367                                     [% END %]
368                                 </ol>
369                             </fieldset>
370                            </div>
371                         [% IF ( display_patron_image ) %]
372                             <div class="span4">
373                                 <p class="patronimage">
374                                    <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
375                                 </p>
376                             </div>
377                         [% END %]
378                     </div>
379                 [% END # /UNLESS fields hidden %]
380
381                 [%# Following on one line for translatability %]
382                 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
383                     <fieldset class="rows" id="memberentry_mainaddress">
384                         <legend id="mainaddress_legend">Main address</legend>
385
386                         <ol>
387                             [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
388
389                             [% UNLESS hidden.defined('address') %]
390                                 <li>
391                                     [% IF mandatory.defined('address') %]
392                                         <label for="borrower_address" class="required">Address:</label>
393                                     [% ELSE %]
394                                         <label for="borrower_address">Address:</label>
395                                     [% END %]
396
397                                     <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
398                                     [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
399                                 </li>
400                             [% END %]
401
402                             [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
403
404                             [% UNLESS hidden.defined('address2') %]
405                                 <li>
406                                     [% IF mandatory.defined('address2') %]
407                                         <label for="borrower_address2" class="required">Address 2:</label>
408                                     [% ELSE %]
409                                         <label for="borrower_address2">Address 2:</label>
410                                     [% END %]
411
412                                     <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
413                                     [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
414                                 </li>
415                             [% END %]
416
417                             [% UNLESS hidden.defined('city') %]
418                                 <li>
419                                     [% IF mandatory.defined('city') %]
420                                         <label for="borrower_city" class="required">City:</label>
421                                     [% ELSE %]
422                                         <label for="borrower_city">City:</label>
423                                     [% END %]
424
425                                     <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
426                                     [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
427                                 </li>
428                             [% END %]
429
430                             [% UNLESS hidden.defined('state') %]
431                                 <li>
432                                     [% IF mandatory.defined('state') %]
433                                         <label for="borrower_state" class="required">State:</label>
434                                     [% ELSE %]
435                                         <label for="borrower_state">State:</label>
436                                     [% END %]
437
438                                     <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
439                                     [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
440                                 </li>
441                             [% END %]
442
443                             [% UNLESS hidden.defined('zipcode') %]
444                                 <li>
445                                     [% IF mandatory.defined('zipcode') %]
446                                         <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
447                                     [% ELSE %]
448                                         <label for="borrower_zipcode">ZIP/Postal code:</label>
449                                     [% END %]
450
451                                     <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
452                                     [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
453                                 </li>
454                             [% END %]
455
456                             [% UNLESS hidden.defined('country') %]
457                                 <li>
458                                     [% IF mandatory.defined('country') %]
459                                         <label for="borrower_country" class="required">Country:</label>
460                                     [% ELSE %]
461                                         <label for="borrower_country">Country:</label>
462                                     [% END %]
463
464                                     <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
465                                     [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
466                                 </li>
467                             [% END %]
468
469                         </ol>
470                     </fieldset>
471                 [% END %]
472
473                 [%# Following on one line for translatability %]
474                 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
475                     <fieldset class="rows" id="memberentry_contact">
476                         <legend id="contact_legend">Contact information</legend>
477
478                         <ol>
479                             [% UNLESS hidden.defined('phone') %]
480                                 <li>
481                                     [% IF mandatory.defined('phone') %]
482                                         <label for="borrower_phone" class="required">Primary phone:</label>
483                                     [% ELSE %]
484                                         <label for="borrower_phone">Primary phone:</label>
485                                     [% END %]
486
487                                     <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
488                                     [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
489                                 </li>
490                             [% END %]
491
492                             [% UNLESS hidden.defined('phonepro') %]
493                                 <li>
494                                     [% IF mandatory.defined('phonepro') %]
495                                         <label for="borrower_phonepro" class="required">Secondary phone:</label>
496                                     [% ELSE %]
497                                         <label for="borrower_phonepro">Secondary phone:</label>
498                                     [% END %]
499
500                                     <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
501                                     [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
502                                 </li>
503                             [% END %]
504
505                             [% UNLESS hidden.defined('mobile') %]
506                                 <li>
507                                     [% IF mandatory.defined('mobile') %]
508                                         <label for="borrower_mobile" class="required">Other phone:</label>
509                                     [% ELSE %]
510                                         <label for="borrower_mobile">Other phone:</label>
511                                     [% END %]
512
513                                     <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
514                                     [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
515                                 </li>
516                             [% END %]
517
518                             [% UNLESS hidden.defined('email') %]
519                                 <li>
520                                     [% IF mandatory.defined('email') %]
521                                         <label for="borrower_email" class="required">Primary email:</label>
522                                     [% ELSE %]
523                                         <label for="borrower_email">Primary email:</label>
524                                     [% END %]
525
526                                     <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
527                                     [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
528                                 </li>
529                             [% END %]
530
531                             [% UNLESS hidden.defined('emailpro') %]
532                                 <li>
533                                     [% IF mandatory.defined('emailpro') %]
534                                         <label for="borrower_emailpro" class="required">Secondary email:</label>
535                                     [% ELSE %]
536                                         <label for="borrower_emailpro">Secondary email:</label>
537                                     [% END %]
538
539                                     <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
540                                     [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
541                                 </li>
542                             [% END %]
543
544                             [% UNLESS hidden.defined('fax') %]
545                                 <li>
546                                     [% IF mandatory.defined('fax') %]
547                                         <label for="borrower_fax" class="required">Fax:</label>
548                                     [% ELSE %]
549                                         <label for="borrower_fax">Fax:</label>
550                                     [% END %]
551
552                                     <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
553                                     [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
554                                 </li>
555                             [% END %]
556                         </ol>
557                     </fieldset>
558                 [% END %]
559
560                 [%# Following on one line for translatability %]
561                 [% UNLESS hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') && hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') && hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote') %]
562                     <fieldset class="rows" id="memberentry_alternateaddress">
563                         <legend id="alternateaddress_legend">Alternate address</legend>
564
565                         <ol>
566                             [% UNLESS hidden.defined('B_address') %]
567                                 <li>
568                                     [% IF mandatory.defined('B_address') %]
569                                         <label for="borrower_B_address" class="required">Address:</label>
570                                     [% ELSE %]
571                                         <label for="borrower_B_address">Address:</label>
572                                     [% END %]
573
574                                     <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
575                                     [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
576                                 </li>
577                             [% END %]
578
579                             [% UNLESS hidden.defined('B_address2') %]
580                                 <li>
581                                     [% IF mandatory.defined('B_address2') %]
582                                         <label for="borrower_B_address2" class="required">Address 2:</label>
583                                     [% ELSE %]
584                                         <label for="borrower_B_address2">Address 2:</label>
585                                     [% END %]
586
587                                     <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
588                                     [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
589                                 </li>
590                             [% END %]
591
592                             [% UNLESS hidden.defined('B_city') %]
593                                 <li>
594                                     [% IF mandatory.defined('B_city') %]
595                                         <label for="borrower_B_city" class="required">City:</label>
596                                     [% ELSE %]
597                                         <label for="borrower_B_city">City:</label>
598                                     [% END %]
599
600                                     <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
601                                     [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
602                                 </li>
603                             [% END %]
604
605                             [% UNLESS hidden.defined('B_state') %]
606                                 <li>
607                                     [% IF mandatory.defined('B_state') %]
608                                         <label for="borrower_B_state" class="required">State:</label>
609                                     [% ELSE %]
610                                         <label for="borrower_B_state">State:</label>
611                                     [% END %]
612
613                                     <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
614                                     [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
615                                 </li>
616                             [% END %]
617
618                             [% UNLESS hidden.defined('B_zipcode') %]
619                                 <li>
620                                     [% IF mandatory.defined('B_zipcode') %]
621                                         <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
622                                     [% ELSE %]
623                                         <label for="borrower_B_zipcode">ZIP/Postal code:</label>
624                                     [% END %]
625
626                                     <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
627                                     [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
628                                 </li>
629                             [% END %]
630
631                             [% UNLESS hidden.defined('B_country') %]
632                                 <li>
633                                     [% IF mandatory.defined('B_country') %]
634                                         <label for="borrower_B_country" class="required">Country:</label>
635                                     [% ELSE %]
636                                         <label for="borrower_B_country">Country:</label>
637                                     [% END %]
638
639                                     <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
640                                     [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
641                                 </li>
642                             [% END %]
643
644                             [% UNLESS hidden.defined('B_phone') %]
645                                 <li>
646                                     [% IF mandatory.defined('B_phone') %]
647                                         <label for="borrower_B_phone" class="required">Phone:</label>
648                                     [% ELSE %]
649                                         <label for="borrower_B_phone">Phone:</label>
650                                     [% END %]
651
652                                     <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
653                                     [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
654                                 </li>
655                             [% END %]
656
657                             [% UNLESS hidden.defined('B_email') %]
658                                 <li>
659                                     [% IF mandatory.defined('B_email') %]
660                                         <label for="borrower_B_email" class="required">Email:</label>
661                                     [% ELSE %]
662                                         <label for="borrower_B_email">Email:</label>
663                                     [% END %]
664
665                                     <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
666                                     [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
667                                 </li>
668                             [% END %]
669
670                             [% UNLESS hidden.defined('contactnote') %]
671                                 <li>
672                                     [% IF mandatory.defined('contactnote') %]
673                                         <label for="borrower_contactnote" class="required">Contact note:</label>
674                                     [% ELSE %]
675                                         <label for="borrower_contactnote">Contact note:</label>
676                                     [% END %]
677
678                                     <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
679                                     [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
680                                 </li>
681                             [% END %]
682
683                         </ol>
684                     </fieldset>
685                 [% END %]
686
687                 [%# Following on one line for translatability %]
688                 [% UNLESS hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') && hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') && hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone') %]
689                     <fieldset class="rows" id="memberentry_alternatecontact">
690                         <legend id="alternatecontact_legend">Alternate contact</legend>
691
692                         <ol>
693                             [% UNLESS hidden.defined('altcontactsurname') %]
694                                 <li>
695                                     [% IF mandatory.defined('altcontactsurname') %]
696                                         <label for="borrower_altcontactsurname" class="required">Surname:</label>
697                                     [% ELSE %]
698                                         <label for="borrower_altcontactsurname">Surname:</label>
699                                     [% END %]
700
701                                     <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
702                                     [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
703                                 </li>
704                             [% END %]
705
706                             [% UNLESS hidden.defined('altcontactfirstname') %]
707                                 <li>
708                                     [% IF mandatory.defined('altcontactfirstname') %]
709                                         <label for="borrower_altcontactfirstname" class="required">First name:</label>
710                                     [% ELSE %]
711                                         <label for="borrower_altcontactfirstname">First name:</label>
712                                     [% END %]
713
714                                     <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
715                                     [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
716                                 </li>
717                             [% END %]
718
719                             [% UNLESS hidden.defined('altcontactaddress1') %]
720                                 <li>
721                                     [% IF mandatory.defined('altcontactaddress1') %]
722                                         <label for="borrower_altcontactaddress1" class="required">Address:</label>
723                                     [% ELSE %]
724                                         <label for="borrower_altcontactaddress1">Address:</label>
725                                     [% END %]
726
727                                     <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
728                                     [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
729                                 </li>
730                             [% END %]
731
732                             [% UNLESS hidden.defined('altcontactaddress2') %]
733                                 <li>
734                                     [% IF mandatory.defined('altcontactaddress2') %]
735                                         <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
736                                     [% ELSE %]
737                                         <label for="borrower_altcontactaddress2">Address 2:</label>
738                                     [% END %]
739
740                                     <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
741                                     [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
742                                 </li>
743                             [% END %]
744
745                             [% UNLESS hidden.defined('altcontactaddress3') %]
746                                 <li>
747                                     [% IF mandatory.defined('altcontactaddress3') %]
748                                         <label for="borrower_altcontactaddress3" class="required">City:</label>
749                                     [% ELSE %]
750                                         <label for="borrower_altcontactaddress3">City:</label>
751                                     [% END %]
752
753                                     <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
754                                     [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
755                                 </li>
756                             [% END %]
757
758                             [% UNLESS hidden.defined('altcontactstate') %]
759                                 <li>
760                                     [% IF mandatory.defined('altcontactstate') %]
761                                         <label for="borrower_altcontactstate" class="required">State:</label>
762                                     [% ELSE %]
763                                         <label for="borrower_altcontactstate">State:</label>
764                                     [% END %]
765
766                                     <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
767                                     [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
768                                 </li>
769                             [% END %]
770
771                             [% UNLESS hidden.defined('altcontactzipcode') %]
772                                 <li>
773                                     [% IF mandatory.defined('altcontactzipcode') %]
774                                         <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
775                                     [% ELSE %]
776                                         <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
777                                     [% END %]
778
779                                     <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
780                                     [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
781                                 </li>
782                             [% END %]
783
784                             [% UNLESS hidden.defined('altcontactcountry') %]
785                                 <li>
786                                     [% IF mandatory.defined('altcontactcountry') %]
787                                         <label for="borrower_altcontactcountry" class="required">Country:</label>
788                                     [% ELSE %]
789                                         <label for="borrower_altcontactcountry">Country:</label>
790                                     [% END %]
791
792                                     <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
793                                     [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
794                                 </li>
795                             [% END %]
796
797                             [% UNLESS hidden.defined('altcontactphone') %]
798                                 <li>
799                                     [% IF mandatory.defined('altcontactphone') %]
800                                         <label for="borrower_altcontactphone" class="required">Phone:</label>
801                                     [% ELSE %]
802                                         <label for="borrower_altcontactphone">Phone:</label>
803                                     [% END %]
804
805                                     <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
806                                     [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
807                                 </li>
808                             [% END %]
809                         </ol>
810                     </fieldset>
811                 [% END %]
812
813                 [% UNLESS action == 'edit' || hidden.defined('password') %]
814                     <fieldset class="rows" id="memberentry_password">
815                         <legend id="contact_legend">Password</legend>
816                         <div class="alert alert-info">
817                             [% IF ( Koha.Preference('RequireStrongPassword') ) %]
818                                 <p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p>
819                             [% ELSE %]
820                                 <p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p>
821                             [% END %]
822                             [% UNLESS mandatory.defined('password') %]
823                                 <p>If you do not enter a password a system generated password will be created.</p>
824                             [% END %]
825                         </div>
826
827                         [% IF mandatory.defined('password') %]
828                             <ol>
829                                 <li><label for="borrower_password" class="required">Password</label>
830                                     <input type="password" name="borrower_password" id="password" />
831                                     <span class="required">Required</span>
832                                 </li>
833                                 <li><label for="borrower_password2" class="required">Confirm password</label>
834                                     <input type="password" name="borrower_password2" id="password2" />
835                                     <span class="required">Required</span>
836                                 </li>
837                             </ol>
838                         [% ELSE %]
839                             <ol>
840                                 <li><label for="borrower_password">Password</label>
841                                     <input type="password" name="borrower_password" id="password" />
842                                 </li>
843                                 <li><label for="borrower_password2">Confirm password</label>
844                                     <input type="password" name="borrower_password2" id="password2" />
845                                 </li>
846                             </ol>
847                         [% END %]
848                     </fieldset>
849                [% END %]
850
851                 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
852                     [% FOREACH pa_class IN patron_attribute_classes %]
853                         [% IF pa_class.class %]
854                             <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
855                             <legend>[% pa_class.lib | html %]</legend>
856                         [% ELSE %]
857                             <fieldset class="rows patron-attributes">
858                             <legend>Additional information</legend>
859                         [% END %]
860                         <ol class="attributes_table">
861                             [% FOREACH pa IN pa_class.items %]
862                                 [% FOREACH pa_value IN pa.values %]
863                                     [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
864                                     [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
865                                     <li data-category_code="[% pa.type.category_code | html %]">
866                                         <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
867                                         [% IF pa.type.opac_editable %]
868                                             <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
869                                             [% IF ( pa.type.authorised_value_category ) %]
870                                                 <select id="[% form_id | html %]" name="patron_attribute_value">
871                                                     <option value=""></option>
872                                                     [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
873                                                         [% IF ( auth_val.authorised_value == pa_value ) %]
874                                                             <option value="[% auth_val.authorised_value | html %]" selected="selected">
875                                                                 [% auth_val.lib | html %]
876                                                             </option>
877                                                         [% ELSE %]
878                                                             <option value="[% auth_val.authorised_value | html %]" >
879                                                                 [% auth_val.lib | html %]
880                                                             </option>
881                                                         [% END %]
882                                                     [% END %]
883                                                 </select>
884                                             [% ELSE %]
885                                                 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
886                                             [% END %]
887                                             <a href="#" class="clear-attribute">Clear</a>
888                                             [% IF ( pa.type.repeatable ) %]
889                                             <a href="#" class="clone-attribute">New</a>
890                                             [% END %]
891                                         [% ELSE %]
892                                             [% IF ( pa.type.authorised_value_category ) %]
893                                                 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
894                                             [% ELSE %]
895                                                 [% pa_value | html_line_break %]
896                                             [% END %]
897                                         [% END %]
898                                     </li>
899                                 [% END %]
900                             [% END %]
901                         </ol>
902                         </fieldset>
903                     [% END %]
904                 [% END %]
905
906                 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
907                     <fieldset class="rows" id="memberentry_gdpr_consent">
908                         <legend>GDPR consent</legend>
909                         <ol>
910                         <li>
911                             <label></label><span><input type="checkbox" name="borrower_gdpr_proc_consent" value="agreed"> I agree with your processing of my personal data as outlined in the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>. <span class="required">Required</span></span>
912                         </li>
913                         </ol>
914                     </fieldset>
915                [% END %]
916
917                [% UNLESS action == 'edit' %]
918                     <fieldset class="rows" id="memberentry_captcha">
919                         <legend>Verification</legend>
920                         <ol>
921
922                             <li>
923                                 <label for="captcha" class="required">Verification:</label>
924
925                                 <input type="text" name="captcha" id="captcha" />
926                                 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
927
928                                 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
929                             </li>
930                         </ol>
931                     </fieldset>
932                 [% END %]
933
934                 [% IF action == 'edit' %]
935                     [% IF OPACPatronDetails %]
936                         <fieldset class="action">
937                             <input type="hidden" name="action" value="update" />
938                             <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
939                             <input type="submit" class="btn" value="Submit update request" />
940                         </fieldset>
941                     [% END %]
942                 [% ELSE %]
943                     <fieldset class="action">
944                         <input type="hidden" name="action" value="create" />
945                         <input type="submit" class="btn" value="Submit" />
946                     </fieldset>
947                 [% END %]
948
949                 </form>
950
951                     </div><!--/div id="update-account" -->
952                 </div>
953             </div>
954         </div>
955     </div>
956
957 [% INCLUDE 'opac-bottom.inc' %]
958 [% BLOCK jsinclude %]
959     [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
960     [% PROCESS 'password_check.inc' %]
961     [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
962     <script>
963         //<![CDATA[
964         $(document).ready(function() {
965             [% IF action == 'edit' && !OPACPatronDetails %]
966                 $("#memberentry-form :input").attr('readonly', true);
967                 $("#borrower_branchcode").attr('disabled',true);
968                 $("#borrower_title").attr('disabled',true);
969                 $('#memberentry-form :radio').attr('disabled',true);
970                 $('span.required').remove();
971                 $('label.required').removeClass('required');
972             [% END %]
973
974             $("#memberentry-form").validate({
975                 rules: {
976                     borrower_email: {
977                         email: true
978                     },
979                     borrower_emailpro: {
980                         email: true
981                     },
982                     borrower_B_email: {
983                         email: true
984                     },
985                     borrower_password: {
986                         [% IF mandatory.defined('password') %]
987                         required: true,
988                         [% END %]
989                         password_strong: true,
990                         password_no_spaces: true
991                     },
992                     borrower_password2: {
993                         [% IF mandatory.defined('password') %]
994                         required: true,
995                         [% END %]
996                         password_match: true
997                     },
998                     captcha: {
999                         required: true,
1000                     }
1001                 },
1002                 submitHandler: function(form) {
1003                     if (form.beenSubmitted) {
1004                         return false;
1005                     }
1006                     else {
1007                         form.beenSubmitted = true;
1008                         form.submit();
1009                     }
1010                 },
1011                 errorPlacement: function(error, element) {
1012                     offset = element.offset();
1013                     error.insertAfter(element)
1014                     error.addClass('error');  // add a class to the wrapper
1015                     error.css('position', 'absolute');
1016                     error.css('left', offset.left + element.outerWidth() + 10);
1017                     error.css('top', offset.top);
1018                     error.css('width', 'auto');
1019                 }
1020             });
1021
1022             [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1023                 $('#update_privacy_guarantor_checkouts').click( function() {
1024                     $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
1025                      .done(function( data ) {
1026                          var message;
1027                          if ( data.success ) {
1028                              message = _("Your setting has been updated!");
1029                          } else {
1030                              message = _("Unable to update your setting!");
1031                          }
1032
1033                          $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
1034                      });
1035                 });
1036             [% END %]
1037
1038             $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1039                 $(this).parent()
1040                     .find('textarea').attr('value', '').end()
1041                     .find('select').attr('value', '').end();
1042
1043                 return false;
1044             } );
1045
1046             $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1047                 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1048
1049                 var newId = 50 + parseInt(Math.random() * 100000);
1050                 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1051                 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1052
1053                 return false;
1054             } );
1055         });
1056
1057     $(".cleardate").on("click", function(){
1058         $('#borrower_dateofbirth').val('');
1059         return false;
1060     });
1061     //]]>
1062     </script>
1063 [% INCLUDE 'calendar.inc' %]
1064 [% END %]