3 [% USE AuthorisedValues %]
9 [% SET userupdateview = 1 %]
10 [% BLOCK streetnumber %]
11 [% UNLESS hidden.defined('streetnumber') %]
13 <label for="borrower_streetnumber" class="[% required.streetnumber | html %]">Street number:</label>
15 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber | html %]" class="[% required.streetnumber | html %]" />
16 <div class="required_label [% required.streetnumber | html %]">Required</div>
21 [% INCLUDE 'doc-head-open.inc' %]
22 <title>[% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
23 [% INCLUDE 'doc-head-close.inc' %]
24 [% BLOCK cssinclude %][% END %]
27 [% IF action == 'edit' %]
28 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
30 <body id="opac-patron-registration" class="opac">
32 [% INCLUDE 'masthead.inc' %]
35 <nav aria-label="breadcrumb">
36 <ul class="breadcrumb">
37 <li class="breadcrumb-item">
38 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
40 [% IF action == 'edit' %]
41 <li class="breadcrumb-item">
42 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
44 <li class="breadcrumb-item active">
45 <a href="#">Your personal details</a>
48 <li class="breadcrumb-item active">
49 <a href="#">Register a new account</a>
55 <div class="container-fluid">
57 <div class="col col-lg-2 order-2 order-lg-1">
59 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
62 <div class="col-md-12 col-lg-10 order-1">
64 <h1>Your personal details</h1>
66 [% IF action == 'edit' %]
67 <div id="update-account" class="maincontent">
69 <div id="add-account" class="maincontent">
72 [% IF action == 'edit' %]
73 [% UNLESS OPACPatronDetails %]
74 <div class="alert alert-info">To make changes to your record please contact the library.</div>
77 <div class="alert alert-error">No changes were made.</div>
81 [% IF empty_mandatory_fields %]
82 <div class="alert alert-warning">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
85 [% IF invalid_form_fields %]
86 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
88 [% FOREACH field IN invalid_form_fields %]
89 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
90 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
91 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
92 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
93 [% IF field == "password_too_short" %]
94 <li>Password must be at least [% patron.category.effective_min_password_length | html %] characters long.</li>
96 [% IF field == "password_too_weak" %]
97 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
99 [% IF field == "password_has_whitespaces" %]
100 <li>Password must not contain leading or trailing whitespaces.</li>
102 [% IF field == "duplicate_email" %]
103 <li>This email address already exists in our database.</li>
105 [% IF field == "email_match" %]
106 <li>Emails do not match! <a href="#borrower_repeat_email">confirm email address</a></li>
110 <span>Please correct and resubmit.</span>
114 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
115 <div class="alert alert-error">
116 [% IF cardnumber_wrong_length %]
117 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
118 [% ELSIF cardnumber_already_exists %]
119 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
121 <span>Please correct and resubmit.</span>
125 [% IF failed_captcha %]
126 <div class="alert alert-warning">You typed in the wrong characters in the box before submitting. Please try again.</div>
129 [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
132 <fieldset class="rows" id="memberentry_privacy">
133 <legend id="privacy_legend">Privacy</legend>
135 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
137 <label>Allow your guarantor to view your current checkouts?</label>
138 <select id="privacy_guarantor_checkouts">
139 <option value="0">No</option>
140 [% IF borrower.privacy_guarantor_checkouts %]
141 <option value="1" selected="selected">Yes</option>
143 <option value="1">Yes</option>
147 <a id="update_privacy_guarantor_checkouts" href="#" class="btn btn-primary">Update</a>
148 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
153 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
155 <label>Allow your guarantor to view your current fines?</label>
156 <select id="privacy_guarantor_fines">
157 <option value="0">No</option>
158 [% IF borrower.privacy_guarantor_fines %]
159 <option value="1" selected="selected">Yes</option>
161 <option value="1">Yes</option>
165 <a id="update_privacy_guarantor_fines" href="#" class="btn btn-primary">Update</a>
166 <span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span>
174 [% FOREACH gr IN patron.guarantor_relationships %]
175 [% SET g = gr.guarantor %]
176 [% g.firstname | html %] [% g.surname | html %]
177 [%- IF ! loop.last %], [% END %]
187 [% IF ( extended_unique_id_failed_code ) %]
188 <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>
191 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
193 [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'dateofbirth' 'initials' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_streettype' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' ] %]
194 [% IF mandatory.defined( field ) %]
195 [% SET required.$field = 'required' %]
199 [%# Following on one line for translatability %]
200 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
203 <fieldset class="rows" id="memberentry_library">
205 <legend id="library_legend">Library</legend>
207 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
210 <label for="borrower_cardnumber" class="[% required.cardnumber | html %]">Library card number:</label>
212 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
213 [% borrower.cardnumber | html %]
215 [% IF minlength_cardnumber == maxlength_cardnumber %]
216 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" class="[% required.cardnumber | html %]" />
217 <div class="required_label [% required.cardnumber | html %]">Required</div>
218 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
219 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
220 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" class="[% required.cardnumber | html %]" />
221 <div class="required_label [% required.cardnumber | html %]">Required</div>
222 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
223 [% ELSIF maxlength_cardnumber %]
224 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" class="[% required.cardnumber | html %]" />
225 <div class="required_label [% required.cardnumber | html %]">Required</div>
226 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
228 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" class="[% required.cardnumber | html %]" />
229 <div class="required_label [% required.cardnumber | html %]">Required</div>
230 <div class="hint">There is no minimum or maximum character length.</div>
236 [% UNLESS hidden.defined('dateexpiry') %]
238 <label>Expiration date:</label>
239 [% borrower.dateexpiry | $KohaDates %]
243 [% UNLESS hidden.defined('branchcode') %]
245 [% IF ( libraries.size > 1 ) %]
246 <label for="borrower_branchcode" class="[% required.branchcode | html %]">Home library:</label>
248 <select id="borrower_branchcode" name="borrower_branchcode" class="[% required.branchcode | html %]">
249 [% FOREACH l IN libraries %]
250 [% IF l.branchcode == borrower.branchcode %]
251 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
253 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
257 <div class="required_label [% required.branchcode | html %]">Required</div>
259 <span class="label">Home library:</span>
260 [% FOREACH l IN libraries %]
261 [% l.branchname | html %]
262 <input type="hidden" name="borrower_branchcode" value="[% l.branchcode | html %]" />
268 [% UNLESS hidden.defined('categorycode') %]
270 <label for="borrower_categorycode" class="[% required.categorycode | html %]">
274 [% Categories.GetName( borrower.categorycode ) | html %]
275 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
277 <select id="borrower_categorycode" name="borrower_categorycode" class="[% required.categorycode | html %]">
278 [% FOREACH c IN Categories.all() %]
279 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
280 <option value="[% c.categorycode | html %]" data-pwd-length="[% c.effective_min_password_length | html %]" data-pwd-strong="[% c.effective_require_strong_password | html %]" selected="selected">[% c.description | html %]</option>
282 <option value="[% c.categorycode | html %]" data-pwd-length="[% c.effective_min_password_length | html %]" data-pwd-strong="[% c.effective_require_strong_password | html %]">[% c.description | html %]</option>
286 <div class="required_label [% required.categorycode | html %]">Required</div>
292 </div> <!-- /.col -->
293 </div> <!-- /.row -->
294 [% END # / defined 'branchcode' %]
296 [%# Following on one line for translatability %]
297 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
300 <fieldset class="rows" id="memberentry_identity">
301 <legend id="identity_legend">Identity</legend>
304 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
306 <label for="borrower_title" class="[% required.title | html %]">Salutation:</label>
308 <select id="borrower_title" name="borrower_title" class="[% required.title | html %]">
309 <option value=""></option>
310 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
311 [% IF mt == borrower.title %]
312 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
314 <option value="[% mt | html %]">[% mt | html %]</option>
318 <div class="required_label [% required.title | html %]">Required</div>
322 [% UNLESS hidden.defined('surname') %]
324 <label for="borrower_surname" class="[% required.surname | html %]">Surname:</label>
326 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" class="[% required.surname | html %]" />
327 <div class="required_label [% required.surname | html %]">Required</div>
331 [% UNLESS hidden.defined('firstname') %]
333 <label for="borrower_firstname" class="[% required.firstname | html %]">First name:</label>
335 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" class="[% required.firstname | html %]" />
336 <div class="required_label [% required.firstname | html %]">Required</div>
340 [% UNLESS hidden.defined('dateofbirth') %]
342 <label for="borrower_dateofbirth" class="[% required.dateofbirth | html %]">Date of birth:</label>
344 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" class="[% required.dateofbirth | html %]" />
346 [% UNLESS action == 'edit' && !OPACPatronDetails %]
347 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
348 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
352 <div class="required_label [% required.dateofbirth | html %]">Required</div>
356 [% UNLESS hidden.defined('initials') %]
358 <label for="borrower_initials" class="[% required.initials | html %]">Initials:</label>
360 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" class="[% required.initials | html %]" />
361 <div class="required_label [% required.initials | html %]">Required</div>
365 [% UNLESS hidden.defined('othernames') %]
367 <label for="borrower_othernames" class="[% required.othernames | html %]">Other names:</label>
369 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" class="[% required.othernames | html %]" />
370 <div class="required_label [% required.initials | html %]">Required</div>
374 [% UNLESS hidden.defined('sex') %]
376 <label for="sex-female" class="radio inline"><span class="patronsex-female">Female:</span></label>
377 [% IF borrower.sex == 'F' %]
378 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
380 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
383 <label for="sex-male" class="radio inline"><span class="patronsex-male">Male:</span></label>
384 [% IF borrower.sex == 'M' %]
385 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
387 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
390 <label for="sex-other" class="radio inline"><span class="patronsex-other">Other:</span></label>
391 [% IF borrower.sex == 'O' %]
392 <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" />
394 <input type="radio" name="borrower_sex" id="sex-other" value="O" />
397 <label for="sex-none" class="radio inline"><span class="patronsex-none">None specified:</span></label>
398 [% IF borrower.sex == '' %]
399 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
401 <input type="radio" name="borrower_sex" id="sex-none" value="" />
407 </div> <!-- /.col -->
408 [% IF ( display_patron_image ) %]
409 <div class="col-sm-2">
410 <p class="patronimage">
411 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
415 </div> <!-- /.row -->
416 [% END # /UNLESS fields hidden %]
418 [%# Following on one line for translatability %]
419 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
422 <fieldset class="rows" id="memberentry_mainaddress">
423 <legend id="mainaddress_legend">Main address</legend>
426 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
428 [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %]
430 [% UNLESS hidden.defined('streettype') %]
432 <label for="borrower_streettype" class="[% required.streettype | html %]">Street type:</label>
434 <select name="borrower_streettype" name="borrower_streettype" class="[% required.streettype | html %]">
435 <option value=""></option>
436 [% FOR roadtype IN roadtypes %]
437 [% IF roadtype.authorised_value == patron.streettype %]
438 <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option>
440 <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option>
444 <div class="required_label [% required.streettype | html %]">Required</div>
449 [% UNLESS hidden.defined('address') %]
451 <label for="borrower_address" class="[% required.address | html %]">Address:</label>
453 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" class="[% required.address | html %]" />
454 <div class="required_label [% required.address | html %]">Required</div>
458 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
460 [% UNLESS hidden.defined('address2') %]
462 <label for="borrower_address2" class="[% required.address2 | html %]">Address 2:</label>
464 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" class="[% required.address2 | html %]" />
465 <div class="required_label [% required.address2 | html %]">Required</div>
469 [% UNLESS hidden.defined('city') %]
471 <label for="borrower_city" class="[% required.city | html %]">City:</label>
473 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" class="[% required.city | html %]" />
474 <div class="required_label [% required.city | html %]">Required</div>
478 [% UNLESS hidden.defined('state') %]
480 <label for="borrower_state" class="[% required.state | html %]">State:</label>
482 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" class="[% required.state | html %]" />
483 <div class="required_label [% required.state | html %]">Required</div>
487 [% UNLESS hidden.defined('zipcode') %]
489 <label for="borrower_zipcode" class="[% required.zipcode | html %]">ZIP/Postal code:</label>
491 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" class="[% required.zipcode | html %]" />
492 <div class="required_label [% required.zipcode | html %]">Required</div>
496 [% UNLESS hidden.defined('country') %]
498 <label for="borrower_country" class="[% required.country | html %]">Country:</label>
500 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" class="[% required.country | html %]" />
501 <div class="required_label [% required.country | html %]">Required</div>
507 </div> <!-- /.col -->
508 </div> <!-- /.row -->
511 [%# Following on one line for translatability %]
512 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
515 <fieldset class="rows" id="memberentry_contact">
516 <legend id="contact_legend">Contact information</legend>
519 [% UNLESS hidden.defined('phone') %]
521 <label for="borrower_phone" class="[% required.phone | html %]">Primary phone:</label>
523 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" class="[% required.phone | html %]" />
524 <div class="required_label [% required.phone | html %]">Required</div>
528 [% UNLESS hidden.defined('phonepro') %]
530 <label for="borrower_phonepro" class="[% required.phonepro | html %]">Secondary phone:</label>
532 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" class="[% required.phonepro | html %]" />
533 <div class="required_label [% required.phonepro | html %]">Required</div>
537 [% UNLESS hidden.defined('mobile') %]
539 <label for="borrower_mobile" class="[% required.mobile | html %]">Other phone:</label>
541 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" class="[% required.mobile | html %]" />
542 <div class="required_label [% required.mobile | html %]">Required</div>
546 [% UNLESS hidden.defined('email') %]
548 <label for="borrower_email" class="[% required.email | html %]">Primary email:</label>
550 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" class="[% required.email | html %]" />
551 <div class="required_label [% required.email | html %]">Required</div>
554 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
556 <label for="borrower_repeat_email" class="[% required.email | html %]">Confirm primary email:</label>
558 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete="off" class="[% required.email | html %]">
559 <div class="required_label [% required.email | html %]">Required</div>
564 [% UNLESS hidden.defined('emailpro') %]
566 <label for="borrower_emailpro" class="[% required.emailpro | html %]">Secondary email:</label>
568 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" class="[% required.emailpro | html %]" />
569 <div class="required_label [% required.emailpro | html %]">Required</div>
573 [% UNLESS hidden.defined('fax') %]
575 <label for="borrower_fax" class="[% required.fax | html %]">Fax:</label>
577 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" class="[% required.fax | html %]" />
578 <div class="required_label [% required.fax | html %]">Required</div>
583 </div> <!-- /.col -->
584 </div> <!-- /.row -->
587 [%# Following on one line for translatability %]
588 [% 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') %]
591 <fieldset class="rows" id="memberentry_alternateaddress">
592 <legend id="alternateaddress_legend">Alternate address</legend>
596 [% UNLESS hidden.defined('B_streettype') %]
598 <label for="borrower_B_streettype" class="[% required.B_streettype | html %]">Street type:</label>
600 <select name="borrower_B_streettype" name="borrower_B_streettype" class="[% required.B_streettype | html %]">
601 <option value=""></option>
602 [% FOR roadtype IN roadtypes %]
603 [% IF roadtype.authorised_value == patron.streettype %]
604 <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option>
606 <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option>
610 <div class="required_label [% required.B_streettype | html %]">Required</div>
614 [% UNLESS hidden.defined('B_address') %]
616 <label for="borrower_B_address" class="[% required.B_address | html %]">Address:</label>
618 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" class="[% required.B_address | html %]" />
619 <div class="required_label [% required.B_address | html %]">Required</div>
623 [% UNLESS hidden.defined('B_address2') %]
625 <label for="borrower_B_address2" class="[% required.B_address | html %]">Address 2:</label>
627 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" class="[% required.B_address | html %]" />
628 <div class="required_label [% required.B_address2 | html %]">Required</div>
632 [% UNLESS hidden.defined('B_city') %]
634 <label for="borrower_B_city" class="[% required.B_city | html %]">City:</label>
636 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" class="[% required.B_city | html %]" />
637 <div class="required_label [% required.B_city | html %]">Required</div>
641 [% UNLESS hidden.defined('B_state') %]
643 <label for="borrower_B_state" class="[% required.B_state | html %]">State:</label>
645 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" class="[% required.B_state | html %]" />
646 <div class="required_label [% required.B_state | html %]">Required</div>
650 [% UNLESS hidden.defined('B_zipcode') %]
652 <label for="borrower_B_zipcode" class="[% required.B_zipcode | html %]">ZIP/Postal code:</label>
654 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" class="[% required.B_zipcode | html %]" />
655 <div class="required_label [% required.B_zipcode | html %]">Required</div>
659 [% UNLESS hidden.defined('B_country') %]
661 <label for="borrower_B_country" class="[% required.B_country | html %]">Country:</label>
663 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" class="[% required.B_country | html %]" />
664 <div class="required_label [% required.B_country | html %]">Required</div>
668 [% UNLESS hidden.defined('B_phone') %]
670 <label for="borrower_B_phone" class="[% required.B_phone | html %]">Phone:</label>
672 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" class="[% required.B_phone | html %]" />
673 <div class="required_label [% required.B_phone | html %]">Required</div>
677 [% UNLESS hidden.defined('B_email') %]
679 <label for="borrower_B_email" class="[% required.B_email | html %]">Email:</label>
681 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" class="[% required.B_email | html %]" />
682 <div class="required_label [% required.B_email | html %]">Required</div>
686 [% UNLESS hidden.defined('contactnote') %]
688 <label for="borrower_contactnote" class="[% required.contactnote | html %]">Contact note:</label>
690 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2" class="[% required.contactnote | html %]">[% borrower.contactnote | html %]</textarea>
691 <div class="required_label [% required.contactnote | html %]">Required</div>
697 </div> <!-- /.col -->
698 </div> <!-- /.row -->
701 [%# Following on one line for translatability %]
702 [% 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') %]
705 <fieldset class="rows" id="memberentry_alternatecontact">
706 <legend id="alternatecontact_legend">Alternate contact</legend>
709 [% UNLESS hidden.defined('altcontactsurname') %]
711 <label for="borrower_altcontactsurname" class="[% required.altcontactsurname | html %]">Surname:</label>
713 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" class="[% required.altcontactsurname | html %]" />
714 <div class="required_label [% required.altcontactsurname | html %]">Required</div>
718 [% UNLESS hidden.defined('altcontactfirstname') %]
720 <label for="borrower_altcontactfirstname" class="[% required.altcontactfirstname | html %]">First name:</label>
722 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" class="[% required.altcontactfirstname | html %]" />
723 <div class="required_label [% required.altcontactfirstname | html %]">Required</div>
727 [% UNLESS hidden.defined('altcontactaddress1') %]
729 <label for="borrower_altcontactaddress1" class="[% required.altcontactaddress1 | html %]">Address:</label>
731 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" class="[% required.altcontactaddress1 | html %]" />
732 <div class="required_label [% required.altcontactaddress1 | html %]">Required</div>
736 [% UNLESS hidden.defined('altcontactaddress2') %]
738 <label for="borrower_altcontactaddress2" class="[% required.altcontactaddress2 | html %]">Address 2:</label>
740 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" class="[% required.altcontactaddress2 | html %]" />
741 <div class="required_label [% required.altcontactaddress2 | html %]">Required</div>
745 [% UNLESS hidden.defined('altcontactaddress3') %]
747 <label for="borrower_altcontactaddress3" class="[% required.altcontactaddress3 | html %]">City:</label>
749 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" class="[% required.altcontactaddress3 | html %]" />
750 <div class="required_label [% required.altcontactaddress3 | html %]">Required</div>
754 [% UNLESS hidden.defined('altcontactstate') %]
756 <label for="borrower_altcontactstate" class="[% required.altcontactstate | html %]">State:</label>
758 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" class="[% required.altcontactstate | html %]" />
759 <div class="required_label [% required.altcontactstate | html %]">Required</div>
763 [% UNLESS hidden.defined('altcontactzipcode') %]
765 <label for="borrower_altcontactzipcode" class="[% required.altcontactzipcode | html %]">ZIP/Postal code:</label>
767 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" class="[% required.altcontactzipcode | html %]" />
768 <div class="required_label [% required.altcontactzipcode | html %]">Required</div>
772 [% UNLESS hidden.defined('altcontactcountry') %]
774 <label for="borrower_altcontactcountry" class="[% required.altcontactcountry | html %]">Country:</label>
776 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" class="[% required.altcontactcountry | html %]" />
777 <div class="required_label [% required.altcontactcountry | html %]">Required</div>
781 [% UNLESS hidden.defined('altcontactphone') %]
783 <label for="borrower_altcontactphone" class="[% required.altcontactphone | html %]">Phone:</label>
785 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" class="[% required.altcontactphone | html %]" />
786 <div class="required_label [% required.altcontactphone | html %]">Required</div>
791 </div> <!-- /.col -->
792 </div> <!-- /.row -->
795 [% UNLESS action == 'edit' || hidden.defined('password') %]
798 <fieldset class="rows" id="memberentry_password">
799 <legend id="contact_legend">Password</legend>
800 <div class="alert alert-info">
802 [% IF ( patron.category.effective_require_strong_password ) %]
803 <p>Your password must contain at least [% patron.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</p>
805 <p>Your password must be at least [% patron.category.effective_min_password_length | html %] characters long.</p>
808 <p id="password_alert"></p>
810 [% UNLESS mandatory.defined('password') %]
811 <p>If you do not enter a password a system generated password will be created.</p>
816 <li><label for="borrower_password" class="[% required.password | html %]">Password</label>
817 <input type="password" name="borrower_password" id="password" class="[% required.password | html %]" />
818 <div class="required_label [% required.password | html %]">Required</div>
820 <li><label for="borrower_password2" class="[% required.password | html %]">Confirm password</label>
821 <input type="password" name="borrower_password2" id="password2" />
822 <div class="required_label [% required.password | html %]">Required</div>
826 </div> <!-- /.col -->
827 </div> <!-- /.row -->
830 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && ! ( action == 'new' && Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) ) %]
833 [% FOREACH pa_class IN patron_attribute_classes %]
834 [% IF pa_class.class %]
835 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
836 <legend>[% pa_class.lib | html %]</legend>
838 <fieldset class="rows patron-attributes">
839 <legend>Additional information</legend>
841 <ol class="attributes_table">
842 [% FOREACH pa IN pa_class.items %]
843 [% FOREACH pa_value IN pa.values %]
844 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
845 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
846 <li data-category_code="[% pa.type.category_code | html %]">
847 [% IF pa.type.mandatory && pa.type.opac_editable %]
848 <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
850 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
852 [% IF pa.type.opac_editable %]
853 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
854 [% IF ( pa.type.authorised_value_category ) %]
855 <select id="[% form_id | html %]" name="patron_attribute_value">
856 <option value=""></option>
857 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
858 [% IF ( auth_val.authorised_value == pa_value ) %]
859 <option value="[% auth_val.authorised_value | html %]" selected="selected">
860 [% auth_val.lib | html %]
863 <option value="[% auth_val.authorised_value | html %]" >
864 [% auth_val.lib | html %]
870 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
872 [% IF pa.type.mandatory %]
873 <div class="required">Required</div>
875 <a href="#" class="clear-attribute">Clear</a>
876 [% IF ( pa.type.repeatable ) %]
877 <a href="#" class="clone-attribute">New</a>
880 [% IF ( pa.type.authorised_value_category ) %]
881 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
883 [% pa_value | html_line_break %]
892 </div> <!-- /.col -->
893 </div> <!-- /.row -->
896 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
899 <fieldset class="rows" id="memberentry_gdpr_consent">
900 <legend>GDPR consent</legend>
903 <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>. <div class="required">Required</div></span>
907 </div> <!-- /.col -->
908 </div> <!-- /.row -->
911 [% UNLESS action == 'edit' %]
914 <fieldset class="rows" id="memberentry_captcha">
915 <legend>Verification</legend>
919 <label for="captcha" class="required">Verification:</label>
921 <input type="text" name="captcha" id="captcha" style="text-transform: uppercase;" />
922 <div class="required_label required">Required</div>
923 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
925 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
929 </div> <!-- /.col -->
930 </div> <!-- /.row -->
935 [% IF action == 'edit' %]
936 [% IF OPACPatronDetails %]
937 <fieldset class="action">
938 <input type="hidden" name="action" value="update" />
939 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
940 <input type="submit" class="btn btn-primary" value="Submit update request" />
944 <fieldset class="action">
945 <input type="hidden" name="action" value="create" />
946 <input type="submit" class="btn btn-primary" value="Submit" />
949 </div> <!-- /.col -->
950 </div> <!-- /.row -->
954 </div><!--/div#update-account -->
960 [% INCLUDE 'opac-bottom.inc' %]
961 [% BLOCK jsinclude %]
962 [% INCLUDE 'validator-strings.inc' %]
963 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
964 [% INCLUDE 'calendar.inc' %]
968 $(document).ready(function() {
969 [% IF action == 'edit' && !OPACPatronDetails %]
970 $("#memberentry-form :input").attr('readonly', true);
971 $("#borrower_branchcode").attr('disabled',true);
972 $("#borrower_title").attr('disabled',true);
973 $('#memberentry-form :radio').attr('disabled',true);
974 $('span.required').remove();
975 $('label.required').removeClass('required');
978 $("#memberentry-form").validate({
983 borrower_repeat_email: {
984 equalTo: '#borrower_email'
993 password_strong: true,
994 password_no_spaces: true
996 borrower_password2: {
1003 submitHandler: function(form) {
1004 if (form.beenSubmitted) {
1008 form.beenSubmitted = true;
1014 $("input.required,select.required,textarea.required").rules("add", {
1018 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1020 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1021 $('#update_privacy_guarantor_checkouts').click( function() {
1022 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1024 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1026 data: JSON.stringify({
1027 allowed: can_see_checkouts
1029 contentType: "application/json",
1030 success: function () {
1031 $('#update_privacy_guarantor_checkouts_message')
1033 .text(_("Your setting has been updated!"))
1037 error: function () {
1038 $('#update_privacy_guarantor_checkouts_message')
1040 .text(_("Unable to update your setting!"))
1048 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1049 $('#update_privacy_guarantor_fines').click( function() {
1050 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1052 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1054 data: JSON.stringify({
1055 allowed: can_see_charges
1057 contentType: 'application/json',
1058 success: function() {
1059 $('#update_privacy_guarantor_fines_message')
1061 .text( _("Your setting has been updated!") )
1066 $('#update_privacy_guarantor_fines_message')
1068 .text( _("Unable to update your setting!") )
1077 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1079 .find('textarea').attr('value', '').end()
1080 .find('select').attr('value', '').end();
1085 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1086 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1088 var newId = 50 + parseInt(Math.random() * 100000);
1089 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1090 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1096 $(".cleardate").on("click", function(){
1097 $('#borrower_dateofbirth').val('');
1101 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1102 $("#borrower_email").bind("cut copy paste", function(e){
1104 $("#borrower_email").bind("contextmenu", function(e){
1108 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1110 $("#borrower_repeat_email").bind("contextmenu", function(e){
1117 var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1118 var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1119 var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1120 var default_strong_password = [% defaultCategory.effective_require_strong_password ? defaultCategory.effective_require_strong_password : 0 | html %];
1121 $(document).ready(function() {
1122 var setPwdMessage = function() {
1123 var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1124 var min_length = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1125 $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_length));
1128 $('select#borrower_categorycode').change(setPwdMessage);
1133 [% PROCESS 'password_check.inc' new_password => 'borrower_password', category_selector => '#borrower_categorycode', RequireStrongPassword => patron ? patron.category.effective_require_strong_password : defaultCategory.effective_require_strong_password, minPasswordLength => patron ? patron.category.effective_min_password_length : defaultCategory.effective_min_password_length %]