3 [% USE AuthorisedValues %]
9 [% SET userupdateview = 1 %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 [% BLOCK cssinclude %][% END %]
17 [% IF action == 'edit' %]
18 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
20 <body id="opac-patron-registration" class="opac">
22 [% INCLUDE 'masthead.inc' %]
25 <ul class="breadcrumb">
26 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
27 [% IF action == 'edit' %]
28 <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li>
29 <li><a href="#">Your personal details</a></li>
31 <li><a href="#">Register a new account</a></li>
35 <div class="container-fluid">
36 <div class="row-fluid">
39 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
43 [% IF action == 'edit' %]
44 <div id="update-account">
46 <div id="add-account">
49 [% IF action == 'edit' %]
50 [% UNLESS OPACPatronDetails %]
51 <div class="alert alert-info">To make changes to your record please contact the library.</div>
54 <div class="alert alert-error">No changes were made.</div>
58 [% IF empty_mandatory_fields %]
59 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
62 [% IF invalid_form_fields %]
63 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
65 [% FOREACH field IN invalid_form_fields %]
66 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
67 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
68 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
69 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
70 [% IF field == "password_too_short" %]
71 <li>Password must be at least [% minPasswordLength | html %] characters long.</li>
73 [% IF field == "password_too_weak" %]
74 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
76 [% IF field == "password_has_whitespaces" %]
77 <li>Password must not contain leading or trailing whitespaces.</li>
79 [% IF field == "duplicate_email" %]
80 <li>This email address already exists in our database.</li>
84 <span>Please correct and resubmit.</span>
88 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
89 <div class="alert alert-error">
90 [% IF cardnumber_wrong_length %]
91 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
92 [% ELSIF cardnumber_already_exists %]
93 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
95 <span>Please correct and resubmit.</span>
99 [% IF failed_captcha %]
100 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
103 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
104 <fieldset class="rows" id="memberentry_privacy">
105 <legend id="privacy_legend">Privacy</legend>
108 <label>Allow your guarantor to view your current checkouts?</label>
109 <select id="privacy_guarantor_checkouts">
110 <option value="0">No</option>
111 [% IF borrower.privacy_guarantor_checkouts %]
112 <option value="1" selected="selected">Yes</option>
114 <option value="1">Yes</option>
118 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
119 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
122 Your guarantor is <i>[% guarantor.firstname | html %] [% guarantor.surname | html %]</i>
128 [% IF ( extended_unique_id_failed_code ) %]
129 <div class="alert" id="extended_unique_id_failed"><a href="#patron-attr-start-[% extended_unique_id_failed_code | uri %]">[% extended_unique_id_failed_description _ ': ' | html %]</a> Value is already in use ([% extended_unique_id_failed_value | html %])</div>
132 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
134 [%# Following on one line for translatability %]
135 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
136 <fieldset class="rows" id="memberentry_library">
138 <legend id="library_legend">Library</legend>
140 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
142 [% IF mandatory.defined('cardnumber') %]
143 <label for="borrower_cardnumber" class="required">Library card number:</label>
145 <label for="borrower_cardnumber">Library card number:</label>
147 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
148 [% borrower.cardnumber | html %]
150 [% IF minlength_cardnumber == maxlength_cardnumber %]
151 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
152 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
153 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
154 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
155 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
156 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
157 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
158 [% ELSIF maxlength_cardnumber %]
159 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
160 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
161 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
163 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" />
164 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
165 <div class="hint">There is no minimum or maximum character length.</div>
171 [% UNLESS hidden.defined('dateexpiry') %]
173 <label>Expiration date:</label>
174 [% borrower.dateexpiry | $KohaDates %]
178 [% UNLESS hidden.defined('branchcode') %]
180 [% IF mandatory.defined('branchcode') %]
181 <label for="borrower_branchcode" class="required">Home library:</label>
183 <label for="borrower_branchcode">Home library:</label>
186 <select id="borrower_branchcode" name="borrower_branchcode">
187 [% FOREACH l IN libraries %]
188 [% IF l.branchcode == borrower.branchcode %]
189 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
191 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
198 [% UNLESS hidden.defined('categorycode') %]
200 <label for="borrower_categorycode">
204 [% Categories.GetName( borrower.categorycode ) | html %]
205 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
207 <select id="borrower_categorycode" name="borrower_categorycode">
208 [% FOREACH c IN Categories.all() %]
209 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
210 <option value="[% c.categorycode | html %]" selected="selected">[% c.description | html %]</option>
212 <option value="[% c.categorycode | html %]">[% c.description | html %]</option>
221 [% END # / defined 'branchcode' %]
223 [%# Following on one line for translatability %]
224 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
225 <div class="row-fluid">
226 [% IF ( display_patron_image ) %]
231 <fieldset class="rows" id="memberentry_identity">
232 <legend id="identity_legend">Identity</legend>
235 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
237 [% IF mandatory.defined('title') %]
238 <label for="borrower_title" class="required">Salutation:</label>
240 <label for="borrower_title">Salutation:</label>
243 <select id="borrower_title" name="borrower_title">
244 <option value=""></option>
245 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
246 [% IF mt == borrower.title %]
247 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
249 <option value="[% mt | html %]">[% mt | html %]</option>
256 [% UNLESS hidden.defined('surname') %]
258 [% IF mandatory.defined('surname') %]
259 <label for="borrower_surname" class="required">Surname:</label>
261 <label for="borrower_surname">Surname:</label>
264 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
265 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
269 [% UNLESS hidden.defined('firstname') %]
271 [% IF mandatory.defined('firstname') %]
272 <label for="borrower_firstname" class="required">First name:</label>
274 <label for="borrower_firstname">First name:</label>
277 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
278 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
282 [% UNLESS hidden.defined('dateofbirth') %]
284 [% IF mandatory.defined('dateofbirth') %]
285 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
287 <label for="borrower_dateofbirth">Date of birth:</label>
290 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
292 [% UNLESS action == 'edit' && !OPACPatronDetails %]
293 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
294 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
298 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
302 [% UNLESS hidden.defined('initials') %]
304 [% IF mandatory.defined('initials') %]
305 <label for="borrower_initials" class="required">Initials:</label>
307 <label for="borrower_initials">Initials:</label>
310 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
311 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
315 [% UNLESS hidden.defined('othernames') %]
317 [% IF mandatory.defined('othernames') %]
318 <label for="borrower_othernames" class="required">Other names:</label>
320 <label for="borrower_othernames">Other names:</label>
323 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
324 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
328 [% UNLESS hidden.defined('sex') %]
330 <label for="sex-female" class="radio inline">Female:</label>
331 [% IF borrower.sex == 'F' %]
332 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
334 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
337 <label for="sex-male" class="radio inline">Male:</label>
338 [% IF borrower.sex == 'M' %]
339 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
341 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
344 <label for="sex-none" class="radio inline">None specified: </label>
345 [% IF borrower.sex == '' %]
346 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
348 <input type="radio" name="borrower_sex" id="sex-none" value="" />
351 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
357 [% IF ( display_patron_image ) %]
359 <p class="patronimage">
360 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
365 [% END # /UNLESS fields hidden %]
367 [%# Following on one line for translatability %]
368 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
369 <fieldset class="rows" id="memberentry_mainaddress">
370 <legend id="mainaddress_legend">Main address</legend>
373 [% UNLESS hidden.defined('streetnumber') %]
375 [% IF mandatory.defined('streetnumber') %]
376 <label for="borrower_streetnumber" class="required">Street number:</label>
378 <label for="borrower_streetnumber">Street number:</label>
381 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber | html %]" />
382 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
386 [% UNLESS hidden.defined('address') %]
388 [% IF mandatory.defined('address') %]
389 <label for="borrower_address" class="required">Address:</label>
391 <label for="borrower_address">Address:</label>
394 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
395 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
399 [% UNLESS hidden.defined('address2') %]
401 [% IF mandatory.defined('address2') %]
402 <label for="borrower_address2" class="required">Address 2:</label>
404 <label for="borrower_address2">Address 2:</label>
407 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
408 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
412 [% UNLESS hidden.defined('city') %]
414 [% IF mandatory.defined('city') %]
415 <label for="borrower_city" class="required">City:</label>
417 <label for="borrower_city">City:</label>
420 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
421 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
425 [% UNLESS hidden.defined('state') %]
427 [% IF mandatory.defined('state') %]
428 <label for="borrower_state" class="required">State:</label>
430 <label for="borrower_state">State:</label>
433 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
434 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
438 [% UNLESS hidden.defined('zipcode') %]
440 [% IF mandatory.defined('zipcode') %]
441 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
443 <label for="borrower_zipcode">ZIP/Postal code:</label>
446 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
447 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
451 [% UNLESS hidden.defined('country') %]
453 [% IF mandatory.defined('country') %]
454 <label for="borrower_country" class="required">Country:</label>
456 <label for="borrower_country">Country:</label>
459 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
460 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
468 [%# Following on one line for translatability %]
469 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
470 <fieldset class="rows" id="memberentry_contact">
471 <legend id="contact_legend">Contact information</legend>
474 [% UNLESS hidden.defined('phone') %]
476 [% IF mandatory.defined('phone') %]
477 <label for="borrower_phone" class="required">Primary phone:</label>
479 <label for="borrower_phone">Primary phone:</label>
482 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
483 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
487 [% UNLESS hidden.defined('phonepro') %]
489 [% IF mandatory.defined('phonepro') %]
490 <label for="borrower_phonepro" class="required">Secondary phone:</label>
492 <label for="borrower_phonepro">Secondary phone:</label>
495 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
496 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
500 [% UNLESS hidden.defined('mobile') %]
502 [% IF mandatory.defined('mobile') %]
503 <label for="borrower_mobile" class="required">Other phone:</label>
505 <label for="borrower_mobile">Other phone:</label>
508 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
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">Primary email:</label>
518 <label for="borrower_email">Primary email:</label>
521 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
522 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
526 [% UNLESS hidden.defined('emailpro') %]
528 [% IF mandatory.defined('emailpro') %]
529 <label for="borrower_emailpro" class="required">Secondary email:</label>
531 <label for="borrower_emailpro">Secondary email:</label>
534 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
535 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
539 [% UNLESS hidden.defined('fax') %]
541 [% IF mandatory.defined('fax') %]
542 <label for="borrower_fax" class="required">Fax:</label>
544 <label for="borrower_fax">Fax:</label>
547 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
548 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
555 [%# Following on one line for translatability %]
556 [% 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') %]
557 <fieldset class="rows" id="memberentry_alternateaddress">
558 <legend id="alternateaddress_legend">Alternate address</legend>
561 [% UNLESS hidden.defined('B_address') %]
563 [% IF mandatory.defined('B_address') %]
564 <label for="borrower_B_address" class="required">Address:</label>
566 <label for="borrower_B_address">Address:</label>
569 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
570 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
574 [% UNLESS hidden.defined('B_address2') %]
576 [% IF mandatory.defined('B_address2') %]
577 <label for="borrower_B_address2" class="required">Address 2:</label>
579 <label for="borrower_B_address2">Address 2:</label>
582 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
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">City:</label>
592 <label for="borrower_B_city">City:</label>
595 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
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">State:</label>
605 <label for="borrower_B_state">State:</label>
608 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
609 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
613 [% UNLESS hidden.defined('B_zipcode') %]
615 [% IF mandatory.defined('B_zipcode') %]
616 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
618 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
621 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
622 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
626 [% UNLESS hidden.defined('B_country') %]
628 [% IF mandatory.defined('B_country') %]
629 <label for="borrower_B_country" class="required">Country:</label>
631 <label for="borrower_B_country">Country:</label>
634 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
635 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
639 [% UNLESS hidden.defined('B_phone') %]
641 [% IF mandatory.defined('B_phone') %]
642 <label for="borrower_B_phone" class="required">Phone:</label>
644 <label for="borrower_B_phone">Phone:</label>
647 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
648 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
652 [% UNLESS hidden.defined('B_email') %]
654 [% IF mandatory.defined('B_email') %]
655 <label for="borrower_B_email" class="required">Email:</label>
657 <label for="borrower_B_email">Email:</label>
660 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
661 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
665 [% UNLESS hidden.defined('contactnote') %]
667 [% IF mandatory.defined('contactnote') %]
668 <label for="borrower_contactnote" class="required">Contact note:</label>
670 <label for="borrower_contactnote">Contact note:</label>
673 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
674 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
682 [%# Following on one line for translatability %]
683 [% 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') %]
684 <fieldset class="rows" id="memberentry_alternatecontact">
685 <legend id="alternatecontact_legend">Alternate contact</legend>
688 [% UNLESS hidden.defined('altcontactsurname') %]
690 [% IF mandatory.defined('altcontactsurname') %]
691 <label for="borrower_altcontactsurname" class="required">Surname:</label>
693 <label for="borrower_altcontactsurname">Surname:</label>
696 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
697 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
701 [% UNLESS hidden.defined('altcontactfirstname') %]
703 [% IF mandatory.defined('altcontactfirstname') %]
704 <label for="borrower_altcontactfirstname" class="required">First name:</label>
706 <label for="borrower_altcontactfirstname">First name:</label>
709 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
710 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
714 [% UNLESS hidden.defined('altcontactaddress1') %]
716 [% IF mandatory.defined('altcontactaddress1') %]
717 <label for="borrower_altcontactaddress1" class="required">Address:</label>
719 <label for="borrower_altcontactaddress1">Address:</label>
722 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
723 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
727 [% UNLESS hidden.defined('altcontactaddress2') %]
729 [% IF mandatory.defined('altcontactaddress2') %]
730 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
732 <label for="borrower_altcontactaddress2">Address 2:</label>
735 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
736 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
740 [% UNLESS hidden.defined('altcontactaddress3') %]
742 [% IF mandatory.defined('altcontactaddress3') %]
743 <label for="borrower_altcontactaddress3" class="required">City:</label>
745 <label for="borrower_altcontactaddress3">City:</label>
748 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
749 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
753 [% UNLESS hidden.defined('altcontactstate') %]
755 [% IF mandatory.defined('altcontactstate') %]
756 <label for="borrower_altcontactstate" class="required">State:</label>
758 <label for="borrower_altcontactstate">State:</label>
761 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
762 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
766 [% UNLESS hidden.defined('altcontactzipcode') %]
768 [% IF mandatory.defined('altcontactzipcode') %]
769 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
771 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
774 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
775 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
779 [% UNLESS hidden.defined('altcontactcountry') %]
781 [% IF mandatory.defined('altcontactcountry') %]
782 <label for="borrower_altcontactcountry" class="required">Country:</label>
784 <label for="borrower_altcontactcountry">Country:</label>
787 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
788 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
792 [% UNLESS hidden.defined('altcontactphone') %]
794 [% IF mandatory.defined('altcontactphone') %]
795 <label for="borrower_altcontactphone" class="required">Phone:</label>
797 <label for="borrower_altcontactphone">Phone:</label>
800 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
801 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
808 [% UNLESS action == 'edit' || hidden.defined('password') %]
809 <fieldset class="rows" id="memberentry_password">
810 <legend id="contact_legend">Password</legend>
811 <div class="alert alert-info">
812 [% IF ( Koha.Preference('RequireStrongPassword') ) %]
813 <p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p>
815 <p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p>
817 [% UNLESS mandatory.defined('password') %]
818 <p>If you do not enter a password a system generated password will be created.</p>
822 [% IF mandatory.defined('password') %]
824 <li><label for="borrower_password" class="required">Password</label>
825 <input type="password" name="borrower_password" id="password" />
826 <span class="required">Required</span>
828 <li><label for="borrower_password2" class="required">Confirm password</label>
829 <input type="password" name="borrower_password2" id="password2" />
830 <span class="required">Required</span>
835 <li><label for="borrower_password">Password</label>
836 <input type="password" name="borrower_password" id="password" />
838 <li><label for="borrower_password2">Confirm password</label>
839 <input type="password" name="borrower_password2" id="password2" />
846 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
847 [% FOREACH pa_class IN patron_attribute_classes %]
848 [% IF pa_class.class %]
849 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
850 <legend>[% pa_class.lib | html %]</legend>
852 <fieldset class="rows patron-attributes">
853 <legend>Additional information</legend>
855 <ol class="attributes_table">
856 [% FOREACH pa IN pa_class.items %]
857 [% FOREACH pa_value IN pa.values %]
858 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
859 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
860 <li data-category_code="[% pa.type.category_code | html %]">
861 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
862 [% IF pa.type.opac_editable %]
863 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
864 [% IF ( pa.type.authorised_value_category ) %]
865 <select id="[% form_id | html %]" name="patron_attribute_value">
866 <option value=""></option>
867 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
868 [% IF ( auth_val.authorised_value == pa_value ) %]
869 <option value="[% auth_val.authorised_value | html %]" selected="selected">
870 [% auth_val.lib | html %]
873 <option value="[% auth_val.authorised_value | html %]" >
874 [% auth_val.lib | html %]
880 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
882 <a href="#" class="clear-attribute">Clear</a>
883 [% IF ( pa.type.repeatable ) %]
884 <a href="#" class="clone-attribute">New</a>
887 [% IF ( pa.type.authorised_value_category ) %]
888 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
890 [% pa_value | html_line_break %]
901 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
902 <fieldset class="rows" id="memberentry_gdpr_consent">
903 <legend>GDPR consent</legend>
906 <label></label><span><input type="checkbox" name="borrower_gdpr_proc_consent" value="agreed"> I agree with your processing of my personal data as outlined in the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>. <span class="required">Required</span></span>
912 [% UNLESS action == 'edit' %]
913 <fieldset class="rows" id="memberentry_captcha">
914 <legend>Verification</legend>
918 <label for="captcha" class="required">Verification:</label>
920 <input type="text" name="captcha" id="captcha" />
921 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
923 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
929 [% IF action == 'edit' %]
930 [% IF OPACPatronDetails %]
931 <fieldset class="action">
932 <input type="hidden" name="action" value="update" />
933 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
934 <input type="submit" class="btn" value="Submit update request" />
938 <fieldset class="action">
939 <input type="hidden" name="action" value="create" />
940 <input type="submit" class="btn" value="Submit" />
946 </div><!--/div id="update-account" -->
952 [% INCLUDE 'opac-bottom.inc' %]
953 [% BLOCK jsinclude %]
954 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
955 [% PROCESS 'password_check.inc' %]
956 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
959 $(document).ready(function() {
960 [% IF action == 'edit' && !OPACPatronDetails %]
961 $("#memberentry-form :input").attr('readonly', true);
962 $("#borrower_branchcode").attr('disabled',true);
963 $("#borrower_title").attr('disabled',true);
964 $('#memberentry-form :radio').attr('disabled',true);
965 $('span.required').remove();
966 $('label.required').removeClass('required');
969 $("#memberentry-form").validate({
981 [% IF mandatory.defined('password') %]
984 password_strong: true,
985 password_no_spaces: true
987 borrower_password2: {
988 [% IF mandatory.defined('password') %]
997 submitHandler: function(form) {
998 if (form.beenSubmitted) {
1002 form.beenSubmitted = true;
1006 errorPlacement: function(error, element) {
1007 offset = element.offset();
1008 error.insertAfter(element)
1009 error.addClass('error'); // add a class to the wrapper
1010 error.css('position', 'absolute');
1011 error.css('left', offset.left + element.outerWidth() + 10);
1012 error.css('top', offset.top);
1013 error.css('width', 'auto');
1017 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1018 $('#update_privacy_guarantor_checkouts').click( function() {
1019 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
1020 .done(function( data ) {
1022 if ( data.success ) {
1023 message = _("Your setting has been updated!");
1025 message = _("Unable to update your setting!");
1028 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
1033 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1035 .find('textarea').attr('value', '').end()
1036 .find('select').attr('value', '').end();
1041 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1042 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1044 var newId = 50 + parseInt(Math.random() * 100000);
1045 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1046 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1052 $(".cleardate").on("click", function(){
1053 $('#borrower_dateofbirth').val('');
1058 [% INCLUDE 'calendar.inc' %]