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' %]
7 [% INCLUDE 'calendar.inc' %]
9 <script type="text/javascript">
11 $(document).ready(function() {
12 [% IF action == 'edit' && !OPACPatronDetails %]
13 $("#memberentry-form :input").attr('readonly', true);
14 $("#borrower_branchcode").attr('disabled',true);
15 $("#borrower_title").attr('disabled',true);
16 $('#memberentry-form :radio').attr('disabled',true);
17 $('span.required').remove();
18 $('label.required').removeClass('required');
20 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
26 [% IF action == 'edit' %]
27 <body id="opac-patron-update">
29 <body id="opac-patron-registration">
31 <div id="doc3" class="yui-t1">
33 [% INCLUDE 'masthead.inc' %]
38 [% IF action == 'edit' %]
39 <div id="update-account" class="container">
41 <div id="add-account" class="container">
43 [% IF action == 'edit' %]
44 <h3><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]'s account</a> ⇢ Personal details</h3>
46 <h3>Register a new account</h3>
49 [% IF action == 'edit' %]
50 [% UNLESS OPACPatronDetails %]
51 <div class="dialog message">To make changes to your record please contact the library.</div>
55 [% IF empty_mandatory_fields %]
56 <div class="dialog alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
59 [% IF failed_captcha %]
60 <div class="dialog alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
63 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
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')
102 <fieldset class="rows" id="memberentry_identity">
103 <legend id="identity_legend">Identity</legend>
106 [% UNLESS hidden.defined('title') %]
108 [% IF mandatory.defined('title') %]
109 <label for="borrower_title" class="required">
111 <label for="borrower_title">
115 <select id="borrower_title" name="borrower_title">
116 <option value=""> </option>
117 [% FOREACH mt IN member_titles %]
118 [% IF mt == borrower.title %]
119 <option value="[% mt %]" selected="selected">[% mt %]</option>
121 <option value="[% mt %]">[% mt %]</option>
128 [% UNLESS hidden.defined('surname') %]
130 [% IF mandatory.defined('surname') %]
131 <label for="borrower_surname" class="required">
133 <label for="borrower_surname">
137 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
138 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
142 [% UNLESS hidden.defined('firstname') %]
144 [% IF mandatory.defined('firstname') %]
145 <label for="borrower_firstname" class="required">
147 <label for="borrower_firstname">
151 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
152 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
156 [% UNLESS hidden.defined('dateofbirth') %]
158 [% IF mandatory.defined('dateofbirth') %]
159 <label for="borrower_dateofbirth" class="required">
161 <label for="borrower_dateofbirth">
163 Date of birth:</label>
165 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
167 [% UNLESS action == 'edit' && !OPACPatronDetails %]
168 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a><p></p>
171 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
175 [% UNLESS hidden.defined('initials') %]
177 [% IF mandatory.defined('initials') %]
178 <label for="borrower_initials" class="required">
180 <label for="borrower_initials">
184 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
185 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
189 [% UNLESS hidden.defined('othernames') %]
191 [% IF mandatory.defined('othernames') %]
192 <label for="borrower_othernames" class="required">
194 <label for="borrower_othernames">
198 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
199 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
203 [% UNLESS hidden.defined('sex') %]
205 <label for="sex-female">Female:</label>
206 [% IF borrower.sex == 'F' %]
207 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
209 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
212 <label for="sex-male">Male:</label>
213 [% IF borrower.sex == 'M' %]
214 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
216 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
219 <label for="sex-none">N/A:</label>
220 [% IF borrower.sex == '' %]
221 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
223 <input type="radio" name="borrower_sex" id="sex-none" value="" />
226 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
234 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
235 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
236 hidden.defined('country')
238 <fieldset class="rows" id="memberentry_mainaddress">
239 <legend id="mainaddress_legend">Main address</legend>
242 [% UNLESS hidden.defined('streetnumber') %]
244 [% IF mandatory.defined('streetnumber') %]
245 <label for="borrower_streetnumber" class="required">
247 <label for="borrower_streetnumber">
249 Street number:</label>
251 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
252 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
256 [% UNLESS hidden.defined('address') %]
258 [% IF mandatory.defined('address') %]
259 <label for="borrower_address" class="required">
261 <label for="borrower_address">
265 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
266 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
270 [% UNLESS hidden.defined('address2') %]
272 [% IF mandatory.defined('address2') %]
273 <label for="borrower_address2" class="required">
275 <label for="borrower_address2">
279 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
280 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
284 [% UNLESS hidden.defined('city') %]
286 [% IF mandatory.defined('city') %]
287 <label for="borrower_city" class="required">
289 <label for="borrower_city">
293 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
294 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
298 [% UNLESS hidden.defined('state') %]
300 [% IF mandatory.defined('state') %]
301 <label for="borrower_state" class="required">
303 <label for="borrower_state">
307 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
308 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
312 [% UNLESS hidden.defined('zipcode') %]
314 [% IF mandatory.defined('zipcode') %]
315 <label for="borrower_zipcode" class="required">
317 <label for="borrower_zipcode">
319 Zip/Postal code:</label>
321 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
322 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
326 [% UNLESS hidden.defined('country') %]
328 [% IF mandatory.defined('country') %]
329 <label for="borrower_country" class="required">
331 <label for="borrower_country">
335 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
336 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
345 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
346 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
348 <fieldset class="rows" id="memberentry_contact">
349 <legend id="contact_legend">Contact information</legend>
352 [% UNLESS hidden.defined('phone') %]
354 [% IF mandatory.defined('phone') %]
355 <label for="borrower_phone" class="required">
357 <label for="borrower_phone">
359 Primary phone:</label>
361 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
362 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
366 [% UNLESS hidden.defined('phonepro') %]
368 [% IF mandatory.defined('phonepro') %]
369 <label for="borrower_phonepro" class="required">
371 <label for="borrower_phonepro">
373 Secondary phone:</label>
375 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
376 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
380 [% UNLESS hidden.defined('mobile') %]
382 [% IF mandatory.defined('mobile') %]
383 <label for="borrower_mobile" class="required">
385 <label for="borrower_mobile">
387 Mobile phone:</label>
389 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
390 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
394 [% UNLESS hidden.defined('email') %]
396 [% IF mandatory.defined('email') %]
397 <label for="borrower_email" class="required">
399 <label for="borrower_email">
401 Primary email:</label>
403 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
404 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
408 [% UNLESS hidden.defined('emailpro') %]
410 [% IF mandatory.defined('emailpro') %]
411 <label for="borrower_emailpro" class="required">
413 <label for="borrower_emailpro">
415 Secondary email:</label>
417 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
418 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
422 [% UNLESS hidden.defined('fax') %]
424 [% IF mandatory.defined('fax') %]
425 <label for="borrower_fax" class="required">
427 <label for="borrower_fax">
431 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
432 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
440 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
441 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_county') &&
442 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
444 <fieldset class="rows" id="memberentry_alternateaddress">
445 <legend id="alternateaddress_legend">Alternate address</legend>
448 [% UNLESS hidden.defined('B_address') %]
450 [% IF mandatory.defined('B_address') %]
451 <label for="borrower_B_address" class="required">
453 <label for="borrower_B_address">
457 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
458 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
462 [% UNLESS hidden.defined('B_address2') %]
464 [% IF mandatory.defined('B_address2') %]
465 <label for="borrower_B_address2" class="required">
467 <label for="borrower_B_address2">
471 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
472 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
476 [% UNLESS hidden.defined('B_city') %]
478 [% IF mandatory.defined('B_city') %]
479 <label for="borrower_B_city" class="required">
481 <label for="borrower_B_city">
485 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
486 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
490 [% UNLESS hidden.defined('B_state') %]
492 [% IF mandatory.defined('B_state') %]
493 <label for="borrower_B_state" class="required">
495 <label for="borrower_B_state">
499 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
500 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
504 [% UNLESS hidden.defined('B_zipcode') %]
506 [% IF mandatory.defined('B_zipcode') %]
507 <label for="borrower_B_zipcode" class="required">
509 <label for="borrower_B_zipcode">
511 Zip/Postal code:</label>
513 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
514 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
518 [% UNLESS hidden.defined('B_country') %]
520 [% IF mandatory.defined('B_country') %]
521 <label for="borrower_B_country" class="required">
523 <label for="borrower_B_country">
527 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
528 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
532 [% UNLESS hidden.defined('B_phone') %]
534 [% IF mandatory.defined('B_phone') %]
535 <label for="borrower_B_phone" class="required">
537 <label for="borrower_B_phone">
541 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
542 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
546 [% UNLESS hidden.defined('B_email') %]
548 [% IF mandatory.defined('B_email') %]
549 <label for="borrower_B_email" class="required">
551 <label for="borrower_B_email">
555 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
556 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
560 [% UNLESS hidden.defined('contactnote') %]
562 [% IF mandatory.defined('contactnote') %]
563 <label for="borrower_contactnote" class="required">
565 <label for="borrower_contactnote">
567 Contact Note:</label>
569 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="40" rows="2">[% borrower.contactnote %]</textarea>
570 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
579 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
580 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
581 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
583 <fieldset class="rows" id="memberentry_alternatecontact">
584 <legend id="alternatecontact_legend">Alternate contact</legend>
587 [% UNLESS hidden.defined('altcontactsurname') %]
589 [% IF mandatory.defined('altcontactsurname') %]
590 <label for="borrower_altcontactsurname" class="required">
592 <label for="borrower_altcontactsurname">
596 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
597 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
601 [% UNLESS hidden.defined('altcontactfirstname') %]
603 [% IF mandatory.defined('altcontactfirstname') %]
604 <label for="borrower_altcontactfirstname" class="required">
606 <label for="borrower_altcontactfirstname">
610 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
611 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
615 [% UNLESS hidden.defined('altcontactaddress1') %]
617 [% IF mandatory.defined('altcontactaddress1') %]
618 <label for="borrower_altcontactaddress1" class="required">
620 <label for="borrower_altcontactaddress1">
624 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
625 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
629 [% UNLESS hidden.defined('altcontactaddress2') %]
631 [% IF mandatory.defined('altcontactaddress2') %]
632 <label for="borrower_altcontactaddress2" class="required">
634 <label for="borrower_altcontactaddress2">
638 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
639 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
643 [% UNLESS hidden.defined('altcontactaddress3') %]
645 [% IF mandatory.defined('altcontactaddress3') %]
646 <label for="borrower_altcontactaddress3" class="required">
648 <label for="borrower_altcontactaddress3">
652 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
653 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
657 [% UNLESS hidden.defined('altcontactstate') %]
659 [% IF mandatory.defined('altcontactstate') %]
660 <label for="borrower_altcontactstate" class="required">
662 <label for="borrower_altcontactstate">
666 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
667 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
671 [% UNLESS hidden.defined('altcontactzipcode') %]
673 [% IF mandatory.defined('altcontactzipcode') %]
674 <label for="borrower_altcontactzipcode" class="required">
676 <label for="borrower_altcontactzipcode">
678 Zip/Postal code:</label>
680 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
681 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
685 [% UNLESS hidden.defined('altcontactcountry') %]
687 [% IF mandatory.defined('altcontactcountry') %]
688 <label for="borrower_altcontactcountry" class="required">
690 <label for="borrower_altcontactcountry">
694 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
695 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
699 [% UNLESS hidden.defined('altcontactphone') %]
701 [% IF mandatory.defined('altcontactphone') %]
702 <label for="borrower_altcontactphone" class="required">
704 <label for="borrower_altcontactphone">
708 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
709 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
716 [% UNLESS action == 'edit' %]
717 <fieldset class="rows" id="memberentry_captcha">
720 <label for="captcha" class="required">Verification:</label>
722 <input type="text" name="captcha" id="captcha" />
723 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
725 <span class="hint">Please type this following characters into the preceding box: <strong>[% captcha %]</strong></span>
731 [% IF action == 'edit' %]
732 [% IF OPACPatronDetails %]
733 <fieldset class="action">
734 <input type="hidden" name="action" value="update" />
735 <input type="submit" value="Submit update request" />
739 <fieldset class="action">
740 <input type="hidden" name="action" value="create" />
741 <input type="submit" value="Submit" />
747 </div><!--/div id="update-account" -->
753 <div id="leftmenus" class="container">
754 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
758 [% INCLUDE 'opac-bottom.inc' %]