1 [% USE AuthorisedValues %]
7 [% SET userupdateview = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% BLOCK cssinclude %][% END %]
15 [% IF action == 'edit' %]
16 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
18 <body id="opac-patron-registration" class="opac">
20 [% INCLUDE 'masthead.inc' %]
23 <ul class="breadcrumb">
24 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
25 [% IF action == 'edit' %]
26 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
27 <li><a href="#">Your personal details</a></li>
29 <li><a href="#">Register a new account</a></li>
33 <div class="container-fluid">
34 <div class="row-fluid">
37 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
41 [% IF action == 'edit' %]
42 <div id="update-account">
44 <div id="add-account">
47 [% IF action == 'edit' %]
48 [% UNLESS OPACPatronDetails %]
49 <div class="alert alert-info">To make changes to your record please contact the library.</div>
52 <div class="alert alert-error">No changes were made.</div>
56 [% IF empty_mandatory_fields %]
57 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
60 [% IF invalid_form_fields %]
61 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
63 [% FOREACH field IN invalid_form_fields %]
64 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
65 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
66 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
67 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
68 [% IF field == "password_too_short" %]
69 <li>Password must be at least [% minPasswordLength %] characters long.</li>
71 [% IF field == "password_too_weak" %]
72 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
74 [% IF field == "password_has_whitespaces" %]
75 <li>Password must not contain leading or trailing whitespaces.</li>
77 [% IF field == "duplicate_email" %]
78 <li>This email address already exists in our database.</li>
82 <span>Please correct and resubmit.</span>
86 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
87 <div class="alert alert-error">
88 [% IF cardnumber_wrong_length %]
89 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
90 [% ELSIF cardnumber_already_exists %]
91 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
93 <span>Please correct and resubmit.</span>
97 [% IF failed_captcha %]
98 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
101 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
102 <fieldset class="rows" id="memberentry_privacy">
103 <legend id="privacy_legend">Privacy</legend>
106 <label>Allow your guarantor to view your current checkouts?</label>
107 <select id="privacy_guarantor_checkouts">
108 <option value="0">No</option>
109 [% IF borrower.privacy_guarantor_checkouts %]
110 <option value="1" selected="selected">Yes</option>
112 <option value="1">Yes</option>
116 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
117 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
120 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
126 [% IF ( extended_unique_id_failed_code ) %]
127 <div class="alert" id="extended_unique_id_failed"><a href="#patron-attr-start-[% extended_unique_id_failed_code %]">[% extended_unique_id_failed_description _ ': ' %]</a> Value is already in use ([% extended_unique_id_failed_value %])</div>
130 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
132 [%# Following on one line for translatability %]
133 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
134 <fieldset class="rows" id="memberentry_library">
136 <legend id="library_legend">Library</legend>
138 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
140 [% IF mandatory.defined('cardnumber') %]
141 <label for="borrower_cardnumber" class="required">Library card number:</label>
143 <label for="borrower_cardnumber">Library card number:</label>
145 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
146 [% borrower.cardnumber %]
148 [% IF minlength_cardnumber == maxlength_cardnumber %]
149 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
150 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
151 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
152 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
153 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
154 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
155 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
156 [% ELSIF maxlength_cardnumber %]
157 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
158 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
159 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
161 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" />
162 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
163 <div class="hint">There is no minimum or maximum character length.</div>
169 [% UNLESS hidden.defined('dateexpiry') %]
171 <label>Expiration date:</label>
172 [% borrower.dateexpiry | $KohaDates %]
176 [% UNLESS hidden.defined('branchcode') %]
178 [% IF mandatory.defined('branchcode') %]
179 <label for="borrower_branchcode" class="required">Home library:</label>
181 <label for="borrower_branchcode">Home library:</label>
184 <select id="borrower_branchcode" name="borrower_branchcode">
185 [% FOREACH l IN libraries %]
186 [% IF l.branchcode == borrower.branchcode %]
187 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
189 <option value="[% l.branchcode | html %]">[% l.branchname %]</option>
196 [% UNLESS hidden.defined('categorycode') %]
198 <label for="borrower_categorycode">
202 [% Categories.GetName( borrower.categorycode ) %]
203 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode %]" />
205 <select id="borrower_categorycode" name="borrower_categorycode">
206 [% FOREACH c IN Categories.all() %]
207 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
208 <option value="[% c.categorycode %]" selected="selected">[% c.description %]</option>
210 <option value="[% c.categorycode %]">[% c.description %]</option>
219 [% END # / defined 'branchcode' %]
221 [%# Following on one line for translatability %]
222 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
223 <div class="row-fluid">
224 [% IF ( display_patron_image ) %]
229 <fieldset class="rows" id="memberentry_identity">
230 <legend id="identity_legend">Identity</legend>
233 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
235 [% IF mandatory.defined('title') %]
236 <label for="borrower_title" class="required">Salutation:</label>
238 <label for="borrower_title">Salutation:</label>
241 <select id="borrower_title" name="borrower_title">
242 <option value=""></option>
243 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
244 [% IF mt == borrower.title %]
245 <option value="[% mt %]" selected="selected">[% mt %]</option>
247 <option value="[% mt %]">[% mt %]</option>
254 [% UNLESS hidden.defined('surname') %]
256 [% IF mandatory.defined('surname') %]
257 <label for="borrower_surname" class="required">Surname:</label>
259 <label for="borrower_surname">Surname:</label>
262 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
263 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
267 [% UNLESS hidden.defined('firstname') %]
269 [% IF mandatory.defined('firstname') %]
270 <label for="borrower_firstname" class="required">First name:</label>
272 <label for="borrower_firstname">First name:</label>
275 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
276 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
280 [% UNLESS hidden.defined('dateofbirth') %]
282 [% IF mandatory.defined('dateofbirth') %]
283 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
285 <label for="borrower_dateofbirth">Date of birth:</label>
288 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
290 [% UNLESS action == 'edit' && !OPACPatronDetails %]
291 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
292 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
296 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
300 [% UNLESS hidden.defined('initials') %]
302 [% IF mandatory.defined('initials') %]
303 <label for="borrower_initials" class="required">Initials:</label>
305 <label for="borrower_initials">Initials:</label>
308 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
309 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
313 [% UNLESS hidden.defined('othernames') %]
315 [% IF mandatory.defined('othernames') %]
316 <label for="borrower_othernames" class="required">Other names:</label>
318 <label for="borrower_othernames">Other names:</label>
321 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
322 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
326 [% UNLESS hidden.defined('sex') %]
328 <label for="sex-female" class="radio inline">Female:</label>
329 [% IF borrower.sex == 'F' %]
330 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
332 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
335 <label for="sex-male" class="radio inline">Male:</label>
336 [% IF borrower.sex == 'M' %]
337 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
339 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
342 <label for="sex-none" class="radio inline">None specified: </label>
343 [% IF borrower.sex == '' %]
344 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
346 <input type="radio" name="borrower_sex" id="sex-none" value="" />
349 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
355 [% IF ( display_patron_image ) %]
357 <p class="patronimage">
358 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
363 [% END # /UNLESS fields hidden %]
365 [%# Following on one line for translatability %]
366 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
367 <fieldset class="rows" id="memberentry_mainaddress">
368 <legend id="mainaddress_legend">Main address</legend>
371 [% UNLESS hidden.defined('streetnumber') %]
373 [% IF mandatory.defined('streetnumber') %]
374 <label for="borrower_streetnumber" class="required">Street number:</label>
376 <label for="borrower_streetnumber">Street number:</label>
379 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
380 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
384 [% UNLESS hidden.defined('address') %]
386 [% IF mandatory.defined('address') %]
387 <label for="borrower_address" class="required">Address:</label>
389 <label for="borrower_address">Address:</label>
392 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
393 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
397 [% UNLESS hidden.defined('address2') %]
399 [% IF mandatory.defined('address2') %]
400 <label for="borrower_address2" class="required">Address 2:</label>
402 <label for="borrower_address2">Address 2:</label>
405 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
406 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
410 [% UNLESS hidden.defined('city') %]
412 [% IF mandatory.defined('city') %]
413 <label for="borrower_city" class="required">City:</label>
415 <label for="borrower_city">City:</label>
418 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
419 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
423 [% UNLESS hidden.defined('state') %]
425 [% IF mandatory.defined('state') %]
426 <label for="borrower_state" class="required">State:</label>
428 <label for="borrower_state">State:</label>
431 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
432 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
436 [% UNLESS hidden.defined('zipcode') %]
438 [% IF mandatory.defined('zipcode') %]
439 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
441 <label for="borrower_zipcode">ZIP/Postal code:</label>
444 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
445 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
449 [% UNLESS hidden.defined('country') %]
451 [% IF mandatory.defined('country') %]
452 <label for="borrower_country" class="required">Country:</label>
454 <label for="borrower_country">Country:</label>
457 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
458 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
466 [%# Following on one line for translatability %]
467 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
468 <fieldset class="rows" id="memberentry_contact">
469 <legend id="contact_legend">Contact information</legend>
472 [% UNLESS hidden.defined('phone') %]
474 [% IF mandatory.defined('phone') %]
475 <label for="borrower_phone" class="required">Primary phone:</label>
477 <label for="borrower_phone">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">Secondary phone:</label>
490 <label for="borrower_phonepro">Secondary phone:</label>
493 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
494 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
498 [% UNLESS hidden.defined('mobile') %]
500 [% IF mandatory.defined('mobile') %]
501 <label for="borrower_mobile" class="required">Other phone:</label>
503 <label for="borrower_mobile">Other phone:</label>
506 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
507 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
511 [% UNLESS hidden.defined('email') %]
513 [% IF mandatory.defined('email') %]
514 <label for="borrower_email" class="required">Primary email:</label>
516 <label for="borrower_email">Primary email:</label>
519 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
520 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
524 [% UNLESS hidden.defined('emailpro') %]
526 [% IF mandatory.defined('emailpro') %]
527 <label for="borrower_emailpro" class="required">Secondary email:</label>
529 <label for="borrower_emailpro">Secondary email:</label>
532 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
533 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
537 [% UNLESS hidden.defined('fax') %]
539 [% IF mandatory.defined('fax') %]
540 <label for="borrower_fax" class="required">Fax:</label>
542 <label for="borrower_fax">Fax:</label>
545 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
546 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
553 [%# Following on one line for translatability %]
554 [% UNLESS hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') && hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') && 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">Address:</label>
564 <label for="borrower_B_address">Address:</label>
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">Address 2:</label>
577 <label for="borrower_B_address2">Address 2:</label>
580 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
581 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
585 [% UNLESS hidden.defined('B_city') %]
587 [% IF mandatory.defined('B_city') %]
588 <label for="borrower_B_city" class="required">City:</label>
590 <label for="borrower_B_city">City:</label>
593 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
594 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
598 [% UNLESS hidden.defined('B_state') %]
600 [% IF mandatory.defined('B_state') %]
601 <label for="borrower_B_state" class="required">State:</label>
603 <label for="borrower_B_state">State:</label>
606 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
607 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
611 [% UNLESS hidden.defined('B_zipcode') %]
613 [% IF mandatory.defined('B_zipcode') %]
614 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
616 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
619 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
620 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
624 [% UNLESS hidden.defined('B_country') %]
626 [% IF mandatory.defined('B_country') %]
627 <label for="borrower_B_country" class="required">Country:</label>
629 <label for="borrower_B_country">Country:</label>
632 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
633 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
637 [% UNLESS hidden.defined('B_phone') %]
639 [% IF mandatory.defined('B_phone') %]
640 <label for="borrower_B_phone" class="required">Phone:</label>
642 <label for="borrower_B_phone">Phone:</label>
645 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
646 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
650 [% UNLESS hidden.defined('B_email') %]
652 [% IF mandatory.defined('B_email') %]
653 <label for="borrower_B_email" class="required">Email:</label>
655 <label for="borrower_B_email">Email:</label>
658 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
659 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
663 [% UNLESS hidden.defined('contactnote') %]
665 [% IF mandatory.defined('contactnote') %]
666 <label for="borrower_contactnote" class="required">Contact note:</label>
668 <label for="borrower_contactnote">Contact note:</label>
671 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
672 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
680 [%# Following on one line for translatability %]
681 [% UNLESS hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') && hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') && hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone') %]
682 <fieldset class="rows" id="memberentry_alternatecontact">
683 <legend id="alternatecontact_legend">Alternate contact</legend>
686 [% UNLESS hidden.defined('altcontactsurname') %]
688 [% IF mandatory.defined('altcontactsurname') %]
689 <label for="borrower_altcontactsurname" class="required">Surname:</label>
691 <label for="borrower_altcontactsurname">Surname:</label>
694 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
695 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
699 [% UNLESS hidden.defined('altcontactfirstname') %]
701 [% IF mandatory.defined('altcontactfirstname') %]
702 <label for="borrower_altcontactfirstname" class="required">First name:</label>
704 <label for="borrower_altcontactfirstname">First name:</label>
707 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
708 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
712 [% UNLESS hidden.defined('altcontactaddress1') %]
714 [% IF mandatory.defined('altcontactaddress1') %]
715 <label for="borrower_altcontactaddress1" class="required">Address:</label>
717 <label for="borrower_altcontactaddress1">Address:</label>
720 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
721 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
725 [% UNLESS hidden.defined('altcontactaddress2') %]
727 [% IF mandatory.defined('altcontactaddress2') %]
728 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
730 <label for="borrower_altcontactaddress2">Address 2:</label>
733 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
734 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
738 [% UNLESS hidden.defined('altcontactaddress3') %]
740 [% IF mandatory.defined('altcontactaddress3') %]
741 <label for="borrower_altcontactaddress3" class="required">City:</label>
743 <label for="borrower_altcontactaddress3">City:</label>
746 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
747 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
751 [% UNLESS hidden.defined('altcontactstate') %]
753 [% IF mandatory.defined('altcontactstate') %]
754 <label for="borrower_altcontactstate" class="required">State:</label>
756 <label for="borrower_altcontactstate">State:</label>
759 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
760 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
764 [% UNLESS hidden.defined('altcontactzipcode') %]
766 [% IF mandatory.defined('altcontactzipcode') %]
767 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
769 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
772 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
773 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
777 [% UNLESS hidden.defined('altcontactcountry') %]
779 [% IF mandatory.defined('altcontactcountry') %]
780 <label for="borrower_altcontactcountry" class="required">Country:</label>
782 <label for="borrower_altcontactcountry">Country:</label>
785 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
786 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
790 [% UNLESS hidden.defined('altcontactphone') %]
792 [% IF mandatory.defined('altcontactphone') %]
793 <label for="borrower_altcontactphone" class="required">Phone:</label>
795 <label for="borrower_altcontactphone">Phone:</label>
798 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
799 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
806 [% UNLESS action == 'edit' || hidden.defined('password') %]
807 <fieldset class="rows" id="memberentry_password">
808 <legend id="contact_legend">Password</legend>
809 <div class="alert alert-info">
810 <p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
811 [% UNLESS mandatory.defined('password') %]
812 <div>If you do not enter a password a system generated password will be created.</div>
816 [% IF mandatory.defined('password') %]
818 <li><label for="borrower_password" class="required">Password</label>
819 <input type="password" name="borrower_password" id="password" />
820 <span class="required">Required</span>
822 <li><label for="borrower_password2" class="required">Confirm password</label>
823 <input type="password" name="borrower_password2" id="password2" />
824 <span class="required">Required</span>
829 <li><label for="borrower_password">Password</label>
830 <input type="password" name="borrower_password" id="password" />
832 <li><label for="borrower_password2">Confirm password</label>
833 <input type="password" name="borrower_password2" id="password2" />
840 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
841 [% FOREACH pa_class IN patron_attribute_classes %]
842 [% IF pa_class.class %]
843 <fieldset id="aai_[% pa_loo.class %]" class="rows patron-attributes">
844 <legend>[% pa_class.lib %]</legend>
846 <fieldset class="rows patron-attributes">
847 <legend>Additional information</legend>
849 <ol class="attributes_table">
850 [% FOREACH pa IN pa_class.items %]
851 [% FOREACH pa_value IN pa.values %]
852 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code %]"></a>[% END %]
853 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
854 <li data-category_code="[% pa.type.category_code %]">
855 <label for="[% form_id %]">[% pa.type.description %]: </label>
856 [% IF pa.type.opac_editable %]
857 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code |html %]" />
858 [% IF ( pa.type.authorised_value_category ) %]
859 <select id="[% form_id %]" name="patron_attribute_value">
860 <option value=""></option>
861 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
862 [% IF ( auth_val.authorised_value == pa_value ) %]
863 <option value="[% auth_val.authorised_value %]" selected="selected">
867 <option value="[% auth_val.authorised_value %]" >
874 <textarea rows="2" cols="30" id="[% form_id %]" name="patron_attribute_value">[% pa_value %]</textarea>
876 <a href="#" class="clear-attribute">Clear</a>
877 [% IF ( pa.type.repeatable ) %]
878 <a href="#" class="clone-attribute">New</a>
881 [% IF ( pa.type.authorised_value_category ) %]
882 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
884 [% pa_value | html_line_break %]
895 [% UNLESS action == 'edit' %]
896 <fieldset class="rows" id="memberentry_captcha">
900 <label for="captcha" class="required">Verification:</label>
902 <input type="text" name="captcha" id="captcha" />
903 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
905 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
911 [% IF action == 'edit' %]
912 [% IF OPACPatronDetails %]
913 <fieldset class="action">
914 <input type="hidden" name="action" value="update" />
915 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
916 <input type="submit" class="btn" value="Submit update request" />
920 <fieldset class="action">
921 <input type="hidden" name="action" value="create" />
922 <input type="submit" class="btn" value="Submit" />
928 </div><!--/div id="update-account" -->
934 [% INCLUDE 'opac-bottom.inc' %]
935 [% BLOCK jsinclude %]
936 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min_[% KOHA_VERSION %].js"></script>
937 [% PROCESS 'password_check.inc' %]
938 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
939 <script type="text/javascript">
941 $(document).ready(function() {
942 [% IF action == 'edit' && !OPACPatronDetails %]
943 $("#memberentry-form :input").attr('readonly', true);
944 $("#borrower_branchcode").attr('disabled',true);
945 $("#borrower_title").attr('disabled',true);
946 $('#memberentry-form :radio').attr('disabled',true);
947 $('span.required').remove();
948 $('label.required').removeClass('required');
951 $("#memberentry-form").validate({
963 [% IF mandatory.defined('password') %]
966 password_strong: true,
967 password_no_spaces: true
969 borrower_password2: {
970 [% IF mandatory.defined('password') %]
979 submitHandler: function(form) {
980 if (form.beenSubmitted) {
984 form.beenSubmitted = true;
988 errorPlacement: function(error, element) {
989 offset = element.offset();
990 error.insertAfter(element)
991 error.addClass('error'); // add a class to the wrapper
992 error.css('position', 'absolute');
993 error.css('left', offset.left + element.outerWidth() + 10);
994 error.css('top', offset.top);
995 error.css('width', 'auto');
999 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1000 $('#update_privacy_guarantor_checkouts').click( function() {
1001 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
1002 .done(function( data ) {
1004 if ( data.success ) {
1005 message = _("Your setting has been updated!");
1007 message = _("Unable to update your setting!");
1010 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
1015 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1017 .find('textarea').attr('value', '').end()
1018 .find('select').attr('value', '').end();
1023 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1024 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1026 var newId = 50 + parseInt(Math.random() * 100000);
1027 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1028 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1034 $(".cleardate").on("click", function(){
1035 $('#borrower_dateofbirth').val('');
1040 [% INCLUDE 'calendar.inc' %]