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