3 [% SET userupdateview = 1 %]
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' %]
10 <script type="text/javascript">
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');
21 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
27 [% IF action == 'edit' %]
28 <body id="opac-patron-update">
30 <body id="opac-patron-registration">
32 <div id="doc3" class="yui-t1">
34 [% INCLUDE 'masthead.inc' %]
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">
42 <div id="add-account" class="container">
45 [% IF action == 'edit' %]
46 <h3><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]'s account</a> ⇢ Personal details</h3>
48 <h3>Register a new account</h3>
51 [% IF action == 'edit' %]
52 [% UNLESS OPACPatronDetails %]
53 <div class="dialog message">To make changes to your record please contact the library.</div>
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>
61 [% IF failed_captcha %]
62 <div class="dialog alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
66 hidden.defined('branchcode')
69 <fieldset class="rows" id="memberentry_library">
71 <legend id="library_legend">Library</legend>
73 [% UNLESS hidden.defined('branchcode') %]
75 [% IF mandatory.defined('branchcode') %]
76 <label for="borrower_branchcode" class="required">
78 <label for="borrower_branchcode">
82 <select id="borrower_branchcode" name="borrower_branchcode">
83 [% FOREACH b IN branches %]
84 [% IF b.value == borrower.branchcode %]
85 <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
87 <option value="[% b.value %]">[% b.branchname %]</option>
98 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
99 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
100 hidden.defined('sex')
103 [% IF ( display_patron_image ) %]
104 <div class="yui-u first">
106 <fieldset class="rows" id="memberentry_identity">
107 <legend id="identity_legend">Identity</legend>
110 [% UNLESS hidden.defined('title') || !member_titles %]
112 [% IF mandatory.defined('title') %]
113 <label for="borrower_title" class="required">
115 <label for="borrower_title">
119 <select id="borrower_title" name="borrower_title">
120 [% FOREACH mt IN member_titles %]
121 [% IF mt == borrower.title %]
122 <option value="[% mt %]" selected="selected">[% mt %]</option>
124 <option value="[% mt %]">[% mt %]</option>
131 [% UNLESS hidden.defined('surname') %]
133 [% IF mandatory.defined('surname') %]
134 <label for="borrower_surname" class="required">
136 <label for="borrower_surname">
140 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
141 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
145 [% UNLESS hidden.defined('firstname') %]
147 [% IF mandatory.defined('firstname') %]
148 <label for="borrower_firstname" class="required">
150 <label for="borrower_firstname">
154 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
155 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
159 [% UNLESS hidden.defined('dateofbirth') %]
161 [% IF mandatory.defined('dateofbirth') %]
162 <label for="borrower_dateofbirth" class="required">
164 <label for="borrower_dateofbirth">
166 Date of birth:</label>
168 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
170 [% UNLESS action == 'edit' && !OPACPatronDetails %]
171 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a>
174 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
178 [% UNLESS hidden.defined('initials') %]
180 [% IF mandatory.defined('initials') %]
181 <label for="borrower_initials" class="required">
183 <label for="borrower_initials">
187 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
188 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
192 [% UNLESS hidden.defined('othernames') %]
194 [% IF mandatory.defined('othernames') %]
195 <label for="borrower_othernames" class="required">
197 <label for="borrower_othernames">
201 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
202 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
206 [% UNLESS hidden.defined('sex') %]
208 <label for="sex-female">Female:</label>
209 [% IF borrower.sex == 'F' %]
210 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
212 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
215 <label for="sex-male">Male:</label>
216 [% IF borrower.sex == 'M' %]
217 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
219 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
222 <label for="sex-none">N/A:</label>
223 [% IF borrower.sex == '' %]
224 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
226 <input type="radio" name="borrower_sex" id="sex-none" value="" />
229 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
234 [% IF ( display_patron_image ) %]
237 <p class="patronimage">
238 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
247 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
248 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
249 hidden.defined('country')
251 <fieldset class="rows" id="memberentry_mainaddress">
252 <legend id="mainaddress_legend">Main address</legend>
255 [% UNLESS hidden.defined('streetnumber') %]
257 [% IF mandatory.defined('streetnumber') %]
258 <label for="borrower_streetnumber" class="required">
260 <label for="borrower_streetnumber">
262 Street number:</label>
264 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
265 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
269 [% UNLESS hidden.defined('address') %]
271 [% IF mandatory.defined('address') %]
272 <label for="borrower_address" class="required">
274 <label for="borrower_address">
278 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
279 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
283 [% UNLESS hidden.defined('address2') %]
285 [% IF mandatory.defined('address2') %]
286 <label for="borrower_address2" class="required">
288 <label for="borrower_address2">
292 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
293 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
297 [% UNLESS hidden.defined('city') %]
299 [% IF mandatory.defined('city') %]
300 <label for="borrower_city" class="required">
302 <label for="borrower_city">
306 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
307 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
311 [% UNLESS hidden.defined('state') %]
313 [% IF mandatory.defined('state') %]
314 <label for="borrower_state" class="required">
316 <label for="borrower_state">
320 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
321 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
325 [% UNLESS hidden.defined('zipcode') %]
327 [% IF mandatory.defined('zipcode') %]
328 <label for="borrower_zipcode" class="required">
330 <label for="borrower_zipcode">
332 Zip/Postal code:</label>
334 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
335 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
339 [% UNLESS hidden.defined('country') %]
341 [% IF mandatory.defined('country') %]
342 <label for="borrower_country" class="required">
344 <label for="borrower_country">
348 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
349 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
358 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
359 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
361 <fieldset class="rows" id="memberentry_contact">
362 <legend id="contact_legend">Contact information</legend>
365 [% UNLESS hidden.defined('phone') %]
367 [% IF mandatory.defined('phone') %]
368 <label for="borrower_phone" class="required">
370 <label for="borrower_phone">
372 Primary phone:</label>
374 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
375 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
379 [% UNLESS hidden.defined('phonepro') %]
381 [% IF mandatory.defined('phonepro') %]
382 <label for="borrower_phonepro" class="required">
384 <label for="borrower_phonepro">
386 Secondary phone:</label>
388 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
389 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
393 [% UNLESS hidden.defined('mobile') %]
395 [% IF mandatory.defined('mobile') %]
396 <label for="borrower_mobile" class="required">
398 <label for="borrower_mobile">
400 Mobile phone:</label>
402 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
403 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
407 [% UNLESS hidden.defined('email') %]
409 [% IF mandatory.defined('email') %]
410 <label for="borrower_email" class="required">
412 <label for="borrower_email">
414 Primary email:</label>
416 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
417 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
421 [% UNLESS hidden.defined('emailpro') %]
423 [% IF mandatory.defined('emailpro') %]
424 <label for="borrower_emailpro" class="required">
426 <label for="borrower_emailpro">
428 Secondary email:</label>
430 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
431 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
435 [% UNLESS hidden.defined('fax') %]
437 [% IF mandatory.defined('fax') %]
438 <label for="borrower_fax" class="required">
440 <label for="borrower_fax">
444 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
445 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
453 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
454 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_county') &&
455 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
457 <fieldset class="rows" id="memberentry_alternateaddress">
458 <legend id="alternateaddress_legend">Alternate address</legend>
461 [% UNLESS hidden.defined('B_address') %]
463 [% IF mandatory.defined('B_address') %]
464 <label for="borrower_B_address" class="required">
466 <label for="borrower_B_address">
470 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
471 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
475 [% UNLESS hidden.defined('B_address2') %]
477 [% IF mandatory.defined('B_address2') %]
478 <label for="borrower_B_address2" class="required">
480 <label for="borrower_B_address2">
484 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
485 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
489 [% UNLESS hidden.defined('B_city') %]
491 [% IF mandatory.defined('B_city') %]
492 <label for="borrower_B_city" class="required">
494 <label for="borrower_B_city">
498 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
499 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
503 [% UNLESS hidden.defined('B_state') %]
505 [% IF mandatory.defined('B_state') %]
506 <label for="borrower_B_state" class="required">
508 <label for="borrower_B_state">
512 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
513 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
517 [% UNLESS hidden.defined('B_zipcode') %]
519 [% IF mandatory.defined('B_zipcode') %]
520 <label for="borrower_B_zipcode" class="required">
522 <label for="borrower_B_zipcode">
524 Zip/Postal code:</label>
526 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
527 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
531 [% UNLESS hidden.defined('B_country') %]
533 [% IF mandatory.defined('B_country') %]
534 <label for="borrower_B_country" class="required">
536 <label for="borrower_B_country">
540 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
541 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
545 [% UNLESS hidden.defined('B_phone') %]
547 [% IF mandatory.defined('B_phone') %]
548 <label for="borrower_B_phone" class="required">
550 <label for="borrower_B_phone">
554 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
555 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
559 [% UNLESS hidden.defined('B_email') %]
561 [% IF mandatory.defined('B_email') %]
562 <label for="borrower_B_email" class="required">
564 <label for="borrower_B_email">
568 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
569 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
573 [% UNLESS hidden.defined('contactnote') %]
575 [% IF mandatory.defined('contactnote') %]
576 <label for="borrower_contactnote" class="required">
578 <label for="borrower_contactnote">
580 Contact Note:</label>
582 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="40" rows="2">[% borrower.contactnote %]</textarea>
583 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
592 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
593 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
594 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
596 <fieldset class="rows" id="memberentry_alternatecontact">
597 <legend id="alternatecontact_legend">Alternate contact</legend>
600 [% UNLESS hidden.defined('altcontactsurname') %]
602 [% IF mandatory.defined('altcontactsurname') %]
603 <label for="borrower_altcontactsurname" class="required">
605 <label for="borrower_altcontactsurname">
609 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
610 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
614 [% UNLESS hidden.defined('altcontactfirstname') %]
616 [% IF mandatory.defined('altcontactfirstname') %]
617 <label for="borrower_altcontactfirstname" class="required">
619 <label for="borrower_altcontactfirstname">
623 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
624 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
628 [% UNLESS hidden.defined('altcontactaddress1') %]
630 [% IF mandatory.defined('altcontactaddress1') %]
631 <label for="borrower_altcontactaddress1" class="required">
633 <label for="borrower_altcontactaddress1">
637 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
638 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
642 [% UNLESS hidden.defined('altcontactaddress2') %]
644 [% IF mandatory.defined('altcontactaddress2') %]
645 <label for="borrower_altcontactaddress2" class="required">
647 <label for="borrower_altcontactaddress2">
651 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
652 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
656 [% UNLESS hidden.defined('altcontactaddress3') %]
658 [% IF mandatory.defined('altcontactaddress3') %]
659 <label for="borrower_altcontactaddress3" class="required">
661 <label for="borrower_altcontactaddress3">
665 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
666 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
670 [% UNLESS hidden.defined('altcontactstate') %]
672 [% IF mandatory.defined('altcontactstate') %]
673 <label for="borrower_altcontactstate" class="required">
675 <label for="borrower_altcontactstate">
679 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
680 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
684 [% UNLESS hidden.defined('altcontactzipcode') %]
686 [% IF mandatory.defined('altcontactzipcode') %]
687 <label for="borrower_altcontactzipcode" class="required">
689 <label for="borrower_altcontactzipcode">
691 Zip/Postal code:</label>
693 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
694 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
698 [% UNLESS hidden.defined('altcontactcountry') %]
700 [% IF mandatory.defined('altcontactcountry') %]
701 <label for="borrower_altcontactcountry" class="required">
703 <label for="borrower_altcontactcountry">
707 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
708 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
712 [% UNLESS hidden.defined('altcontactphone') %]
714 [% IF mandatory.defined('altcontactphone') %]
715 <label for="borrower_altcontactphone" class="required">
717 <label for="borrower_altcontactphone">
721 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
722 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
729 [% UNLESS action == 'edit' %]
730 <fieldset class="rows" id="memberentry_captcha">
733 <label for="captcha" class="required">Verification:</label>
735 <input type="text" name="captcha" id="captcha" />
736 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
738 <span class="hint">Please type this following characters into the preceding box: <strong>[% captcha %]</strong></span>
744 [% IF action == 'edit' %]
745 [% IF OPACPatronDetails %]
746 <fieldset class="action">
747 <input type="hidden" name="action" value="update" />
748 <input type="submit" value="Submit update request" />
752 <fieldset class="action">
753 <input type="hidden" name="action" value="create" />
754 <input type="submit" value="Submit" />
758 </div><!--/div id="update-account" -->
764 <div id="leftmenus" class="container">
765 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
769 [% INCLUDE 'opac-bottom.inc' %]