4 [% SET userupdateview = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% BLOCK cssinclude %][% END %]
12 [% IF action == 'edit' %]
13 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
15 <body id="opac-patron-registration" class="opac">
17 [% INCLUDE 'masthead.inc' %]
20 <ul class="breadcrumb">
21 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
22 [% IF action == 'edit' %]
23 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
24 <li><a href="#">Your personal details</a></li>
26 <li><a href="#">Register a new account</a></li>
30 <div class="container-fluid">
31 <div class="row-fluid">
34 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
38 [% IF action == 'edit' %]
39 <div id="update-account">
41 <div id="add-account">
44 [% IF action == 'edit' %]
45 [% UNLESS OPACPatronDetails %]
46 <div class="alert alert-info">To make changes to your record please contact the library.</div>
49 <div class="alert alert-error">No changes were made.</div>
53 [% IF empty_mandatory_fields %]
54 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
57 [% IF invalid_form_fields %]
58 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
60 [% FOREACH field IN invalid_form_fields %]
61 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
62 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
63 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
64 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
65 [% IF field == "password_invalid" %]<li>Password does not meet minimum requirements! <a href="#password">password</a></li>[% END %]
66 [% IF field == "password_spaces" %]<li>Password contains leading and/or trailing spaces! <a href="#password">password</a></li>[% END %]
69 Please correct the errors and resubmit.
73 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
74 <div class="alert alert-error">
75 [% IF cardnumber_wrong_length %]
76 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
77 [% ELSIF cardnumber_already_exists %]
78 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
80 Please correct this and resubmit.
84 [% IF failed_captcha %]
85 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
88 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
89 <fieldset class="rows" id="memberentry_privacy">
90 <legend id="privacy_legend">Privacy</legend>
93 <label>Allow your guarantor to view your current checkouts?</label>
94 <select id="privacy_guarantor_checkouts">
95 <option value="0">No</option>
96 [% IF borrower.privacy_guarantor_checkouts %]
97 <option value="1" selected="selected">Yes</option>
99 <option value="1">Yes</option>
103 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
104 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
107 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
114 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
116 [% UNLESS hidden.defined('branchcode') %]
117 <fieldset class="rows" id="memberentry_library">
119 <legend id="library_legend">Library</legend>
121 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
123 [% IF mandatory.defined('cardnumber') %]
124 <label for="borrower_cardnumber" class="required">
126 <label for="borrower_cardnumber">
131 [% borrower.cardnumber %]
133 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" value="[% borrower.cardnumber %]" />
134 [% IF mandatory.defined('cardnumber') %]<span class="required">Required</span>[% END %]
139 [% UNLESS hidden.defined('dateexpiry') %]
141 <label>Expiration date:</label>
142 [% borrower.dateexpiry | $KohaDates %]
146 [% UNLESS hidden.defined('branchcode') %]
148 [% IF mandatory.defined('branchcode') %]
149 <label for="borrower_branchcode" class="required">
151 <label for="borrower_branchcode">
153 Home library:</label>
155 <select id="borrower_branchcode" name="borrower_branchcode">
156 [% FOREACH b IN branches %]
157 [% IF b.value == borrower.branchcode %]
158 <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
160 <option value="[% b.value %]">[% b.branchname %]</option>
167 [% UNLESS hidden.defined('categorycode') %]
169 <label for="borrower_categorycode">
173 [% Categories.GetName( borrower.categorycode ) %]
175 <select id="borrower_categorycode" name="borrower_categorycode">
176 [% FOREACH c IN Categories.all() %]
177 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
178 <option value="[% c.categorycode %]" selected="selected">[% c.description %]</option>
180 <option value="[% c.categorycode %]">[% c.description %]</option>
189 [% END # / defined 'branchcode' %]
192 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
193 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
194 hidden.defined('sex')
196 <div class="row-fluid">
197 [% IF ( display_patron_image ) %]
202 <fieldset class="rows" id="memberentry_identity">
203 <legend id="identity_legend">Identity</legend>
206 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
208 [% IF mandatory.defined('title') %]
209 <label for="borrower_title" class="required">
211 <label for="borrower_title">
215 <select id="borrower_title" name="borrower_title">
216 <option value=""></option>
217 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
218 [% IF mt == borrower.title %]
219 <option value="[% mt %]" selected="selected">[% mt %]</option>
221 <option value="[% mt %]">[% mt %]</option>
228 [% UNLESS hidden.defined('surname') %]
230 [% IF mandatory.defined('surname') %]
231 <label for="borrower_surname" class="required">
233 <label for="borrower_surname">
237 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
238 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
242 [% UNLESS hidden.defined('firstname') %]
244 [% IF mandatory.defined('firstname') %]
245 <label for="borrower_firstname" class="required">
247 <label for="borrower_firstname">
251 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
252 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
256 [% UNLESS hidden.defined('dateofbirth') %]
258 [% IF mandatory.defined('dateofbirth') %]
259 <label for="borrower_dateofbirth" class="required">
261 <label for="borrower_dateofbirth">
263 Date of birth:</label>
265 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
267 [% UNLESS action == 'edit' && !OPACPatronDetails %]
268 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
269 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a>
273 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
277 [% UNLESS hidden.defined('initials') %]
279 [% IF mandatory.defined('initials') %]
280 <label for="borrower_initials" class="required">
282 <label for="borrower_initials">
286 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
287 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
291 [% UNLESS hidden.defined('othernames') %]
293 [% IF mandatory.defined('othernames') %]
294 <label for="borrower_othernames" class="required">
296 <label for="borrower_othernames">
300 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
301 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
305 [% UNLESS hidden.defined('sex') %]
307 <label for="sex-female" class="radio inline">Female:</label>
308 [% IF borrower.sex == 'F' %]
309 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
311 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
314 <label for="sex-male" class="radio inline">Male:</label>
315 [% IF borrower.sex == 'M' %]
316 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
318 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
321 <label for="sex-none" class="radio inline">None specified: </label>
322 [% IF borrower.sex == '' %]
323 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
325 <input type="radio" name="borrower_sex" id="sex-none" value="" />
328 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
334 [% IF ( display_patron_image ) %]
336 <p class="patronimage">
337 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
342 [% END # /UNLESS fields hidden %]
345 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
346 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
347 hidden.defined('country')
349 <fieldset class="rows" id="memberentry_mainaddress">
350 <legend id="mainaddress_legend">Main address</legend>
353 [% UNLESS hidden.defined('streetnumber') %]
355 [% IF mandatory.defined('streetnumber') %]
356 <label for="borrower_streetnumber" class="required">
358 <label for="borrower_streetnumber">
360 Street number:</label>
362 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
363 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
367 [% UNLESS hidden.defined('address') %]
369 [% IF mandatory.defined('address') %]
370 <label for="borrower_address" class="required">
372 <label for="borrower_address">
376 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
377 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
381 [% UNLESS hidden.defined('address2') %]
383 [% IF mandatory.defined('address2') %]
384 <label for="borrower_address2" class="required">
386 <label for="borrower_address2">
390 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
391 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
395 [% UNLESS hidden.defined('city') %]
397 [% IF mandatory.defined('city') %]
398 <label for="borrower_city" class="required">
400 <label for="borrower_city">
404 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
405 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
409 [% UNLESS hidden.defined('state') %]
411 [% IF mandatory.defined('state') %]
412 <label for="borrower_state" class="required">
414 <label for="borrower_state">
418 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
419 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
423 [% UNLESS hidden.defined('zipcode') %]
425 [% IF mandatory.defined('zipcode') %]
426 <label for="borrower_zipcode" class="required">
428 <label for="borrower_zipcode">
430 ZIP/Postal code:</label>
432 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
433 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
437 [% UNLESS hidden.defined('country') %]
439 [% IF mandatory.defined('country') %]
440 <label for="borrower_country" class="required">
442 <label for="borrower_country">
446 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
447 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
456 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
457 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
459 <fieldset class="rows" id="memberentry_contact">
460 <legend id="contact_legend">Contact information</legend>
463 [% UNLESS hidden.defined('phone') %]
465 [% IF mandatory.defined('phone') %]
466 <label for="borrower_phone" class="required">
468 <label for="borrower_phone">
470 Primary phone:</label>
472 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
473 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
477 [% UNLESS hidden.defined('phonepro') %]
479 [% IF mandatory.defined('phonepro') %]
480 <label for="borrower_phonepro" class="required">
482 <label for="borrower_phonepro">
484 Secondary phone:</label>
486 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
487 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
491 [% UNLESS hidden.defined('mobile') %]
493 [% IF mandatory.defined('mobile') %]
494 <label for="borrower_mobile" class="required">
496 <label for="borrower_mobile">
500 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
501 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
505 [% UNLESS hidden.defined('email') %]
507 [% IF mandatory.defined('email') %]
508 <label for="borrower_email" class="required">
510 <label for="borrower_email">
512 Primary email:</label>
514 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
515 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
519 [% UNLESS hidden.defined('emailpro') %]
521 [% IF mandatory.defined('emailpro') %]
522 <label for="borrower_emailpro" class="required">
524 <label for="borrower_emailpro">
526 Secondary email:</label>
528 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
529 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
533 [% UNLESS hidden.defined('fax') %]
535 [% IF mandatory.defined('fax') %]
536 <label for="borrower_fax" class="required">
538 <label for="borrower_fax">
542 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
543 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
551 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
552 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') &&
553 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
555 <fieldset class="rows" id="memberentry_alternateaddress">
556 <legend id="alternateaddress_legend">Alternate address</legend>
559 [% UNLESS hidden.defined('B_address') %]
561 [% IF mandatory.defined('B_address') %]
562 <label for="borrower_B_address" class="required">
564 <label for="borrower_B_address">
568 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
569 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
573 [% UNLESS hidden.defined('B_address2') %]
575 [% IF mandatory.defined('B_address2') %]
576 <label for="borrower_B_address2" class="required">
578 <label for="borrower_B_address2">
582 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
583 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
587 [% UNLESS hidden.defined('B_city') %]
589 [% IF mandatory.defined('B_city') %]
590 <label for="borrower_B_city" class="required">
592 <label for="borrower_B_city">
596 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
597 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
601 [% UNLESS hidden.defined('B_state') %]
603 [% IF mandatory.defined('B_state') %]
604 <label for="borrower_B_state" class="required">
606 <label for="borrower_B_state">
610 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
611 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
615 [% UNLESS hidden.defined('B_zipcode') %]
617 [% IF mandatory.defined('B_zipcode') %]
618 <label for="borrower_B_zipcode" class="required">
620 <label for="borrower_B_zipcode">
622 ZIP/Postal code:</label>
624 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
625 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
629 [% UNLESS hidden.defined('B_country') %]
631 [% IF mandatory.defined('B_country') %]
632 <label for="borrower_B_country" class="required">
634 <label for="borrower_B_country">
638 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
639 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
643 [% UNLESS hidden.defined('B_phone') %]
645 [% IF mandatory.defined('B_phone') %]
646 <label for="borrower_B_phone" class="required">
648 <label for="borrower_B_phone">
652 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
653 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
657 [% UNLESS hidden.defined('B_email') %]
659 [% IF mandatory.defined('B_email') %]
660 <label for="borrower_B_email" class="required">
662 <label for="borrower_B_email">
666 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
667 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
671 [% UNLESS hidden.defined('contactnote') %]
673 [% IF mandatory.defined('contactnote') %]
674 <label for="borrower_contactnote" class="required">
676 <label for="borrower_contactnote">
678 Contact note:</label>
680 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
681 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
690 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
691 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
692 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
694 <fieldset class="rows" id="memberentry_alternatecontact">
695 <legend id="alternatecontact_legend">Alternate contact</legend>
698 [% UNLESS hidden.defined('altcontactsurname') %]
700 [% IF mandatory.defined('altcontactsurname') %]
701 <label for="borrower_altcontactsurname" class="required">
703 <label for="borrower_altcontactsurname">
707 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
708 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
712 [% UNLESS hidden.defined('altcontactfirstname') %]
714 [% IF mandatory.defined('altcontactfirstname') %]
715 <label for="borrower_altcontactfirstname" class="required">
717 <label for="borrower_altcontactfirstname">
721 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
722 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
726 [% UNLESS hidden.defined('altcontactaddress1') %]
728 [% IF mandatory.defined('altcontactaddress1') %]
729 <label for="borrower_altcontactaddress1" class="required">
731 <label for="borrower_altcontactaddress1">
735 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
736 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
740 [% UNLESS hidden.defined('altcontactaddress2') %]
742 [% IF mandatory.defined('altcontactaddress2') %]
743 <label for="borrower_altcontactaddress2" class="required">
745 <label for="borrower_altcontactaddress2">
749 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
750 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
754 [% UNLESS hidden.defined('altcontactaddress3') %]
756 [% IF mandatory.defined('altcontactaddress3') %]
757 <label for="borrower_altcontactaddress3" class="required">
759 <label for="borrower_altcontactaddress3">
763 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
764 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
768 [% UNLESS hidden.defined('altcontactstate') %]
770 [% IF mandatory.defined('altcontactstate') %]
771 <label for="borrower_altcontactstate" class="required">
773 <label for="borrower_altcontactstate">
777 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
778 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
782 [% UNLESS hidden.defined('altcontactzipcode') %]
784 [% IF mandatory.defined('altcontactzipcode') %]
785 <label for="borrower_altcontactzipcode" class="required">
787 <label for="borrower_altcontactzipcode">
789 ZIP/Postal code:</label>
791 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
792 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
796 [% UNLESS hidden.defined('altcontactcountry') %]
798 [% IF mandatory.defined('altcontactcountry') %]
799 <label for="borrower_altcontactcountry" class="required">
801 <label for="borrower_altcontactcountry">
805 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
806 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
810 [% UNLESS hidden.defined('altcontactphone') %]
812 [% IF mandatory.defined('altcontactphone') %]
813 <label for="borrower_altcontactphone" class="required">
815 <label for="borrower_altcontactphone">
819 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
820 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
827 [% UNLESS action == 'edit' || hidden.defined('password') %]
828 <fieldset class="rows" id="memberentry_password">
829 <legend id="contact_legend">Password</legend>
830 [% IF Koha.Preference('minPasswordLength') || !mandatory.defined('password') %]
831 <div class="alert alert-info">
832 [% IF Koha.Preference('minPasswordLength') %]
833 <p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
835 [% UNLESS mandatory.defined('password') %]
836 If you do not enter a password a system generated password will be created.
841 [% IF mandatory.defined('password') %]
843 <li><label for="borrower_password" class="required">Password</label>
844 <input type="text" name="borrower_password" id="password" />
845 <span class="required">Required</span>
847 <li><label for="borrower_password2" class="required">Confirm password</label>
848 <input type="text" name="borrower_password2" id="password2" />
849 <span class="required">Required</span>
854 <li><label for="borrower_password">Password</label>
855 <input type="text" name="borrower_password" id="password" />
857 <li><label for="borrower_password2">Confirm password</label>
858 <input type="text" name="borrower_password2" id="password2" />
865 [% UNLESS action == 'edit' %]
866 <fieldset class="rows" id="memberentry_captcha">
870 <label for="captcha" class="required">Verification:</label>
872 <input type="text" name="captcha" id="captcha" />
873 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
875 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
881 [% IF ( borrower.ExtendedPatronAttributes ) %]
882 <fieldset class="rows">
883 <legend>Additional information</legend>
885 [% FOREACH patron_attribute IN borrower.patron_attributes %]
887 <label>[% patron_attribute.description %]:</label>
888 [% IF ( patron_attribute.value_description ) %]
889 [% patron_attribute.value_description %]
891 [% patron_attribute.value |html_line_break %]
899 [% IF action == 'edit' %]
900 [% IF OPACPatronDetails %]
901 <fieldset class="action">
902 <input type="hidden" name="action" value="update" />
903 <input type="submit" class="btn" value="Submit update request" />
907 <fieldset class="action">
908 <input type="hidden" name="action" value="create" />
909 <input type="submit" class="btn" value="Submit" />
915 </div><!--/div id="update-account" -->
921 [% INCLUDE 'opac-bottom.inc' %]
922 [% BLOCK jsinclude %]
923 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min.js"></script>
924 <script type="text/javascript">
926 $(document).ready(function() {
927 [% IF action == 'edit' && !OPACPatronDetails %]
928 $("#memberentry-form :input").attr('readonly', true);
929 $("#borrower_branchcode").attr('disabled',true);
930 $("#borrower_title").attr('disabled',true);
931 $('#memberentry-form :radio').attr('disabled',true);
932 $('span.required').remove();
933 $('label.required').removeClass('required');
935 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
938 $("#memberentry-form").validate({
950 submitHandler: function(form) {
951 if (form.beenSubmitted) {
955 form.beenSubmitted = true;
959 errorPlacement: function(error, element) {
960 offset = element.offset();
961 error.insertAfter(element)
962 error.addClass('error'); // add a class to the wrapper
963 error.css('position', 'absolute');
964 error.css('left', offset.left + element.outerWidth() + 10);
965 error.css('top', offset.top);
966 error.css('width', 'auto');
970 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
971 $('#update_privacy_guarantor_checkouts').click( function() {
972 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
973 .done(function( data ) {
975 if ( data.success ) {
976 message = _("Your setting has been updated!");
978 message = _("Unable to update your setting!");
981 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
988 [% INCLUDE 'calendar.inc' %]