5 [% SET userupdateview = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
13 [% IF action == 'edit' %]
14 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
16 <body id="opac-patron-registration" class="opac">
18 [% INCLUDE 'masthead.inc' %]
21 <ul class="breadcrumb">
22 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
23 [% IF action == 'edit' %]
24 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
25 <li><a href="#">Your personal details</a></li>
27 <li><a href="#">Register a new account</a></li>
31 <div class="container-fluid">
32 <div class="row-fluid">
35 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
39 [% IF action == 'edit' %]
40 <div id="update-account">
42 <div id="add-account">
45 [% IF action == 'edit' %]
46 [% UNLESS OPACPatronDetails %]
47 <div class="alert alert-info">To make changes to your record please contact the library.</div>
50 <div class="alert alert-error">No changes were made.</div>
54 [% IF empty_mandatory_fields %]
55 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
58 [% IF invalid_form_fields %]
59 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
61 [% FOREACH field IN invalid_form_fields %]
62 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
63 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
64 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
65 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
66 [% IF field == "password_invalid" %]<li>Password does not meet minimum requirements! <a href="#password">password</a></li>[% END %]
67 [% IF field == "password_spaces" %]<li>Password contains leading and/or trailing spaces! <a href="#password">password</a></li>[% END %]
70 Please correct the errors and resubmit.
74 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
75 <div class="alert alert-error">
76 [% IF cardnumber_wrong_length %]
77 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
78 [% ELSIF cardnumber_already_exists %]
79 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
81 Please correct this and resubmit.
85 [% IF failed_captcha %]
86 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
89 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
90 <fieldset class="rows" id="memberentry_privacy">
91 <legend id="privacy_legend">Privacy</legend>
94 <label>Allow your guarantor to view your current checkouts?</label>
95 <select id="privacy_guarantor_checkouts">
96 <option value="0">No</option>
97 [% IF borrower.privacy_guarantor_checkouts %]
98 <option value="1" selected="selected">Yes</option>
100 <option value="1">Yes</option>
104 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
105 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
108 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
115 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
118 ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) &&
119 hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode')
121 <fieldset class="rows" id="memberentry_library">
123 <legend id="library_legend">Library</legend>
125 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
127 [% IF mandatory.defined('cardnumber') %]
128 <label for="borrower_cardnumber" class="required">
130 <label for="borrower_cardnumber">
135 [% borrower.cardnumber %]
137 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" value="[% borrower.cardnumber %]" />
138 [% IF mandatory.defined('cardnumber') %]<span class="required">Required</span>[% END %]
143 [% UNLESS hidden.defined('dateexpiry') %]
145 <label>Expiration date:</label>
146 [% borrower.dateexpiry | $KohaDates %]
150 [% UNLESS hidden.defined('branchcode') %]
152 [% IF mandatory.defined('branchcode') %]
153 <label for="borrower_branchcode" class="required">
155 <label for="borrower_branchcode">
157 Home library:</label>
159 <select id="borrower_branchcode" name="borrower_branchcode">
160 [% PROCESS options_for_libraries libraries => Branches.all( selected => borrower.branchcode ) %]
165 [% UNLESS hidden.defined('categorycode') %]
167 <label for="borrower_categorycode">
171 [% Categories.GetName( borrower.categorycode ) %]
172 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode %]" />
174 <select id="borrower_categorycode" name="borrower_categorycode">
175 [% FOREACH c IN Categories.all() %]
176 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
177 <option value="[% c.categorycode %]" selected="selected">[% c.description %]</option>
179 <option value="[% c.categorycode %]">[% c.description %]</option>
188 [% END # / defined 'branchcode' %]
191 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
192 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
193 hidden.defined('sex')
195 <div class="row-fluid">
196 [% IF ( display_patron_image ) %]
201 <fieldset class="rows" id="memberentry_identity">
202 <legend id="identity_legend">Identity</legend>
205 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
207 [% IF mandatory.defined('title') %]
208 <label for="borrower_title" class="required">
210 <label for="borrower_title">
214 <select id="borrower_title" name="borrower_title">
215 <option value=""></option>
216 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
217 [% IF mt == borrower.title %]
218 <option value="[% mt %]" selected="selected">[% mt %]</option>
220 <option value="[% mt %]">[% mt %]</option>
227 [% UNLESS hidden.defined('surname') %]
229 [% IF mandatory.defined('surname') %]
230 <label for="borrower_surname" class="required">
232 <label for="borrower_surname">
236 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
237 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
241 [% UNLESS hidden.defined('firstname') %]
243 [% IF mandatory.defined('firstname') %]
244 <label for="borrower_firstname" class="required">
246 <label for="borrower_firstname">
250 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
251 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
255 [% UNLESS hidden.defined('dateofbirth') %]
257 [% IF mandatory.defined('dateofbirth') %]
258 <label for="borrower_dateofbirth" class="required">
260 <label for="borrower_dateofbirth">
262 Date of birth:</label>
264 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
266 [% UNLESS action == 'edit' && !OPACPatronDetails %]
267 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
268 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
272 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
276 [% UNLESS hidden.defined('initials') %]
278 [% IF mandatory.defined('initials') %]
279 <label for="borrower_initials" class="required">
281 <label for="borrower_initials">
285 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
286 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
290 [% UNLESS hidden.defined('othernames') %]
292 [% IF mandatory.defined('othernames') %]
293 <label for="borrower_othernames" class="required">
295 <label for="borrower_othernames">
299 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
300 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
304 [% UNLESS hidden.defined('sex') %]
306 <label for="sex-female" class="radio inline">Female:</label>
307 [% IF borrower.sex == 'F' %]
308 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
310 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
313 <label for="sex-male" class="radio inline">Male:</label>
314 [% IF borrower.sex == 'M' %]
315 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
317 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
320 <label for="sex-none" class="radio inline">None specified: </label>
321 [% IF borrower.sex == '' %]
322 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
324 <input type="radio" name="borrower_sex" id="sex-none" value="" />
327 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
333 [% IF ( display_patron_image ) %]
335 <p class="patronimage">
336 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
341 [% END # /UNLESS fields hidden %]
344 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
345 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
346 hidden.defined('country')
348 <fieldset class="rows" id="memberentry_mainaddress">
349 <legend id="mainaddress_legend">Main address</legend>
352 [% UNLESS hidden.defined('streetnumber') %]
354 [% IF mandatory.defined('streetnumber') %]
355 <label for="borrower_streetnumber" class="required">
357 <label for="borrower_streetnumber">
359 Street number:</label>
361 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
362 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
366 [% UNLESS hidden.defined('address') %]
368 [% IF mandatory.defined('address') %]
369 <label for="borrower_address" class="required">
371 <label for="borrower_address">
375 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
376 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
380 [% UNLESS hidden.defined('address2') %]
382 [% IF mandatory.defined('address2') %]
383 <label for="borrower_address2" class="required">
385 <label for="borrower_address2">
389 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
390 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
394 [% UNLESS hidden.defined('city') %]
396 [% IF mandatory.defined('city') %]
397 <label for="borrower_city" class="required">
399 <label for="borrower_city">
403 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
404 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
408 [% UNLESS hidden.defined('state') %]
410 [% IF mandatory.defined('state') %]
411 <label for="borrower_state" class="required">
413 <label for="borrower_state">
417 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
418 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
422 [% UNLESS hidden.defined('zipcode') %]
424 [% IF mandatory.defined('zipcode') %]
425 <label for="borrower_zipcode" class="required">
427 <label for="borrower_zipcode">
429 ZIP/Postal code:</label>
431 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
432 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
436 [% UNLESS hidden.defined('country') %]
438 [% IF mandatory.defined('country') %]
439 <label for="borrower_country" class="required">
441 <label for="borrower_country">
445 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
446 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
455 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
456 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
458 <fieldset class="rows" id="memberentry_contact">
459 <legend id="contact_legend">Contact information</legend>
462 [% UNLESS hidden.defined('phone') %]
464 [% IF mandatory.defined('phone') %]
465 <label for="borrower_phone" class="required">
467 <label for="borrower_phone">
469 Primary phone:</label>
471 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
472 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
476 [% UNLESS hidden.defined('phonepro') %]
478 [% IF mandatory.defined('phonepro') %]
479 <label for="borrower_phonepro" class="required">
481 <label for="borrower_phonepro">
483 Secondary phone:</label>
485 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
486 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
490 [% UNLESS hidden.defined('mobile') %]
492 [% IF mandatory.defined('mobile') %]
493 <label for="borrower_mobile" class="required">
495 <label for="borrower_mobile">
499 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
500 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
504 [% UNLESS hidden.defined('email') %]
506 [% IF mandatory.defined('email') %]
507 <label for="borrower_email" class="required">
509 <label for="borrower_email">
511 Primary email:</label>
513 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
514 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
518 [% UNLESS hidden.defined('emailpro') %]
520 [% IF mandatory.defined('emailpro') %]
521 <label for="borrower_emailpro" class="required">
523 <label for="borrower_emailpro">
525 Secondary email:</label>
527 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
528 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
532 [% UNLESS hidden.defined('fax') %]
534 [% IF mandatory.defined('fax') %]
535 <label for="borrower_fax" class="required">
537 <label for="borrower_fax">
541 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
542 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
550 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
551 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') &&
552 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
554 <fieldset class="rows" id="memberentry_alternateaddress">
555 <legend id="alternateaddress_legend">Alternate address</legend>
558 [% UNLESS hidden.defined('B_address') %]
560 [% IF mandatory.defined('B_address') %]
561 <label for="borrower_B_address" class="required">
563 <label for="borrower_B_address">
567 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
568 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
572 [% UNLESS hidden.defined('B_address2') %]
574 [% IF mandatory.defined('B_address2') %]
575 <label for="borrower_B_address2" class="required">
577 <label for="borrower_B_address2">
581 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
582 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
586 [% UNLESS hidden.defined('B_city') %]
588 [% IF mandatory.defined('B_city') %]
589 <label for="borrower_B_city" class="required">
591 <label for="borrower_B_city">
595 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
596 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
600 [% UNLESS hidden.defined('B_state') %]
602 [% IF mandatory.defined('B_state') %]
603 <label for="borrower_B_state" class="required">
605 <label for="borrower_B_state">
609 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
610 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
614 [% UNLESS hidden.defined('B_zipcode') %]
616 [% IF mandatory.defined('B_zipcode') %]
617 <label for="borrower_B_zipcode" class="required">
619 <label for="borrower_B_zipcode">
621 ZIP/Postal code:</label>
623 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
624 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
628 [% UNLESS hidden.defined('B_country') %]
630 [% IF mandatory.defined('B_country') %]
631 <label for="borrower_B_country" class="required">
633 <label for="borrower_B_country">
637 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
638 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
642 [% UNLESS hidden.defined('B_phone') %]
644 [% IF mandatory.defined('B_phone') %]
645 <label for="borrower_B_phone" class="required">
647 <label for="borrower_B_phone">
651 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
652 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
656 [% UNLESS hidden.defined('B_email') %]
658 [% IF mandatory.defined('B_email') %]
659 <label for="borrower_B_email" class="required">
661 <label for="borrower_B_email">
665 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
666 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
670 [% UNLESS hidden.defined('contactnote') %]
672 [% IF mandatory.defined('contactnote') %]
673 <label for="borrower_contactnote" class="required">
675 <label for="borrower_contactnote">
677 Contact note:</label>
679 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
680 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
689 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
690 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
691 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
693 <fieldset class="rows" id="memberentry_alternatecontact">
694 <legend id="alternatecontact_legend">Alternate contact</legend>
697 [% UNLESS hidden.defined('altcontactsurname') %]
699 [% IF mandatory.defined('altcontactsurname') %]
700 <label for="borrower_altcontactsurname" class="required">
702 <label for="borrower_altcontactsurname">
706 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
707 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
711 [% UNLESS hidden.defined('altcontactfirstname') %]
713 [% IF mandatory.defined('altcontactfirstname') %]
714 <label for="borrower_altcontactfirstname" class="required">
716 <label for="borrower_altcontactfirstname">
720 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
721 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
725 [% UNLESS hidden.defined('altcontactaddress1') %]
727 [% IF mandatory.defined('altcontactaddress1') %]
728 <label for="borrower_altcontactaddress1" class="required">
730 <label for="borrower_altcontactaddress1">
734 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
735 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
739 [% UNLESS hidden.defined('altcontactaddress2') %]
741 [% IF mandatory.defined('altcontactaddress2') %]
742 <label for="borrower_altcontactaddress2" class="required">
744 <label for="borrower_altcontactaddress2">
748 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
749 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
753 [% UNLESS hidden.defined('altcontactaddress3') %]
755 [% IF mandatory.defined('altcontactaddress3') %]
756 <label for="borrower_altcontactaddress3" class="required">
758 <label for="borrower_altcontactaddress3">
762 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
763 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
767 [% UNLESS hidden.defined('altcontactstate') %]
769 [% IF mandatory.defined('altcontactstate') %]
770 <label for="borrower_altcontactstate" class="required">
772 <label for="borrower_altcontactstate">
776 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
777 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
781 [% UNLESS hidden.defined('altcontactzipcode') %]
783 [% IF mandatory.defined('altcontactzipcode') %]
784 <label for="borrower_altcontactzipcode" class="required">
786 <label for="borrower_altcontactzipcode">
788 ZIP/Postal code:</label>
790 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
791 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
795 [% UNLESS hidden.defined('altcontactcountry') %]
797 [% IF mandatory.defined('altcontactcountry') %]
798 <label for="borrower_altcontactcountry" class="required">
800 <label for="borrower_altcontactcountry">
804 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
805 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
809 [% UNLESS hidden.defined('altcontactphone') %]
811 [% IF mandatory.defined('altcontactphone') %]
812 <label for="borrower_altcontactphone" class="required">
814 <label for="borrower_altcontactphone">
818 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
819 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
826 [% UNLESS action == 'edit' || hidden.defined('password') %]
827 <fieldset class="rows" id="memberentry_password">
828 <legend id="contact_legend">Password</legend>
829 [% IF Koha.Preference('minPasswordLength') || !mandatory.defined('password') %]
830 <div class="alert alert-info">
831 [% IF Koha.Preference('minPasswordLength') %]
832 <p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
834 [% UNLESS mandatory.defined('password') %]
835 If you do not enter a password a system generated password will be created.
840 [% IF mandatory.defined('password') %]
842 <li><label for="borrower_password" class="required">Password</label>
843 <input type="text" name="borrower_password" id="password" />
844 <span class="required">Required</span>
846 <li><label for="borrower_password2" class="required">Confirm password</label>
847 <input type="text" name="borrower_password2" id="password2" />
848 <span class="required">Required</span>
853 <li><label for="borrower_password">Password</label>
854 <input type="text" name="borrower_password" id="password" />
856 <li><label for="borrower_password2">Confirm password</label>
857 <input type="text" name="borrower_password2" id="password2" />
864 [% UNLESS action == 'edit' %]
865 <fieldset class="rows" id="memberentry_captcha">
869 <label for="captcha" class="required">Verification:</label>
871 <input type="text" name="captcha" id="captcha" />
872 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
874 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
880 [% IF ( borrower.ExtendedPatronAttributes ) %]
881 <fieldset class="rows">
882 <legend>Additional information</legend>
884 [% FOREACH patron_attribute IN borrower.patron_attributes %]
886 <label>[% patron_attribute.description %]:</label>
887 [% IF ( patron_attribute.value_description ) %]
888 [% patron_attribute.value_description %]
890 [% patron_attribute.value |html_line_break %]
898 [% IF action == 'edit' %]
899 [% IF OPACPatronDetails %]
900 <fieldset class="action">
901 <input type="hidden" name="action" value="update" />
902 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
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");
987 $(".cleardate").on("click", function(){
988 $('#borrower_dateofbirth').val('');
993 [% INCLUDE 'calendar.inc' %]