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 %]
68 [% IF field == "duplicate_email" %]
69 <li>This email address already exists in our database.</li>
73 Please correct the errors and resubmit.
77 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
78 <div class="alert alert-error">
79 [% IF cardnumber_wrong_length %]
80 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
81 [% ELSIF cardnumber_already_exists %]
82 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
84 Please correct this and resubmit.
88 [% IF failed_captcha %]
89 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
92 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
93 <fieldset class="rows" id="memberentry_privacy">
94 <legend id="privacy_legend">Privacy</legend>
97 <label>Allow your guarantor to view your current checkouts?</label>
98 <select id="privacy_guarantor_checkouts">
99 <option value="0">No</option>
100 [% IF borrower.privacy_guarantor_checkouts %]
101 <option value="1" selected="selected">Yes</option>
103 <option value="1">Yes</option>
107 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
108 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
111 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
118 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
121 ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) &&
122 hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode')
124 <fieldset class="rows" id="memberentry_library">
126 <legend id="library_legend">Library</legend>
128 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
130 [% IF mandatory.defined('cardnumber') %]
131 <label for="borrower_cardnumber" class="required">
133 <label for="borrower_cardnumber">
138 [% borrower.cardnumber %]
140 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" value="[% borrower.cardnumber %]" />
141 [% IF mandatory.defined('cardnumber') %]<span class="required">Required</span>[% END %]
146 [% UNLESS hidden.defined('dateexpiry') %]
148 <label>Expiration date:</label>
149 [% borrower.dateexpiry | $KohaDates %]
153 [% UNLESS hidden.defined('branchcode') %]
155 [% IF mandatory.defined('branchcode') %]
156 <label for="borrower_branchcode" class="required">
158 <label for="borrower_branchcode">
160 Home library:</label>
162 <select id="borrower_branchcode" name="borrower_branchcode">
163 [% FOREACH l IN libraries %]
164 [% IF l.branchcode == borrower.branchcode %]
165 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
167 <option value="[% l.branchcode | html %]">[% l.branchname %]</option>
174 [% UNLESS hidden.defined('categorycode') %]
176 <label for="borrower_categorycode">
180 [% Categories.GetName( borrower.categorycode ) %]
181 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode %]" />
183 <select id="borrower_categorycode" name="borrower_categorycode">
184 [% FOREACH c IN Categories.all() %]
185 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
186 <option value="[% c.categorycode %]" selected="selected">[% c.description %]</option>
188 <option value="[% c.categorycode %]">[% c.description %]</option>
197 [% END # / defined 'branchcode' %]
200 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
201 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
202 hidden.defined('sex')
204 <div class="row-fluid">
205 [% IF ( display_patron_image ) %]
210 <fieldset class="rows" id="memberentry_identity">
211 <legend id="identity_legend">Identity</legend>
214 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
216 [% IF mandatory.defined('title') %]
217 <label for="borrower_title" class="required">
219 <label for="borrower_title">
223 <select id="borrower_title" name="borrower_title">
224 <option value=""></option>
225 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
226 [% IF mt == borrower.title %]
227 <option value="[% mt %]" selected="selected">[% mt %]</option>
229 <option value="[% mt %]">[% mt %]</option>
236 [% UNLESS hidden.defined('surname') %]
238 [% IF mandatory.defined('surname') %]
239 <label for="borrower_surname" class="required">
241 <label for="borrower_surname">
245 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
246 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
250 [% UNLESS hidden.defined('firstname') %]
252 [% IF mandatory.defined('firstname') %]
253 <label for="borrower_firstname" class="required">
255 <label for="borrower_firstname">
259 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
260 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
264 [% UNLESS hidden.defined('dateofbirth') %]
266 [% IF mandatory.defined('dateofbirth') %]
267 <label for="borrower_dateofbirth" class="required">
269 <label for="borrower_dateofbirth">
271 Date of birth:</label>
273 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
275 [% UNLESS action == 'edit' && !OPACPatronDetails %]
276 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
277 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
281 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
285 [% UNLESS hidden.defined('initials') %]
287 [% IF mandatory.defined('initials') %]
288 <label for="borrower_initials" class="required">
290 <label for="borrower_initials">
294 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
295 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
299 [% UNLESS hidden.defined('othernames') %]
301 [% IF mandatory.defined('othernames') %]
302 <label for="borrower_othernames" class="required">
304 <label for="borrower_othernames">
308 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
309 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
313 [% UNLESS hidden.defined('sex') %]
315 <label for="sex-female" class="radio inline">Female:</label>
316 [% IF borrower.sex == 'F' %]
317 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
319 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
322 <label for="sex-male" class="radio inline">Male:</label>
323 [% IF borrower.sex == 'M' %]
324 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
326 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
329 <label for="sex-none" class="radio inline">None specified: </label>
330 [% IF borrower.sex == '' %]
331 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
333 <input type="radio" name="borrower_sex" id="sex-none" value="" />
336 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
342 [% IF ( display_patron_image ) %]
344 <p class="patronimage">
345 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
350 [% END # /UNLESS fields hidden %]
353 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
354 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
355 hidden.defined('country')
357 <fieldset class="rows" id="memberentry_mainaddress">
358 <legend id="mainaddress_legend">Main address</legend>
361 [% UNLESS hidden.defined('streetnumber') %]
363 [% IF mandatory.defined('streetnumber') %]
364 <label for="borrower_streetnumber" class="required">
366 <label for="borrower_streetnumber">
368 Street number:</label>
370 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
371 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
375 [% UNLESS hidden.defined('address') %]
377 [% IF mandatory.defined('address') %]
378 <label for="borrower_address" class="required">
380 <label for="borrower_address">
384 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
385 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
389 [% UNLESS hidden.defined('address2') %]
391 [% IF mandatory.defined('address2') %]
392 <label for="borrower_address2" class="required">
394 <label for="borrower_address2">
398 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
399 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
403 [% UNLESS hidden.defined('city') %]
405 [% IF mandatory.defined('city') %]
406 <label for="borrower_city" class="required">
408 <label for="borrower_city">
412 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
413 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
417 [% UNLESS hidden.defined('state') %]
419 [% IF mandatory.defined('state') %]
420 <label for="borrower_state" class="required">
422 <label for="borrower_state">
426 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
427 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
431 [% UNLESS hidden.defined('zipcode') %]
433 [% IF mandatory.defined('zipcode') %]
434 <label for="borrower_zipcode" class="required">
436 <label for="borrower_zipcode">
438 ZIP/Postal code:</label>
440 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
441 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
445 [% UNLESS hidden.defined('country') %]
447 [% IF mandatory.defined('country') %]
448 <label for="borrower_country" class="required">
450 <label for="borrower_country">
454 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
455 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
464 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
465 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
467 <fieldset class="rows" id="memberentry_contact">
468 <legend id="contact_legend">Contact information</legend>
471 [% UNLESS hidden.defined('phone') %]
473 [% IF mandatory.defined('phone') %]
474 <label for="borrower_phone" class="required">
476 <label for="borrower_phone">
478 Primary phone:</label>
480 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
481 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
485 [% UNLESS hidden.defined('phonepro') %]
487 [% IF mandatory.defined('phonepro') %]
488 <label for="borrower_phonepro" class="required">
490 <label for="borrower_phonepro">
492 Secondary phone:</label>
494 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
495 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
499 [% UNLESS hidden.defined('mobile') %]
501 [% IF mandatory.defined('mobile') %]
502 <label for="borrower_mobile" class="required">
504 <label for="borrower_mobile">
508 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
509 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
513 [% UNLESS hidden.defined('email') %]
515 [% IF mandatory.defined('email') %]
516 <label for="borrower_email" class="required">
518 <label for="borrower_email">
520 Primary email:</label>
522 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
523 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
527 [% UNLESS hidden.defined('emailpro') %]
529 [% IF mandatory.defined('emailpro') %]
530 <label for="borrower_emailpro" class="required">
532 <label for="borrower_emailpro">
534 Secondary email:</label>
536 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
537 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
541 [% UNLESS hidden.defined('fax') %]
543 [% IF mandatory.defined('fax') %]
544 <label for="borrower_fax" class="required">
546 <label for="borrower_fax">
550 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
551 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
559 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
560 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') &&
561 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
563 <fieldset class="rows" id="memberentry_alternateaddress">
564 <legend id="alternateaddress_legend">Alternate address</legend>
567 [% UNLESS hidden.defined('B_address') %]
569 [% IF mandatory.defined('B_address') %]
570 <label for="borrower_B_address" class="required">
572 <label for="borrower_B_address">
576 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
577 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
581 [% UNLESS hidden.defined('B_address2') %]
583 [% IF mandatory.defined('B_address2') %]
584 <label for="borrower_B_address2" class="required">
586 <label for="borrower_B_address2">
590 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
591 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
595 [% UNLESS hidden.defined('B_city') %]
597 [% IF mandatory.defined('B_city') %]
598 <label for="borrower_B_city" class="required">
600 <label for="borrower_B_city">
604 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
605 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
609 [% UNLESS hidden.defined('B_state') %]
611 [% IF mandatory.defined('B_state') %]
612 <label for="borrower_B_state" class="required">
614 <label for="borrower_B_state">
618 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
619 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
623 [% UNLESS hidden.defined('B_zipcode') %]
625 [% IF mandatory.defined('B_zipcode') %]
626 <label for="borrower_B_zipcode" class="required">
628 <label for="borrower_B_zipcode">
630 ZIP/Postal code:</label>
632 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
633 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
637 [% UNLESS hidden.defined('B_country') %]
639 [% IF mandatory.defined('B_country') %]
640 <label for="borrower_B_country" class="required">
642 <label for="borrower_B_country">
646 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
647 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
651 [% UNLESS hidden.defined('B_phone') %]
653 [% IF mandatory.defined('B_phone') %]
654 <label for="borrower_B_phone" class="required">
656 <label for="borrower_B_phone">
660 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
661 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
665 [% UNLESS hidden.defined('B_email') %]
667 [% IF mandatory.defined('B_email') %]
668 <label for="borrower_B_email" class="required">
670 <label for="borrower_B_email">
674 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
675 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
679 [% UNLESS hidden.defined('contactnote') %]
681 [% IF mandatory.defined('contactnote') %]
682 <label for="borrower_contactnote" class="required">
684 <label for="borrower_contactnote">
686 Contact note:</label>
688 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
689 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
698 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
699 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
700 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
702 <fieldset class="rows" id="memberentry_alternatecontact">
703 <legend id="alternatecontact_legend">Alternate contact</legend>
706 [% UNLESS hidden.defined('altcontactsurname') %]
708 [% IF mandatory.defined('altcontactsurname') %]
709 <label for="borrower_altcontactsurname" class="required">
711 <label for="borrower_altcontactsurname">
715 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
716 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
720 [% UNLESS hidden.defined('altcontactfirstname') %]
722 [% IF mandatory.defined('altcontactfirstname') %]
723 <label for="borrower_altcontactfirstname" class="required">
725 <label for="borrower_altcontactfirstname">
729 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
730 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
734 [% UNLESS hidden.defined('altcontactaddress1') %]
736 [% IF mandatory.defined('altcontactaddress1') %]
737 <label for="borrower_altcontactaddress1" class="required">
739 <label for="borrower_altcontactaddress1">
743 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
744 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
748 [% UNLESS hidden.defined('altcontactaddress2') %]
750 [% IF mandatory.defined('altcontactaddress2') %]
751 <label for="borrower_altcontactaddress2" class="required">
753 <label for="borrower_altcontactaddress2">
757 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
758 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
762 [% UNLESS hidden.defined('altcontactaddress3') %]
764 [% IF mandatory.defined('altcontactaddress3') %]
765 <label for="borrower_altcontactaddress3" class="required">
767 <label for="borrower_altcontactaddress3">
771 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
772 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
776 [% UNLESS hidden.defined('altcontactstate') %]
778 [% IF mandatory.defined('altcontactstate') %]
779 <label for="borrower_altcontactstate" class="required">
781 <label for="borrower_altcontactstate">
785 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
786 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
790 [% UNLESS hidden.defined('altcontactzipcode') %]
792 [% IF mandatory.defined('altcontactzipcode') %]
793 <label for="borrower_altcontactzipcode" class="required">
795 <label for="borrower_altcontactzipcode">
797 ZIP/Postal code:</label>
799 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
800 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
804 [% UNLESS hidden.defined('altcontactcountry') %]
806 [% IF mandatory.defined('altcontactcountry') %]
807 <label for="borrower_altcontactcountry" class="required">
809 <label for="borrower_altcontactcountry">
813 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
814 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
818 [% UNLESS hidden.defined('altcontactphone') %]
820 [% IF mandatory.defined('altcontactphone') %]
821 <label for="borrower_altcontactphone" class="required">
823 <label for="borrower_altcontactphone">
827 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
828 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
835 [% UNLESS action == 'edit' || hidden.defined('password') %]
836 <fieldset class="rows" id="memberentry_password">
837 <legend id="contact_legend">Password</legend>
838 [% IF Koha.Preference('minPasswordLength') || !mandatory.defined('password') %]
839 <div class="alert alert-info">
840 [% IF Koha.Preference('minPasswordLength') %]
841 <p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
843 [% UNLESS mandatory.defined('password') %]
844 If you do not enter a password a system generated password will be created.
849 [% IF mandatory.defined('password') %]
851 <li><label for="borrower_password" class="required">Password</label>
852 <input type="text" name="borrower_password" id="password" />
853 <span class="required">Required</span>
855 <li><label for="borrower_password2" class="required">Confirm password</label>
856 <input type="text" name="borrower_password2" id="password2" />
857 <span class="required">Required</span>
862 <li><label for="borrower_password">Password</label>
863 <input type="text" name="borrower_password" id="password" />
865 <li><label for="borrower_password2">Confirm password</label>
866 <input type="text" name="borrower_password2" id="password2" />
873 [% UNLESS action == 'edit' %]
874 <fieldset class="rows" id="memberentry_captcha">
878 <label for="captcha" class="required">Verification:</label>
880 <input type="text" name="captcha" id="captcha" />
881 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
883 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
889 [% IF ( borrower.ExtendedPatronAttributes ) %]
890 <fieldset class="rows">
891 <legend>Additional information</legend>
893 [% FOREACH patron_attribute IN borrower.patron_attributes %]
895 <label>[% patron_attribute.description %]:</label>
896 [% IF ( patron_attribute.value_description ) %]
897 [% patron_attribute.value_description %]
899 [% patron_attribute.value |html_line_break %]
907 [% IF action == 'edit' %]
908 [% IF OPACPatronDetails %]
909 <fieldset class="action">
910 <input type="hidden" name="action" value="update" />
911 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
912 <input type="submit" class="btn" value="Submit update request" />
916 <fieldset class="action">
917 <input type="hidden" name="action" value="create" />
918 <input type="submit" class="btn" value="Submit" />
924 </div><!--/div id="update-account" -->
930 [% INCLUDE 'opac-bottom.inc' %]
931 [% BLOCK jsinclude %]
932 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min.js"></script>
933 <script type="text/javascript">
935 $(document).ready(function() {
936 [% IF action == 'edit' && !OPACPatronDetails %]
937 $("#memberentry-form :input").attr('readonly', true);
938 $("#borrower_branchcode").attr('disabled',true);
939 $("#borrower_title").attr('disabled',true);
940 $('#memberentry-form :radio').attr('disabled',true);
941 $('span.required').remove();
942 $('label.required').removeClass('required');
944 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
947 $("#memberentry-form").validate({
959 submitHandler: function(form) {
960 if (form.beenSubmitted) {
964 form.beenSubmitted = true;
968 errorPlacement: function(error, element) {
969 offset = element.offset();
970 error.insertAfter(element)
971 error.addClass('error'); // add a class to the wrapper
972 error.css('position', 'absolute');
973 error.css('left', offset.left + element.outerWidth() + 10);
974 error.css('top', offset.top);
975 error.css('width', 'auto');
979 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
980 $('#update_privacy_guarantor_checkouts').click( function() {
981 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
982 .done(function( data ) {
984 if ( data.success ) {
985 message = _("Your setting has been updated!");
987 message = _("Unable to update your setting!");
990 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
996 $(".cleardate").on("click", function(){
997 $('#borrower_dateofbirth').val('');
1002 [% INCLUDE 'calendar.inc' %]