3 [% SET userupdateview = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
11 [% IF action == 'edit' %]
12 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
14 <body id="opac-patron-registration" class="opac">
16 [% INCLUDE 'masthead.inc' %]
19 <ul class="breadcrumb">
20 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
21 [% IF action == 'edit' %]
22 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
23 <li><a href="#">Your personal details</a></li>
25 <li><a href="#">Register a new account</a></li>
29 <div class="container-fluid">
30 <div class="row-fluid">
33 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
37 [% IF action == 'edit' %]
38 <div id="update-account">
40 <div id="add-account">
43 [% IF action == 'edit' %]
44 [% UNLESS OPACPatronDetails %]
45 <div class="alert alert-info">To make changes to your record please contact the library.</div>
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>
53 [% IF failed_captcha %]
54 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
57 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
59 [% UNLESS hidden.defined('branchcode') %]
60 <fieldset class="rows" id="memberentry_library">
62 <legend id="library_legend">Library</legend>
64 [% UNLESS hidden.defined('cardnumber') %]
66 <label>Card number:</label>
67 [% borrower.cardnumber %]
71 [% UNLESS hidden.defined('dateexpiry') %]
73 <label>Expiration date:</label>
74 [% borrower.dateexpiry | $KohaDates %]
78 [% UNLESS hidden.defined('branchcode') %]
80 [% IF mandatory.defined('branchcode') %]
81 <label for="borrower_branchcode" class="required">
83 <label for="borrower_branchcode">
87 <select id="borrower_branchcode" name="borrower_branchcode">
88 [% FOREACH b IN branches %]
89 [% IF b.value == borrower.branchcode %]
90 <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
92 <option value="[% b.value %]">[% b.branchname %]</option>
100 [% END # / defined 'branchcode' %]
103 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
104 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
105 hidden.defined('sex')
107 <div class="row-fluid">
108 [% IF ( display_patron_image ) %]
113 <fieldset class="rows" id="memberentry_identity">
114 <legend id="identity_legend">Identity</legend>
117 [% UNLESS hidden.defined('title') || !member_titles %]
119 [% IF mandatory.defined('title') %]
120 <label for="borrower_title" class="required">
122 <label for="borrower_title">
126 <select id="borrower_title" name="borrower_title">
127 [% FOREACH mt IN member_titles %]
128 [% IF mt == borrower.title %]
129 <option value="[% mt %]" selected="selected">[% mt %]</option>
131 <option value="[% mt %]">[% mt %]</option>
138 [% UNLESS hidden.defined('surname') %]
140 [% IF mandatory.defined('surname') %]
141 <label for="borrower_surname" class="required">
143 <label for="borrower_surname">
147 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
148 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
152 [% UNLESS hidden.defined('firstname') %]
154 [% IF mandatory.defined('firstname') %]
155 <label for="borrower_firstname" class="required">
157 <label for="borrower_firstname">
161 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
162 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
166 [% UNLESS hidden.defined('dateofbirth') %]
168 [% IF mandatory.defined('dateofbirth') %]
169 <label for="borrower_dateofbirth" class="required">
171 <label for="borrower_dateofbirth">
173 Date of birth:</label>
175 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
177 [% UNLESS action == 'edit' && !OPACPatronDetails %]
178 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
179 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a>
183 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
187 [% UNLESS hidden.defined('initials') %]
189 [% IF mandatory.defined('initials') %]
190 <label for="borrower_initials" class="required">
192 <label for="borrower_initials">
196 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
197 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
201 [% UNLESS hidden.defined('othernames') %]
203 [% IF mandatory.defined('othernames') %]
204 <label for="borrower_othernames" class="required">
206 <label for="borrower_othernames">
210 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
211 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
215 [% UNLESS hidden.defined('sex') %]
217 <label for="sex-female" class="radio inline">Female:</label>
218 [% IF borrower.sex == 'F' %]
219 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
221 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
224 <label for="sex-male" class="radio inline">Male:</label>
225 [% IF borrower.sex == 'M' %]
226 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
228 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
231 <label for="sex-none" class="radio inline">N/A:</label>
232 [% IF borrower.sex == '' %]
233 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
235 <input type="radio" name="borrower_sex" id="sex-none" value="" />
238 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
244 [% IF ( display_patron_image ) %]
246 <p class="patronimage">
247 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
252 [% END # /UNLESS fields hidden %]
255 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
256 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
257 hidden.defined('country')
259 <fieldset class="rows" id="memberentry_mainaddress">
260 <legend id="mainaddress_legend">Main address</legend>
263 [% UNLESS hidden.defined('streetnumber') %]
265 [% IF mandatory.defined('streetnumber') %]
266 <label for="borrower_streetnumber" class="required">
268 <label for="borrower_streetnumber">
270 Street number:</label>
272 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
273 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
277 [% UNLESS hidden.defined('address') %]
279 [% IF mandatory.defined('address') %]
280 <label for="borrower_address" class="required">
282 <label for="borrower_address">
286 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
287 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
291 [% UNLESS hidden.defined('address2') %]
293 [% IF mandatory.defined('address2') %]
294 <label for="borrower_address2" class="required">
296 <label for="borrower_address2">
300 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
301 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
305 [% UNLESS hidden.defined('city') %]
307 [% IF mandatory.defined('city') %]
308 <label for="borrower_city" class="required">
310 <label for="borrower_city">
314 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
315 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
319 [% UNLESS hidden.defined('state') %]
321 [% IF mandatory.defined('state') %]
322 <label for="borrower_state" class="required">
324 <label for="borrower_state">
328 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
329 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
333 [% UNLESS hidden.defined('zipcode') %]
335 [% IF mandatory.defined('zipcode') %]
336 <label for="borrower_zipcode" class="required">
338 <label for="borrower_zipcode">
340 Zip/Postal code:</label>
342 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
343 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
347 [% UNLESS hidden.defined('country') %]
349 [% IF mandatory.defined('country') %]
350 <label for="borrower_country" class="required">
352 <label for="borrower_country">
356 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
357 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
366 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
367 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
369 <fieldset class="rows" id="memberentry_contact">
370 <legend id="contact_legend">Contact information</legend>
373 [% UNLESS hidden.defined('phone') %]
375 [% IF mandatory.defined('phone') %]
376 <label for="borrower_phone" class="required">
378 <label for="borrower_phone">
380 Primary phone:</label>
382 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
383 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
387 [% UNLESS hidden.defined('phonepro') %]
389 [% IF mandatory.defined('phonepro') %]
390 <label for="borrower_phonepro" class="required">
392 <label for="borrower_phonepro">
394 Secondary phone:</label>
396 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
397 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
401 [% UNLESS hidden.defined('mobile') %]
403 [% IF mandatory.defined('mobile') %]
404 <label for="borrower_mobile" class="required">
406 <label for="borrower_mobile">
410 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
411 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
415 [% UNLESS hidden.defined('email') %]
417 [% IF mandatory.defined('email') %]
418 <label for="borrower_email" class="required">
420 <label for="borrower_email">
422 Primary email:</label>
424 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
425 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
429 [% UNLESS hidden.defined('emailpro') %]
431 [% IF mandatory.defined('emailpro') %]
432 <label for="borrower_emailpro" class="required">
434 <label for="borrower_emailpro">
436 Secondary email:</label>
438 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
439 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
443 [% UNLESS hidden.defined('fax') %]
445 [% IF mandatory.defined('fax') %]
446 <label for="borrower_fax" class="required">
448 <label for="borrower_fax">
452 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
453 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
461 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
462 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') &&
463 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
465 <fieldset class="rows" id="memberentry_alternateaddress">
466 <legend id="alternateaddress_legend">Alternate address</legend>
469 [% UNLESS hidden.defined('B_address') %]
471 [% IF mandatory.defined('B_address') %]
472 <label for="borrower_B_address" class="required">
474 <label for="borrower_B_address">
478 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
479 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
483 [% UNLESS hidden.defined('B_address2') %]
485 [% IF mandatory.defined('B_address2') %]
486 <label for="borrower_B_address2" class="required">
488 <label for="borrower_B_address2">
492 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
493 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
497 [% UNLESS hidden.defined('B_city') %]
499 [% IF mandatory.defined('B_city') %]
500 <label for="borrower_B_city" class="required">
502 <label for="borrower_B_city">
506 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
507 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
511 [% UNLESS hidden.defined('B_state') %]
513 [% IF mandatory.defined('B_state') %]
514 <label for="borrower_B_state" class="required">
516 <label for="borrower_B_state">
520 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
521 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
525 [% UNLESS hidden.defined('B_zipcode') %]
527 [% IF mandatory.defined('B_zipcode') %]
528 <label for="borrower_B_zipcode" class="required">
530 <label for="borrower_B_zipcode">
532 Zip/Postal code:</label>
534 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
535 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
539 [% UNLESS hidden.defined('B_country') %]
541 [% IF mandatory.defined('B_country') %]
542 <label for="borrower_B_country" class="required">
544 <label for="borrower_B_country">
548 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
549 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
553 [% UNLESS hidden.defined('B_phone') %]
555 [% IF mandatory.defined('B_phone') %]
556 <label for="borrower_B_phone" class="required">
558 <label for="borrower_B_phone">
562 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
563 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
567 [% UNLESS hidden.defined('B_email') %]
569 [% IF mandatory.defined('B_email') %]
570 <label for="borrower_B_email" class="required">
572 <label for="borrower_B_email">
576 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
577 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
581 [% UNLESS hidden.defined('contactnote') %]
583 [% IF mandatory.defined('contactnote') %]
584 <label for="borrower_contactnote" class="required">
586 <label for="borrower_contactnote">
588 Contact note:</label>
590 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
591 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
600 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
601 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
602 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
604 <fieldset class="rows" id="memberentry_alternatecontact">
605 <legend id="alternatecontact_legend">Alternate contact</legend>
608 [% UNLESS hidden.defined('altcontactsurname') %]
610 [% IF mandatory.defined('altcontactsurname') %]
611 <label for="borrower_altcontactsurname" class="required">
613 <label for="borrower_altcontactsurname">
617 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
618 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
622 [% UNLESS hidden.defined('altcontactfirstname') %]
624 [% IF mandatory.defined('altcontactfirstname') %]
625 <label for="borrower_altcontactfirstname" class="required">
627 <label for="borrower_altcontactfirstname">
631 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
632 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
636 [% UNLESS hidden.defined('altcontactaddress1') %]
638 [% IF mandatory.defined('altcontactaddress1') %]
639 <label for="borrower_altcontactaddress1" class="required">
641 <label for="borrower_altcontactaddress1">
645 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
646 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
650 [% UNLESS hidden.defined('altcontactaddress2') %]
652 [% IF mandatory.defined('altcontactaddress2') %]
653 <label for="borrower_altcontactaddress2" class="required">
655 <label for="borrower_altcontactaddress2">
659 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
660 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
664 [% UNLESS hidden.defined('altcontactaddress3') %]
666 [% IF mandatory.defined('altcontactaddress3') %]
667 <label for="borrower_altcontactaddress3" class="required">
669 <label for="borrower_altcontactaddress3">
673 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
674 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
678 [% UNLESS hidden.defined('altcontactstate') %]
680 [% IF mandatory.defined('altcontactstate') %]
681 <label for="borrower_altcontactstate" class="required">
683 <label for="borrower_altcontactstate">
687 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
688 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
692 [% UNLESS hidden.defined('altcontactzipcode') %]
694 [% IF mandatory.defined('altcontactzipcode') %]
695 <label for="borrower_altcontactzipcode" class="required">
697 <label for="borrower_altcontactzipcode">
699 Zip/Postal code:</label>
701 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
702 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
706 [% UNLESS hidden.defined('altcontactcountry') %]
708 [% IF mandatory.defined('altcontactcountry') %]
709 <label for="borrower_altcontactcountry" class="required">
711 <label for="borrower_altcontactcountry">
715 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
716 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
720 [% UNLESS hidden.defined('altcontactphone') %]
722 [% IF mandatory.defined('altcontactphone') %]
723 <label for="borrower_altcontactphone" class="required">
725 <label for="borrower_altcontactphone">
729 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
730 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
737 [% UNLESS action == 'edit' %]
738 <fieldset class="rows" id="memberentry_captcha">
741 <label for="captcha" class="required">Verification:</label>
743 <input type="text" name="captcha" id="captcha" />
744 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
746 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
747 <span class="hint">Note: The preceding box is case-sensitive. Ensure that the entered characters are in all-caps.</span>
753 [% IF ( borrower.ExtendedPatronAttributes ) %]
754 <fieldset class="rows">
755 <legend>Additional information</legend>
757 [% FOREACH patron_attribute IN borrower.patron_attributes %]
759 <label>[% patron_attribute.description %]:</label>
760 [% IF ( patron_attribute.value_description ) %]
761 [% patron_attribute.value_description %]
763 [% patron_attribute.value |html_line_break %]
771 [% IF action == 'edit' %]
772 [% IF OPACPatronDetails %]
773 <fieldset class="action">
774 <input type="hidden" name="action" value="update" />
775 <input type="submit" class="btn" value="Submit update request" />
779 <fieldset class="action">
780 <input type="hidden" name="action" value="create" />
781 <input type="submit" class="btn" value="Submit" />
787 </div><!--/div id="update-account" -->
793 [% INCLUDE 'opac-bottom.inc' %]
794 [% BLOCK jsinclude %]
795 <script type="text/javascript">
797 $(document).ready(function() {
798 [% IF action == 'edit' && !OPACPatronDetails %]
799 $("#memberentry-form :input").attr('readonly', true);
800 $("#borrower_branchcode").attr('disabled',true);
801 $("#borrower_title").attr('disabled',true);
802 $('#memberentry-form :radio').attr('disabled',true);
803 $('span.required').remove();
804 $('label.required').removeClass('required');
806 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
811 [% INCLUDE 'calendar.inc' %]