Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-memberentry.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% SET userupdateview = 1 %]
4
5 [% INCLUDE 'doc-head-open.inc' %]
6     [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
9 </head>
10
11 [% IF action == 'edit' %]
12 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
13 [% ELSE %]
14 <body id="opac-patron-registration">
15 [% END %]
16 [% INCLUDE 'masthead.inc' %]
17
18 <div class="main">
19     <ul class="breadcrumb">
20         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
21         [% IF action == 'edit' %]
22             <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">&rsaquo;</span></li>
23             <li><a href="#">Your personal details</a></li>
24         [% ELSE %]
25             <li><a href="#">Register a new account</a></li>
26         [% END %]
27     </ul>
28
29     <div class="container-fluid">
30         <div class="row-fluid">
31             <div class="span2">
32                 <div id="navigation">
33                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
34                 </div>
35             </div>
36             <div class="span10">
37                 [% IF action == 'edit' %]
38                     <div id="update-account">
39                 [% ELSE %]
40                     <div id="add-account">
41                 [% END %]
42
43                 [% IF action == 'edit' %]
44                     [% UNLESS OPACPatronDetails %]
45                         <div class="alert alert-info">To make changes to your record please contact the library.</div>
46                     [% END %]
47                 [% END %]
48
49                 [% IF empty_mandatory_fields %]
50                     <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
51                 [% END %]
52
53                 [% IF failed_captcha %]
54                     <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
55                 [% END %]
56
57                 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
58
59                 [% UNLESS hidden.defined('branchcode') %]
60                     <fieldset class="rows" id="memberentry_library">
61
62                         <legend id="library_legend">Library</legend>
63                             <ol>
64                                 <li>
65                                     <label>Card number</label>
66                                     <input type="text" value="[% borrower.cardnumber %]" disabled="disabled"/>
67                                 </li>
68
69                                 [% UNLESS hidden.defined('branchcode') %]
70                                     <li>
71                                         [% IF mandatory.defined('branchcode') %]
72                                             <label for="borrower_branchcode" class="required">
73                                         [% ELSE %]
74                                             <label for="borrower_branchcode">
75                                         [% END %]
76                                         Home library:</label>
77
78                                         <select id="borrower_branchcode" name="borrower_branchcode">
79                                             [% FOREACH b IN branches %]
80                                                 [% IF b.value == borrower.branchcode %]
81                                                     <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
82                                                 [% ELSE %]
83                                                     <option value="[% b.value %]">[% b.branchname %]</option>
84                                                 [% END %]
85                                             [% END %]
86                                         </select>
87                                     </li>
88                                 [% END %]
89                             </ol>
90                         </fieldset>
91                 [% END # / defined 'branchcode' %]
92
93                 [% UNLESS
94                     hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
95                     hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
96                     hidden.defined('sex')
97                 %]
98                     <div class="row-fluid">
99                         [% IF ( display_patron_image ) %]
100                             <div class="span8">
101                         [% ELSE %]
102                             <div class="span12">
103                         [% END %]
104                             <fieldset class="rows" id="memberentry_identity">
105                                 <legend id="identity_legend">Identity</legend>
106
107                                 <ol>
108                                     [% UNLESS hidden.defined('title') || !member_titles %]
109                                         <li>
110                                             [% IF mandatory.defined('title') %]
111                                                 <label for="borrower_title" class="required">
112                                             [% ELSE %]
113                                                 <label for="borrower_title">
114                                             [% END %]
115                                             Salutation:</label>
116
117                                             <select id="borrower_title" name="borrower_title">
118                                                 [% FOREACH mt IN member_titles %]
119                                                     [% IF mt == borrower.title %]
120                                                         <option value="[% mt %]" selected="selected">[% mt %]</option>
121                                                     [% ELSE %]
122                                                         <option value="[% mt %]">[% mt %]</option>
123                                                     [% END %]
124                                                 [% END %]
125                                             </select>
126                                         </li>
127                                     [% END %]
128
129                                     [% UNLESS hidden.defined('surname') %]
130                                         <li>
131                                             [% IF mandatory.defined('surname') %]
132                                                 <label for="borrower_surname" class="required">
133                                             [% ELSE %]
134                                                 <label for="borrower_surname">
135                                             [% END %]
136                                             Surname:</label>
137
138                                             <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
139                                             [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
140                                         </li>
141                                     [% END %]
142
143                                     [% UNLESS hidden.defined('firstname') %]
144                                         <li>
145                                             [% IF mandatory.defined('firstname') %]
146                                                 <label for="borrower_firstname" class="required">
147                                             [% ELSE %]
148                                                 <label for="borrower_firstname">
149                                             [% END %]
150                                             First name:</label>
151
152                                             <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
153                                             [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
154                                         </li>
155                                     [% END %]
156
157                                     [% UNLESS hidden.defined('dateofbirth') %]
158                                         <li>
159                                             [% IF mandatory.defined('dateofbirth') %]
160                                                 <label for="borrower_dateofbirth" class="required">
161                                             [% ELSE %]
162                                                 <label for="borrower_dateofbirth">
163                                             [% END %]
164                                             Date of birth:</label>
165
166                                             <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
167
168                                             [% UNLESS action == 'edit' && !OPACPatronDetails %]
169                                                 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
170                                                     <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a>
171                                                 [% END %]
172                                             [% END %]
173
174                                             [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
175                                         </li>
176                                     [% END %]
177
178                                     [% UNLESS hidden.defined('initials') %]
179                                         <li>
180                                             [% IF mandatory.defined('initials') %]
181                                                 <label for="borrower_initials" class="required">
182                                             [% ELSE %]
183                                                 <label for="borrower_initials">
184                                             [% END %]
185                                             Initials:</label>
186
187                                             <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
188                                             [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
189                                         </li>
190                                     [% END %]
191
192                                     [% UNLESS hidden.defined('othernames') %]
193                                         <li>
194                                             [% IF mandatory.defined('othernames') %]
195                                                 <label for="borrower_othernames" class="required">
196                                             [% ELSE %]
197                                                 <label for="borrower_othernames">
198                                             [% END %]
199                                             Other names:</label>
200
201                                             <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
202                                             [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
203                                         </li>
204                                     [% END %]
205
206                                     [% UNLESS hidden.defined('sex') %]
207                                         <li class="lradio">
208                                             <label for="sex-female" class="radio inline">Female:</label>
209                                             [% IF borrower.sex == 'F' %]
210                                                 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
211                                             [% ELSE %]
212                                                 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
213                                             [% END %]
214
215                                             <label for="sex-male" class="radio inline">Male:</label>
216                                             [% IF borrower.sex == 'M' %]
217                                                 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
218                                             [% ELSE %]
219                                                 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
220                                             [% END %]
221
222                                             <label for="sex-none" class="radio inline">N/A:</label>
223                                             [% IF borrower.sex == '' %]
224                                                 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
225                                             [% ELSE %]
226                                                 <input type="radio" name="borrower_sex" id="sex-none" value="" />
227                                             [% END %]
228
229                                             [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
230                                         </li>
231                                     [% END %]
232                                 </ol>
233                             </fieldset>
234                            </div>
235                         [% IF ( display_patron_image ) %]
236                             <div class="span4">
237                                 <p class="patronimage">
238                                    <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
239                                 </p>
240                             </div>
241                         [% END %]
242                     </div>
243                 [% END # /UNLESS fields hidden %]
244
245                 [% UNLESS
246                     hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
247                     hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
248                     hidden.defined('country')
249                 %]
250                     <fieldset class="rows" id="memberentry_mainaddress">
251                         <legend id="mainaddress_legend">Main address</legend>
252
253                         <ol>
254                             [% UNLESS hidden.defined('streetnumber') %]
255                                 <li>
256                                     [% IF mandatory.defined('streetnumber') %]
257                                         <label for="borrower_streetnumber" class="required">
258                                     [% ELSE %]
259                                         <label for="borrower_streetnumber">
260                                     [% END %]
261                                     Street number:</label>
262
263                                     <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
264                                     [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
265                                 </li>
266                             [% END %]
267
268                             [% UNLESS hidden.defined('address') %]
269                                 <li>
270                                     [% IF mandatory.defined('address') %]
271                                         <label for="borrower_address" class="required">
272                                     [% ELSE %]
273                                         <label for="borrower_address">
274                                     [% END %]
275                                     Address:</label>
276
277                                     <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
278                                     [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
279                                 </li>
280                             [% END %]
281
282                             [% UNLESS hidden.defined('address2') %]
283                                 <li>
284                                     [% IF mandatory.defined('address2') %]
285                                         <label for="borrower_address2" class="required">
286                                     [% ELSE %]
287                                         <label for="borrower_address2">
288                                     [% END %]
289                                     Address 2:</label>
290
291                                     <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
292                                     [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
293                                 </li>
294                             [% END %]
295
296                             [% UNLESS hidden.defined('city') %]
297                                 <li>
298                                     [% IF mandatory.defined('city') %]
299                                         <label for="borrower_city" class="required">
300                                     [% ELSE %]
301                                         <label for="borrower_city">
302                                     [% END %]
303                                     City:</label>
304
305                                     <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
306                                     [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
307                                 </li>
308                             [% END %]
309
310                             [% UNLESS hidden.defined('state') %]
311                                 <li>
312                                     [% IF mandatory.defined('state') %]
313                                         <label for="borrower_state" class="required">
314                                     [% ELSE %]
315                                         <label for="borrower_state">
316                                     [% END %]
317                                     State:</label>
318
319                                     <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
320                                     [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
321                                 </li>
322                             [% END %]
323
324                             [% UNLESS hidden.defined('zipcode') %]
325                                 <li>
326                                     [% IF mandatory.defined('zipcode') %]
327                                         <label for="borrower_zipcode" class="required">
328                                     [% ELSE %]
329                                         <label for="borrower_zipcode">
330                                     [% END %]
331                                     Zip/Postal code:</label>
332
333                                     <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
334                                     [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
335                                 </li>
336                             [% END %]
337
338                             [% UNLESS hidden.defined('country') %]
339                                 <li>
340                                     [% IF mandatory.defined('country') %]
341                                         <label for="borrower_country" class="required">
342                                     [% ELSE %]
343                                         <label for="borrower_country">
344                                     [% END %]
345                                     Country:</label>
346
347                                     <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
348                                     [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
349                                 </li>
350                             [% END %]
351
352                         </ol>
353                     </fieldset>
354                 [% END %]
355
356                 [% UNLESS
357                     hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
358                     hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
359                 %]
360                     <fieldset class="rows" id="memberentry_contact">
361                         <legend id="contact_legend">Contact information</legend>
362
363                         <ol>
364                             [% UNLESS hidden.defined('phone') %]
365                                 <li>
366                                     [% IF mandatory.defined('phone') %]
367                                         <label for="borrower_phone" class="required">
368                                     [% ELSE %]
369                                         <label for="borrower_phone">
370                                     [% END %]
371                                     Primary phone:</label>
372
373                                     <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
374                                     [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
375                                 </li>
376                             [% END %]
377
378                             [% UNLESS hidden.defined('phonepro') %]
379                                 <li>
380                                     [% IF mandatory.defined('phonepro') %]
381                                         <label for="borrower_phonepro" class="required">
382                                     [% ELSE %]
383                                         <label for="borrower_phonepro">
384                                     [% END %]
385                                     Secondary phone:</label>
386
387                                     <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
388                                     [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
389                                 </li>
390                             [% END %]
391
392                             [% UNLESS hidden.defined('mobile') %]
393                                 <li>
394                                     [% IF mandatory.defined('mobile') %]
395                                         <label for="borrower_mobile" class="required">
396                                     [% ELSE %]
397                                         <label for="borrower_mobile">
398                                     [% END %]
399                                     Mobile phone:</label>
400
401                                     <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
402                                     [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
403                                 </li>
404                             [% END %]
405
406                             [% UNLESS hidden.defined('email') %]
407                                 <li>
408                                     [% IF mandatory.defined('email') %]
409                                         <label for="borrower_email" class="required">
410                                     [% ELSE %]
411                                         <label for="borrower_email">
412                                     [% END %]
413                                     Primary email:</label>
414
415                                     <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
416                                     [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
417                                 </li>
418                             [% END %]
419
420                             [% UNLESS hidden.defined('emailpro') %]
421                                 <li>
422                                     [% IF mandatory.defined('emailpro') %]
423                                         <label for="borrower_emailpro" class="required">
424                                     [% ELSE %]
425                                         <label for="borrower_emailpro">
426                                     [% END %]
427                                     Secondary email:</label>
428
429                                     <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
430                                     [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
431                                 </li>
432                             [% END %]
433
434                             [% UNLESS hidden.defined('fax') %]
435                                 <li>
436                                     [% IF mandatory.defined('fax') %]
437                                         <label for="borrower_fax" class="required">
438                                     [% ELSE %]
439                                         <label for="borrower_fax">
440                                     [% END %]
441                                     Fax:</label>
442
443                                     <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
444                                     [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
445                                 </li>
446                             [% END %]
447                         </ol>
448                     </fieldset>
449                 [% END %]
450
451                 [% UNLESS
452                     hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
453                     hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') &&
454                     hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
455                 %]
456                     <fieldset class="rows" id="memberentry_alternateaddress">
457                         <legend id="alternateaddress_legend">Alternate address</legend>
458
459                         <ol>
460                             [% UNLESS hidden.defined('B_address') %]
461                                 <li>
462                                     [% IF mandatory.defined('B_address') %]
463                                         <label for="borrower_B_address" class="required">
464                                     [% ELSE %]
465                                         <label for="borrower_B_address">
466                                     [% END %]
467                                     Address:</label>
468
469                                     <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
470                                     [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
471                                 </li>
472                             [% END %]
473
474                             [% UNLESS hidden.defined('B_address2') %]
475                                 <li>
476                                     [% IF mandatory.defined('B_address2') %]
477                                         <label for="borrower_B_address2" class="required">
478                                     [% ELSE %]
479                                         <label for="borrower_B_address2">
480                                     [% END %]
481                                     Address 2:</label>
482
483                                     <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
484                                     [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
485                                 </li>
486                             [% END %]
487
488                             [% UNLESS hidden.defined('B_city') %]
489                                 <li>
490                                     [% IF mandatory.defined('B_city') %]
491                                         <label for="borrower_B_city" class="required">
492                                     [% ELSE %]
493                                         <label for="borrower_B_city">
494                                     [% END %]
495                                     City:</label>
496
497                                     <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
498                                     [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
499                                 </li>
500                             [% END %]
501
502                             [% UNLESS hidden.defined('B_state') %]
503                                 <li>
504                                     [% IF mandatory.defined('B_state') %]
505                                         <label for="borrower_B_state" class="required">
506                                     [% ELSE %]
507                                         <label for="borrower_B_state">
508                                     [% END %]
509                                     State:</label>
510
511                                     <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
512                                     [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
513                                 </li>
514                             [% END %]
515
516                             [% UNLESS hidden.defined('B_zipcode') %]
517                                 <li>
518                                     [% IF mandatory.defined('B_zipcode') %]
519                                         <label for="borrower_B_zipcode" class="required">
520                                     [% ELSE %]
521                                         <label for="borrower_B_zipcode">
522                                     [% END %]
523                                     Zip/Postal code:</label>
524
525                                     <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
526                                     [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
527                                 </li>
528                             [% END %]
529
530                             [% UNLESS hidden.defined('B_country') %]
531                                 <li>
532                                     [% IF mandatory.defined('B_country') %]
533                                         <label for="borrower_B_country" class="required">
534                                     [% ELSE %]
535                                         <label for="borrower_B_country">
536                                     [% END %]
537                                     Country:</label>
538
539                                     <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
540                                     [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
541                                 </li>
542                             [% END %]
543
544                             [% UNLESS hidden.defined('B_phone') %]
545                                 <li>
546                                     [% IF mandatory.defined('B_phone') %]
547                                         <label for="borrower_B_phone" class="required">
548                                     [% ELSE %]
549                                         <label for="borrower_B_phone">
550                                     [% END %]
551                                     Phone:</label>
552
553                                     <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
554                                     [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
555                                 </li>
556                             [% END %]
557
558                             [% UNLESS hidden.defined('B_email') %]
559                                 <li>
560                                     [% IF mandatory.defined('B_email') %]
561                                         <label for="borrower_B_email" class="required">
562                                     [% ELSE %]
563                                         <label for="borrower_B_email">
564                                     [% END %]
565                                     Email:</label>
566
567                                     <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
568                                     [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
569                                 </li>
570                             [% END %]
571
572                             [% UNLESS hidden.defined('contactnote') %]
573                                 <li>
574                                     [% IF mandatory.defined('contactnote') %]
575                                         <label for="borrower_contactnote" class="required">
576                                     [% ELSE %]
577                                         <label for="borrower_contactnote">
578                                     [% END %]
579                                     Contact note:</label>
580
581                                     <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
582                                     [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
583                                 </li>
584                             [% END %]
585
586                         </ol>
587                     </fieldset>
588                 [% END %]
589
590                 [% UNLESS
591                     hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
592                     hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
593                     hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
594                 %]
595                     <fieldset class="rows" id="memberentry_alternatecontact">
596                         <legend id="alternatecontact_legend">Alternate contact</legend>
597
598                         <ol>
599                             [% UNLESS hidden.defined('altcontactsurname') %]
600                                 <li>
601                                     [% IF mandatory.defined('altcontactsurname') %]
602                                         <label for="borrower_altcontactsurname" class="required">
603                                     [% ELSE %]
604                                         <label for="borrower_altcontactsurname">
605                                     [% END %]
606                                     Surname:</label>
607
608                                     <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
609                                     [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
610                                 </li>
611                             [% END %]
612
613                             [% UNLESS hidden.defined('altcontactfirstname') %]
614                                 <li>
615                                     [% IF mandatory.defined('altcontactfirstname') %]
616                                         <label for="borrower_altcontactfirstname" class="required">
617                                     [% ELSE %]
618                                         <label for="borrower_altcontactfirstname">
619                                     [% END %]
620                                     First name:</label>
621
622                                     <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
623                                     [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
624                                 </li>
625                             [% END %]
626
627                             [% UNLESS hidden.defined('altcontactaddress1') %]
628                                 <li>
629                                     [% IF mandatory.defined('altcontactaddress1') %]
630                                         <label for="borrower_altcontactaddress1" class="required">
631                                     [% ELSE %]
632                                         <label for="borrower_altcontactaddress1">
633                                     [% END %]
634                                     Address:</label>
635
636                                     <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
637                                     [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
638                                 </li>
639                             [% END %]
640
641                             [% UNLESS hidden.defined('altcontactaddress2') %]
642                                 <li>
643                                     [% IF mandatory.defined('altcontactaddress2') %]
644                                         <label for="borrower_altcontactaddress2" class="required">
645                                     [% ELSE %]
646                                         <label for="borrower_altcontactaddress2">
647                                     [% END %]
648                                     Address 2:</label>
649
650                                     <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
651                                     [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
652                                 </li>
653                             [% END %]
654
655                             [% UNLESS hidden.defined('altcontactaddress3') %]
656                                 <li>
657                                     [% IF mandatory.defined('altcontactaddress3') %]
658                                         <label for="borrower_altcontactaddress3" class="required">
659                                     [% ELSE %]
660                                         <label for="borrower_altcontactaddress3">
661                                     [% END %]
662                                     City:</label>
663
664                                     <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
665                                     [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
666                                 </li>
667                             [% END %]
668
669                             [% UNLESS hidden.defined('altcontactstate') %]
670                                 <li>
671                                     [% IF mandatory.defined('altcontactstate') %]
672                                         <label for="borrower_altcontactstate" class="required">
673                                     [% ELSE %]
674                                         <label for="borrower_altcontactstate">
675                                     [% END %]
676                                     State:</label>
677
678                                     <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
679                                     [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
680                                 </li>
681                             [% END %]
682
683                             [% UNLESS hidden.defined('altcontactzipcode') %]
684                                 <li>
685                                     [% IF mandatory.defined('altcontactzipcode') %]
686                                         <label for="borrower_altcontactzipcode" class="required">
687                                     [% ELSE %]
688                                         <label for="borrower_altcontactzipcode">
689                                     [% END %]
690                                     Zip/Postal code:</label>
691
692                                     <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
693                                     [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
694                                 </li>
695                             [% END %]
696
697                             [% UNLESS hidden.defined('altcontactcountry') %]
698                                 <li>
699                                     [% IF mandatory.defined('altcontactcountry') %]
700                                         <label for="borrower_altcontactcountry" class="required">
701                                     [% ELSE %]
702                                         <label for="borrower_altcontactcountry">
703                                     [% END %]
704                                     Country:</label>
705
706                                     <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
707                                     [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
708                                 </li>
709                             [% END %]
710
711                             [% UNLESS hidden.defined('altcontactphone') %]
712                                 <li>
713                                     [% IF mandatory.defined('altcontactphone') %]
714                                         <label for="borrower_altcontactphone" class="required">
715                                     [% ELSE %]
716                                         <label for="borrower_altcontactphone">
717                                     [% END %]
718                                     Phone:</label>
719
720                                     <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
721                                     [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
722                                 </li>
723                             [% END %]
724                         </ol>
725                     </fieldset>
726                 [% END %]
727
728                 [% UNLESS action == 'edit' %]
729                     <fieldset class="rows" id="memberentry_captcha">
730                         <ol>
731                             <li>
732                                 <label for="captcha" class="required">Verification:</label>
733
734                                 <input type="text" name="captcha" id="captcha" />
735                                 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
736
737                                 <span class="hint">Please type this following characters into the preceding box: <strong>[% captcha %]</strong></span>
738                             </li>
739                         </ol>
740                     </fieldset>
741                 [% END %]
742
743                 [% IF ( borrower.ExtendedPatronAttributes ) %]
744                     <fieldset class="rows">
745                         <legend>Additional information</legend>
746                         <ol>
747                             [% FOREACH patron_attribute IN borrower.patron_attributes %]
748                                 <li>
749                                     <label>[% patron_attribute.description %]:</label>
750                                     [% IF ( patron_attribute.value_description ) %]
751                                         [% patron_attribute.value_description %]
752                                     [% ELSE %]
753                                         [% patron_attribute.value |html_line_break %]
754                                     [% END %]
755                                 </li>
756                             [% END %]
757                         </ol>
758                     </fieldset>
759                 [% END %]
760
761                 [% IF action == 'edit' %]
762                     [% IF OPACPatronDetails %]
763                         <fieldset class="action">
764                             <input type="hidden" name="action" value="update" />
765                             <input type="submit" class="btn" value="Submit update request" />
766                         </fieldset>
767                     [% END %]
768                 [% ELSE %]
769                     <fieldset class="action">
770                         <input type="hidden" name="action" value="create" />
771                         <input type="submit" class="btn" value="Submit" />
772                     </fieldset>
773                 [% END %]
774
775                 </form>
776
777                     </div><!--/div id="update-account" -->
778                 </div>
779             </div>
780         </div>
781     </div>
782
783 [% INCLUDE 'opac-bottom.inc' %]
784 [% BLOCK jsinclude %]
785     <script type="text/javascript">
786         //<![CDATA[
787         $(document).ready(function() {
788             [% IF action == 'edit' && !OPACPatronDetails %]
789                 $("#memberentry-form :input").attr('readonly', true);
790                 $("#borrower_branchcode").attr('disabled',true);
791                 $("#borrower_title").attr('disabled',true);
792                 $('#memberentry-form :radio').attr('disabled',true);
793                 $('span.required').remove();
794                 $('label.required').removeClass('required');
795             [% ELSE %]
796                 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
797             [% END %]
798         });
799     //]]>
800     </script>
801 [% INCLUDE 'calendar.inc' %]
802 [% END %]