2 [% SET userupdateview = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]
6 [% INCLUDE 'doc-head-close.inc' %]
8 <script type="text/javascript">
10 $(document).ready(function() {
11 [% IF action == 'edit' && !OPACPatronDetails %]
12 $("#memberentry-form :input").attr('readonly', true);
13 $("#borrower_branchcode").attr('disabled',true);
14 $("#borrower_title").attr('disabled',true);
15 $('#memberentry-form :radio').attr('disabled',true);
16 $('span.required').remove();
17 $('label.required').removeClass('required');
19 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
25 [% IF action == 'edit' %]
26 <body id="opac-patron-update">
28 <body id="opac-patron-registration">
30 <div id="doc3" class="yui-t1">
32 [% INCLUDE 'masthead.inc' %]
37 [% IF action == 'edit' %]
38 <div id="update-account" class="container">
40 <div id="add-account" class="container">
42 [% IF action == 'edit' %]
43 <h3><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]'s account</a> ⇢ Personal details</h3>
45 <h3>Register a new account</h3>
48 [% IF action == 'edit' %]
49 [% UNLESS OPACPatronDetails %]
50 <div class="dialog message">To make changes to your record please contact the library.</div>
54 [% IF empty_mandatory_fields %]
55 <div class="dialog alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
58 [% IF failed_captcha %]
59 <div class="dialog alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
62 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
65 hidden.defined('branchcode')
68 <fieldset class="rows" id="memberentry_library">
70 <legend id="library_legend">Library</legend>
72 [% UNLESS hidden.defined('branchcode') %]
74 [% IF mandatory.defined('branchcode') %]
75 <label for="borrower_branchcode" class="required">
77 <label for="borrower_branchcode">
81 <select id="borrower_branchcode" name="borrower_branchcode">
82 [% FOREACH b IN branches %]
83 [% IF b.value == borrower.branchcode %]
84 <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
86 <option value="[% b.value %]">[% b.branchname %]</option>
97 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
98 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
101 <fieldset class="rows" id="memberentry_identity">
102 <legend id="identity_legend">Identity</legend>
105 [% UNLESS hidden.defined('title') %]
107 [% IF mandatory.defined('title') %]
108 <label for="borrower_title" class="required">
110 <label for="borrower_title">
114 <select id="borrower_title" name="borrower_title">
115 <option value=""> </option>
116 [% FOREACH mt IN member_titles %]
117 [% IF mt == borrower.title %]
118 <option value="[% mt %]" selected="selected">[% mt %]</option>
120 <option value="[% mt %]">[% mt %]</option>
127 [% UNLESS hidden.defined('surname') %]
129 [% IF mandatory.defined('surname') %]
130 <label for="borrower_surname" class="required">
132 <label for="borrower_surname">
136 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
137 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
141 [% UNLESS hidden.defined('firstname') %]
143 [% IF mandatory.defined('firstname') %]
144 <label for="borrower_firstname" class="required">
146 <label for="borrower_firstname">
150 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
151 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
155 [% UNLESS hidden.defined('dateofbirth') %]
157 [% IF mandatory.defined('dateofbirth') %]
158 <label for="borrower_dateofbirth" class="required">
160 <label for="borrower_dateofbirth">
162 Date of birth:</label>
164 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
166 [% UNLESS action == 'edit' && !OPACPatronDetails %]
167 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a><p></p>
170 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
174 [% UNLESS hidden.defined('initials') %]
176 [% IF mandatory.defined('initials') %]
177 <label for="borrower_initials" class="required">
179 <label for="borrower_initials">
183 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
184 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
188 [% UNLESS hidden.defined('othernames') %]
190 [% IF mandatory.defined('othernames') %]
191 <label for="borrower_othernames" class="required">
193 <label for="borrower_othernames">
197 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
198 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
202 [% UNLESS hidden.defined('sex') %]
204 <label for="sex-female">Female:</label>
205 [% IF borrower.sex == 'F' %]
206 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
208 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
211 <label for="sex-male">Male:</label>
212 [% IF borrower.sex == 'M' %]
213 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
215 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
218 <label for="sex-none">N/A:</label>
219 [% IF borrower.sex == '' %]
220 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
222 <input type="radio" name="borrower_sex" id="sex-none" value="" />
225 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
233 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
234 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
235 hidden.defined('country')
237 <fieldset class="rows" id="memberentry_mainaddress">
238 <legend id="mainaddress_legend">Main address</legend>
241 [% UNLESS hidden.defined('streetnumber') %]
243 [% IF mandatory.defined('streetnumber') %]
244 <label for="borrower_streetnumber" class="required">
246 <label for="borrower_streetnumber">
248 Street number:</label>
250 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
251 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
255 [% UNLESS hidden.defined('address') %]
257 [% IF mandatory.defined('address') %]
258 <label for="borrower_address" class="required">
260 <label for="borrower_address">
264 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
265 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
269 [% UNLESS hidden.defined('address2') %]
271 [% IF mandatory.defined('address2') %]
272 <label for="borrower_address2" class="required">
274 <label for="borrower_address2">
278 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
279 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
283 [% UNLESS hidden.defined('city') %]
285 [% IF mandatory.defined('city') %]
286 <label for="borrower_city" class="required">
288 <label for="borrower_city">
292 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
293 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
297 [% UNLESS hidden.defined('state') %]
299 [% IF mandatory.defined('state') %]
300 <label for="borrower_state" class="required">
302 <label for="borrower_state">
306 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
307 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
311 [% UNLESS hidden.defined('zipcode') %]
313 [% IF mandatory.defined('zipcode') %]
314 <label for="borrower_zipcode" class="required">
316 <label for="borrower_zipcode">
318 Zip/Postal code:</label>
320 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
321 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
325 [% UNLESS hidden.defined('country') %]
327 [% IF mandatory.defined('country') %]
328 <label for="borrower_country" class="required">
330 <label for="borrower_country">
334 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
335 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
344 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
345 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
347 <fieldset class="rows" id="memberentry_contact">
348 <legend id="contact_legend">Contact information</legend>
351 [% UNLESS hidden.defined('phone') %]
353 [% IF mandatory.defined('phone') %]
354 <label for="borrower_phone" class="required">
356 <label for="borrower_phone">
358 Primary phone:</label>
360 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
361 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
365 [% UNLESS hidden.defined('phonepro') %]
367 [% IF mandatory.defined('phonepro') %]
368 <label for="borrower_phonepro" class="required">
370 <label for="borrower_phonepro">
372 Secondary phone:</label>
374 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
375 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
379 [% UNLESS hidden.defined('mobile') %]
381 [% IF mandatory.defined('mobile') %]
382 <label for="borrower_mobile" class="required">
384 <label for="borrower_mobile">
386 Mobile phone:</label>
388 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
389 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
393 [% UNLESS hidden.defined('email') %]
395 [% IF mandatory.defined('email') %]
396 <label for="borrower_email" class="required">
398 <label for="borrower_email">
400 Primary email:</label>
402 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
403 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
407 [% UNLESS hidden.defined('emailpro') %]
409 [% IF mandatory.defined('emailpro') %]
410 <label for="borrower_emailpro" class="required">
412 <label for="borrower_emailpro">
414 Secondary email:</label>
416 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
417 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
421 [% UNLESS hidden.defined('fax') %]
423 [% IF mandatory.defined('fax') %]
424 <label for="borrower_fax" class="required">
426 <label for="borrower_fax">
430 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
431 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
439 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
440 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_county') &&
441 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
443 <fieldset class="rows" id="memberentry_alternateaddress">
444 <legend id="alternateaddress_legend">Alternate address</legend>
447 [% UNLESS hidden.defined('B_address') %]
449 [% IF mandatory.defined('B_address') %]
450 <label for="borrower_B_address" class="required">
452 <label for="borrower_B_address">
456 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
457 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
461 [% UNLESS hidden.defined('B_address2') %]
463 [% IF mandatory.defined('B_address2') %]
464 <label for="borrower_B_address2" class="required">
466 <label for="borrower_B_address2">
470 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
471 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
475 [% UNLESS hidden.defined('B_city') %]
477 [% IF mandatory.defined('B_city') %]
478 <label for="borrower_B_city" class="required">
480 <label for="borrower_B_city">
484 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
485 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
489 [% UNLESS hidden.defined('B_state') %]
491 [% IF mandatory.defined('B_state') %]
492 <label for="borrower_B_state" class="required">
494 <label for="borrower_B_state">
498 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
499 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
503 [% UNLESS hidden.defined('B_zipcode') %]
505 [% IF mandatory.defined('B_zipcode') %]
506 <label for="borrower_B_zipcode" class="required">
508 <label for="borrower_B_zipcode">
510 Zip/Postal code:</label>
512 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
513 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
517 [% UNLESS hidden.defined('B_country') %]
519 [% IF mandatory.defined('B_country') %]
520 <label for="borrower_B_country" class="required">
522 <label for="borrower_B_country">
526 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
527 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
531 [% UNLESS hidden.defined('B_phone') %]
533 [% IF mandatory.defined('B_phone') %]
534 <label for="borrower_B_phone" class="required">
536 <label for="borrower_B_phone">
540 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
541 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
545 [% UNLESS hidden.defined('B_email') %]
547 [% IF mandatory.defined('B_email') %]
548 <label for="borrower_B_email" class="required">
550 <label for="borrower_B_email">
554 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
555 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
559 [% UNLESS hidden.defined('contactnote') %]
561 [% IF mandatory.defined('contactnote') %]
562 <label for="borrower_contactnote" class="required">
564 <label for="borrower_contactnote">
566 Contact Note:</label>
568 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="40" rows="2">[% borrower.contactnote %]</textarea>
569 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
578 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
579 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
580 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
582 <fieldset class="rows" id="memberentry_alternatecontact">
583 <legend id="alternatecontact_legend">Alternate contact</legend>
586 [% UNLESS hidden.defined('altcontactsurname') %]
588 [% IF mandatory.defined('altcontactsurname') %]
589 <label for="borrower_altcontactsurname" class="required">
591 <label for="borrower_altcontactsurname">
595 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
596 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
600 [% UNLESS hidden.defined('altcontactfirstname') %]
602 [% IF mandatory.defined('altcontactfirstname') %]
603 <label for="borrower_altcontactfirstname" class="required">
605 <label for="borrower_altcontactfirstname">
609 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
610 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
614 [% UNLESS hidden.defined('altcontactaddress1') %]
616 [% IF mandatory.defined('altcontactaddress1') %]
617 <label for="borrower_altcontactaddress1" class="required">
619 <label for="borrower_altcontactaddress1">
623 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
624 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
628 [% UNLESS hidden.defined('altcontactaddress2') %]
630 [% IF mandatory.defined('altcontactaddress2') %]
631 <label for="borrower_altcontactaddress2" class="required">
633 <label for="borrower_altcontactaddress2">
637 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
638 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
642 [% UNLESS hidden.defined('altcontactaddress3') %]
644 [% IF mandatory.defined('altcontactaddress3') %]
645 <label for="borrower_altcontactaddress3" class="required">
647 <label for="borrower_altcontactaddress3">
651 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
652 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
656 [% UNLESS hidden.defined('altcontactstate') %]
658 [% IF mandatory.defined('altcontactstate') %]
659 <label for="borrower_altcontactstate" class="required">
661 <label for="borrower_altcontactstate">
665 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
666 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
670 [% UNLESS hidden.defined('altcontactzipcode') %]
672 [% IF mandatory.defined('altcontactzipcode') %]
673 <label for="borrower_altcontactzipcode" class="required">
675 <label for="borrower_altcontactzipcode">
677 Zip/Postal code:</label>
679 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
680 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
684 [% UNLESS hidden.defined('altcontactcountry') %]
686 [% IF mandatory.defined('altcontactcountry') %]
687 <label for="borrower_altcontactcountry" class="required">
689 <label for="borrower_altcontactcountry">
693 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
694 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
698 [% UNLESS hidden.defined('altcontactphone') %]
700 [% IF mandatory.defined('altcontactphone') %]
701 <label for="borrower_altcontactphone" class="required">
703 <label for="borrower_altcontactphone">
707 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
708 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
715 [% UNLESS action == 'edit' %]
716 <fieldset class="rows" id="memberentry_captcha">
719 <label for="captcha" class="required">Verification:</label>
721 <input type="text" name="captcha" id="captcha" />
722 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
724 <span class="hint">Please type this following characters into the preceding box: <strong>[% captcha %]</strong></span>
730 [% IF action == 'edit' %]
731 [% IF OPACPatronDetails %]
732 <fieldset class="action">
733 <input type="hidden" name="action" value="update" />
734 <input type="submit" value="Submit update request" />
738 <fieldset class="action">
739 <input type="hidden" name="action" value="create" />
740 <input type="submit" value="Submit" />
746 </div><!--/div id="update-account" -->
752 <div id="leftmenus" class="container">
753 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
757 [% INCLUDE 'opac-bottom.inc' %]