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