3 [% USE AuthorisedValues %]
9 [% USE AdditionalContents %]
10 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
11 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
12 [% SET userupdateview = 1 %]
13 [% BLOCK streetnumber %]
14 [% UNLESS hidden.defined('streetnumber') %]
16 <label for="borrower_streetnumber" class="[% required.streetnumber | html %]">Street number:</label>
18 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber | html %]" class="[% required.streetnumber | html %]" />
19 <div class="required_label [% required.streetnumber | html %]">Required</div>
24 [% INCLUDE 'doc-head-open.inc' %]
25 <title>[% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
26 [% INCLUDE 'doc-head-close.inc' %]
27 [% BLOCK cssinclude %][% END %]
30 [% IF action == 'edit' %]
31 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
33 <body id="opac-patron-registration" class="opac">
35 [% INCLUDE 'masthead.inc' %]
38 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
39 <ol class="breadcrumb">
40 <li class="breadcrumb-item">
41 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
43 [% IF action == 'edit' %]
44 <li class="breadcrumb-item">
45 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
47 <li class="breadcrumb-item active">
48 <a href="#">Your personal details</a>
51 <li class="breadcrumb-item active">
52 <a href="#" aria-current="page">Register a new account</a>
56 </nav> <!-- /#breadcrumbs -->
58 <div class="container-fluid">
60 <div class="col col-lg-2 order-2 order-lg-1">
62 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
65 <div class="col-md-12 col-lg-10 order-1">
67 <h1>Your personal details</h1>
69 [% IF action == 'edit' %]
70 <div id="update-account" class="maincontent">
72 <div id="add-account" class="maincontent">
75 [% IF action == 'edit' %]
76 [% UNLESS OPACPatronDetails %]
77 <div class="alert alert-info">To make changes to your record please contact the library.</div>
80 <div class="alert alert-error">No changes were made.</div>
84 [% IF empty_mandatory_fields %]
85 <div class="alert alert-warning">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
88 [% IF invalid_form_fields %]
89 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
91 [% FOREACH field IN invalid_form_fields %]
92 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
93 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
94 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
95 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
96 [% IF field == "password_too_short" %]
97 <li>Password must be at least [% patron.category.effective_min_password_length | html %] characters long.</li>
99 [% IF field == "password_too_weak" %]
100 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
102 [% IF field == "password_has_whitespaces" %]
103 <li>Password must not contain leading or trailing whitespaces.</li>
105 [% IF field == "duplicate_email" %]
106 <li>This email address already exists in our database.</li>
108 [% IF field == "email_match" %]
109 <li>Emails do not match! <a href="#borrower_repeat_email">confirm email address</a></li>
113 <span>Please correct and resubmit.</span>
117 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
118 <div class="alert alert-error">
119 [% IF cardnumber_wrong_length %]
120 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
121 [% ELSIF cardnumber_already_exists %]
122 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
124 <span>Please correct and resubmit.</span>
128 [% IF failed_captcha %]
129 <div class="alert alert-warning">You typed in the wrong characters in the box before submitting. Please try again.</div>
132 [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
135 <fieldset class="rows" id="memberentry_privacy">
136 <legend id="privacy_legend">Privacy</legend>
138 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
140 <label>Allow your guarantor to view your current checkouts?</label>
141 <select id="privacy_guarantor_checkouts">
142 <option value="0">No</option>
143 [% IF borrower.privacy_guarantor_checkouts %]
144 <option value="1" selected="selected">Yes</option>
146 <option value="1">Yes</option>
150 <a id="update_privacy_guarantor_checkouts" href="#" class="btn btn-primary">Update</a>
151 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
156 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
158 <label>Allow your guarantor to view your current fines?</label>
159 <select id="privacy_guarantor_fines">
160 <option value="0">No</option>
161 [% IF borrower.privacy_guarantor_fines %]
162 <option value="1" selected="selected">Yes</option>
164 <option value="1">Yes</option>
168 <a id="update_privacy_guarantor_fines" href="#" class="btn btn-primary">Update</a>
169 <span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span>
177 [% FOREACH gr IN patron.guarantor_relationships %]
178 [% SET g = gr.guarantor %]
179 [% g.firstname | html %] [% g.surname | html %]
180 [%- IF ! loop.last %], [% END %]
190 [% IF ( extended_unique_id_failed_code ) %]
191 <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>
194 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
196 [% 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' ] %]
197 [% IF mandatory.defined( field ) %]
198 [% SET required.$field = 'required' %]
202 [%# Following on one line for translatability %]
203 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
206 <fieldset class="rows" id="memberentry_library">
208 <legend id="library_legend">Library</legend>
210 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
213 <label for="borrower_cardnumber" class="[% required.cardnumber | html %]">Library card number:</label>
215 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) && action == 'edit' %]
216 [% borrower.cardnumber | html %]
218 [% IF minlength_cardnumber == maxlength_cardnumber %]
219 <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 %]" />
220 <div class="required_label [% required.cardnumber | html %]">Required</div>
221 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
222 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
223 <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 %]" />
224 <div class="required_label [% required.cardnumber | html %]">Required</div>
225 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
226 [% ELSIF maxlength_cardnumber %]
227 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" class="[% required.cardnumber | html %]" />
228 <div class="required_label [% required.cardnumber | html %]">Required</div>
229 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
231 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" class="[% required.cardnumber | html %]" />
232 <div class="required_label [% required.cardnumber | html %]">Required</div>
233 <div class="hint">There is no minimum or maximum character length.</div>
239 [% UNLESS hidden.defined('dateexpiry') %]
241 <label>Expiration date:</label>
242 [% borrower.dateexpiry | $KohaDates %]
246 [% UNLESS hidden.defined('branchcode') %]
248 [% IF ( libraries.size > 1 ) %]
249 <label for="borrower_branchcode" class="[% required.branchcode | html %]">Home library:</label>
251 <select id="borrower_branchcode" name="borrower_branchcode" class="[% required.branchcode | html %]">
252 [% FOREACH l IN libraries %]
253 [% IF l.branchcode == borrower.branchcode %]
254 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
256 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
260 <div class="required_label [% required.branchcode | html %]">Required</div>
262 <span class="label">Home library:</span>
263 [% FOREACH l IN libraries %]
264 [% l.branchname | html %]
265 <input type="hidden" name="borrower_branchcode" value="[% l.branchcode | html %]" />
271 [% UNLESS hidden.defined('categorycode') %]
273 <label for="borrower_categorycode" class="[% required.categorycode | html %]">
277 [% Categories.GetName( borrower.categorycode ) | html %]
278 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
280 <select id="borrower_categorycode" name="borrower_categorycode" class="[% required.categorycode | html %]">
281 [% FOREACH c IN Categories.all() %]
282 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
283 <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>
285 <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>
289 <div class="required_label [% required.categorycode | html %]">Required</div>
295 </div> <!-- /.col -->
296 </div> <!-- /.row -->
297 [% END # / defined 'branchcode' %]
299 [%# Following on one line for translatability %]
300 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
303 <fieldset class="rows" id="memberentry_identity">
304 <legend id="identity_legend">Identity</legend>
307 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
309 <label for="borrower_title" class="[% required.title | html %]">Salutation:</label>
311 <select id="borrower_title" name="borrower_title" class="[% required.title | html %]">
312 <option value=""></option>
313 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
314 [% IF mt == borrower.title %]
315 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
317 <option value="[% mt | html %]">[% mt | html %]</option>
321 <div class="required_label [% required.title | html %]">Required</div>
325 [% UNLESS hidden.defined('surname') %]
327 <label for="borrower_surname" class="[% required.surname | html %]">Surname:</label>
329 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" class="[% required.surname | html %]" />
330 <div class="required_label [% required.surname | html %]">Required</div>
334 [% UNLESS hidden.defined('firstname') %]
336 <label for="borrower_firstname" class="[% required.firstname | html %]">First name:</label>
338 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" class="[% required.firstname | html %]" />
339 <div class="required_label [% required.firstname | html %]">Required</div>
343 [% UNLESS hidden.defined('dateofbirth') %]
345 <label for="borrower_dateofbirth" class="[% required.dateofbirth | html %]">Date of birth:</label>
347 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" class="[% required.dateofbirth | html %]" />
349 [% UNLESS action == 'edit' && !OPACPatronDetails %]
350 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
351 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
355 <div class="required_label [% required.dateofbirth | html %]">Required</div>
359 [% UNLESS hidden.defined('initials') %]
361 <label for="borrower_initials" class="[% required.initials | html %]">Initials:</label>
363 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" class="[% required.initials | html %]" />
364 <div class="required_label [% required.initials | html %]">Required</div>
368 [% UNLESS hidden.defined('othernames') %]
370 <label for="borrower_othernames" class="[% required.othernames | html %]">Other names:</label>
372 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" class="[% required.othernames | html %]" />
373 <div class="required_label [% required.initials | html %]">Required</div>
377 [% UNLESS hidden.defined('sex') %]
379 <div class="label"></div>
380 <label for="sex-female" class="radio inline"><span class="patronsex-female">Female:</span></label>
381 [% IF borrower.sex == 'F' %]
382 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
384 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
387 <label for="sex-male" class="radio inline"><span class="patronsex-male">Male:</span></label>
388 [% IF borrower.sex == 'M' %]
389 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
391 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
394 <label for="sex-other" class="radio inline"><span class="patronsex-other">Other:</span></label>
395 [% IF borrower.sex == 'O' %]
396 <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" />
398 <input type="radio" name="borrower_sex" id="sex-other" value="O" />
401 <label for="sex-none" class="radio inline"><span class="patronsex-none">None specified:</span></label>
402 [% IF borrower.sex == '' %]
403 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
405 <input type="radio" name="borrower_sex" id="sex-none" value="" />
411 </div> <!-- /.col -->
412 [% IF ( display_patron_image ) %]
413 <div class="col-sm-2">
414 <p class="patronimage">
415 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
419 </div> <!-- /.row -->
420 [% END # /UNLESS fields hidden %]
422 [%# Following on one line for translatability %]
423 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
426 <fieldset class="rows" id="memberentry_mainaddress">
427 <legend id="mainaddress_legend">Main address</legend>
430 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
432 [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %]
434 [% UNLESS hidden.defined('streettype') %]
436 <label for="borrower_streettype" class="[% required.streettype | html %]">Street type:</label>
438 <select name="borrower_streettype" name="borrower_streettype" class="[% required.streettype | html %]">
439 <option value=""></option>
440 [% FOR roadtype IN roadtypes %]
441 [% IF roadtype.authorised_value == patron.streettype %]
442 <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib_opac OR roadtype.lib | html %]</option>
444 <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib_opac OR roadtype.lib | html %]</option>
448 <div class="required_label [% required.streettype | html %]">Required</div>
453 [% UNLESS hidden.defined('address') %]
455 <label for="borrower_address" class="[% required.address | html %]">Address:</label>
457 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" class="[% required.address | html %]" />
458 <div class="required_label [% required.address | html %]">Required</div>
462 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
464 [% UNLESS hidden.defined('address2') %]
466 <label for="borrower_address2" class="[% required.address2 | html %]">Address 2:</label>
468 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" class="[% required.address2 | html %]" />
469 <div class="required_label [% required.address2 | html %]">Required</div>
473 [% UNLESS hidden.defined('city') %]
475 <label for="borrower_city" class="[% required.city | html %]">City:</label>
477 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" class="[% required.city | html %]" />
478 <div class="required_label [% required.city | html %]">Required</div>
482 [% UNLESS hidden.defined('state') %]
484 <label for="borrower_state" class="[% required.state | html %]">State:</label>
486 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" class="[% required.state | html %]" />
487 <div class="required_label [% required.state | html %]">Required</div>
491 [% UNLESS hidden.defined('zipcode') %]
493 <label for="borrower_zipcode" class="[% required.zipcode | html %]">ZIP/Postal code:</label>
495 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" class="[% required.zipcode | html %]" />
496 <div class="required_label [% required.zipcode | html %]">Required</div>
500 [% UNLESS hidden.defined('country') %]
502 <label for="borrower_country" class="[% required.country | html %]">Country:</label>
504 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" class="[% required.country | html %]" />
505 <div class="required_label [% required.country | html %]">Required</div>
511 </div> <!-- /.col -->
512 </div> <!-- /.row -->
515 [%# Following on one line for translatability %]
516 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
519 <fieldset class="rows" id="memberentry_contact">
520 <legend id="contact_legend">Contact information</legend>
523 [% UNLESS hidden.defined('phone') %]
525 <label for="borrower_phone" class="[% required.phone | html %]">Primary phone:</label>
527 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" class="[% required.phone | html %]" />
528 <div class="required_label [% required.phone | html %]">Required</div>
532 [% UNLESS hidden.defined('phonepro') %]
534 <label for="borrower_phonepro" class="[% required.phonepro | html %]">Secondary phone:</label>
536 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" class="[% required.phonepro | html %]" />
537 <div class="required_label [% required.phonepro | html %]">Required</div>
541 [% UNLESS hidden.defined('mobile') %]
543 <label for="borrower_mobile" class="[% required.mobile | html %]">Other phone:</label>
545 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" class="[% required.mobile | html %]" />
546 <div class="required_label [% required.mobile | html %]">Required</div>
550 [% UNLESS hidden.defined('email') %]
552 <label for="borrower_email" class="[% required.email | html %]">Primary email:</label>
554 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" class="[% required.email | html %]" />
555 <div class="required_label [% required.email | html %]">Required</div>
558 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
560 <label for="borrower_repeat_email" class="[% required.email | html %]">Confirm primary email:</label>
562 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete="off" class="[% required.email | html %]">
563 <div class="required_label [% required.email | html %]">Required</div>
568 [% UNLESS hidden.defined('emailpro') %]
570 <label for="borrower_emailpro" class="[% required.emailpro | html %]">Secondary email:</label>
572 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" class="[% required.emailpro | html %]" />
573 <div class="required_label [% required.emailpro | html %]">Required</div>
577 [% UNLESS hidden.defined('fax') %]
579 <label for="borrower_fax" class="[% required.fax | html %]">Fax:</label>
581 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" class="[% required.fax | html %]" />
582 <div class="required_label [% required.fax | html %]">Required</div>
586 [% UNLESS hidden.defined('primary_contact_method') %]
588 [% IF ( mandatory.defined('primary_contact_method') ) %]
589 <label for="borrower_primary_contact_method" class="required">Main contact method:</label>
591 <label for="borrower_primary_contact_method">Main contact method:</label>
594 <select id="borrower_primary_contact_method" name="borrower_primary_contact_method">
595 <option value=""></option>
596 [% UNLESS hidden.defined('phone') %]
597 [% IF ( borrower.primary_contact_method == 'phone' ) %]
598 <option value="phone" selected="selected">Primary phone</option>
600 <option value="phone">Primary phone</option>
603 [% UNLESS hidden.defined('phonepro') %]
604 [% IF ( borrower.primary_contact_method == 'phonepro' ) %]
605 <option value="phonepro" selected="selected">Secondary phone</option>
607 <option value="phonepro">Secondary phone</option>
610 [% UNLESS hidden.defined('mobile') %]
611 [% IF ( borrower.primary_contact_method == 'mobile' ) %]
612 <option value="mobile" selected="selected">Other phone</option>
614 <option value="mobile">Other phone</option>
617 [% UNLESS hidden.defined('email') %]
618 [% IF ( borrower.primary_contact_method == 'email' ) %]
619 <option value="email" selected="selected">Primary email</option>
621 <option value="email">Primary email</option>
624 [% UNLESS hidden.defined('emailpro') %]
625 [% IF ( borrower.primary_contact_method == 'emailpro' ) %]
626 <option value="emailpro" selected="selected">Secondary email</option>
628 <option value="emailpro">Secondary email</option>
631 [% UNLESS hidden.defined('fax') %]
632 [% IF ( borrower.primary_contact_method == 'fax' ) %]
633 <option value="fax" selected="selected">Fax</option>
635 <option value="fax">Fax</option>
639 [% IF ( mandatory.defined('primary_contact_method') ) %]<span class="required">Required</span>[% END %]
644 </div> <!-- /.col -->
645 </div> <!-- /.row -->
648 [%# Following on one line for translatability %]
649 [% 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') %]
652 <fieldset class="rows" id="memberentry_alternateaddress">
653 <legend id="alternateaddress_legend">Alternate address</legend>
656 [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %]
658 [% UNLESS hidden.defined('B_streettype') %]
660 <label for="borrower_B_streettype" class="[% required.B_streettype | html %]">Street type:</label>
662 <select name="borrower_B_streettype" name="borrower_B_streettype" class="[% required.B_streettype | html %]">
663 <option value=""></option>
664 [% FOR roadtype IN roadtypes %]
665 [% IF roadtype.authorised_value == patron.streettype %]
666 <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option>
668 <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option>
672 <div class="required_label [% required.B_streettype | html %]">Required</div>
676 [% UNLESS hidden.defined('B_address') %]
678 <label for="borrower_B_address" class="[% required.B_address | html %]">Address:</label>
680 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" class="[% required.B_address | html %]" />
681 <div class="required_label [% required.B_address | html %]">Required</div>
685 [% UNLESS hidden.defined('B_address2') %]
687 <label for="borrower_B_address2" class="[% required.B_address | html %]">Address 2:</label>
689 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" class="[% required.B_address | html %]" />
690 <div class="required_label [% required.B_address2 | html %]">Required</div>
694 [% UNLESS hidden.defined('B_city') %]
696 <label for="borrower_B_city" class="[% required.B_city | html %]">City:</label>
698 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" class="[% required.B_city | html %]" />
699 <div class="required_label [% required.B_city | html %]">Required</div>
703 [% UNLESS hidden.defined('B_state') %]
705 <label for="borrower_B_state" class="[% required.B_state | html %]">State:</label>
707 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" class="[% required.B_state | html %]" />
708 <div class="required_label [% required.B_state | html %]">Required</div>
712 [% UNLESS hidden.defined('B_zipcode') %]
714 <label for="borrower_B_zipcode" class="[% required.B_zipcode | html %]">ZIP/Postal code:</label>
716 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" class="[% required.B_zipcode | html %]" />
717 <div class="required_label [% required.B_zipcode | html %]">Required</div>
721 [% UNLESS hidden.defined('B_country') %]
723 <label for="borrower_B_country" class="[% required.B_country | html %]">Country:</label>
725 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" class="[% required.B_country | html %]" />
726 <div class="required_label [% required.B_country | html %]">Required</div>
730 [% UNLESS hidden.defined('B_phone') %]
732 <label for="borrower_B_phone" class="[% required.B_phone | html %]">Phone:</label>
734 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" class="[% required.B_phone | html %]" />
735 <div class="required_label [% required.B_phone | html %]">Required</div>
739 [% UNLESS hidden.defined('B_email') %]
741 <label for="borrower_B_email" class="[% required.B_email | html %]">Email:</label>
743 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" class="[% required.B_email | html %]" />
744 <div class="required_label [% required.B_email | html %]">Required</div>
748 [% UNLESS hidden.defined('contactnote') %]
750 <label for="borrower_contactnote" class="[% required.contactnote | html %]">Contact note:</label>
752 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2" class="[% required.contactnote | html %]">[% borrower.contactnote | html %]</textarea>
753 <div class="required_label [% required.contactnote | html %]">Required</div>
759 </div> <!-- /.col -->
760 </div> <!-- /.row -->
763 [%# Following on one line for translatability %]
764 [% 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') %]
767 <fieldset class="rows" id="memberentry_alternatecontact">
768 <legend id="alternatecontact_legend">Alternate contact</legend>
771 [% UNLESS hidden.defined('altcontactsurname') %]
773 <label for="borrower_altcontactsurname" class="[% required.altcontactsurname | html %]">Surname:</label>
775 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" class="[% required.altcontactsurname | html %]" />
776 <div class="required_label [% required.altcontactsurname | html %]">Required</div>
780 [% UNLESS hidden.defined('altcontactfirstname') %]
782 <label for="borrower_altcontactfirstname" class="[% required.altcontactfirstname | html %]">First name:</label>
784 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" class="[% required.altcontactfirstname | html %]" />
785 <div class="required_label [% required.altcontactfirstname | html %]">Required</div>
789 [% UNLESS hidden.defined('altcontactaddress1') %]
791 <label for="borrower_altcontactaddress1" class="[% required.altcontactaddress1 | html %]">Address:</label>
793 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" class="[% required.altcontactaddress1 | html %]" />
794 <div class="required_label [% required.altcontactaddress1 | html %]">Required</div>
798 [% UNLESS hidden.defined('altcontactaddress2') %]
800 <label for="borrower_altcontactaddress2" class="[% required.altcontactaddress2 | html %]">Address 2:</label>
802 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" class="[% required.altcontactaddress2 | html %]" />
803 <div class="required_label [% required.altcontactaddress2 | html %]">Required</div>
807 [% UNLESS hidden.defined('altcontactaddress3') %]
809 <label for="borrower_altcontactaddress3" class="[% required.altcontactaddress3 | html %]">City:</label>
811 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" class="[% required.altcontactaddress3 | html %]" />
812 <div class="required_label [% required.altcontactaddress3 | html %]">Required</div>
816 [% UNLESS hidden.defined('altcontactstate') %]
818 <label for="borrower_altcontactstate" class="[% required.altcontactstate | html %]">State:</label>
820 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" class="[% required.altcontactstate | html %]" />
821 <div class="required_label [% required.altcontactstate | html %]">Required</div>
825 [% UNLESS hidden.defined('altcontactzipcode') %]
827 <label for="borrower_altcontactzipcode" class="[% required.altcontactzipcode | html %]">ZIP/Postal code:</label>
829 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" class="[% required.altcontactzipcode | html %]" />
830 <div class="required_label [% required.altcontactzipcode | html %]">Required</div>
834 [% UNLESS hidden.defined('altcontactcountry') %]
836 <label for="borrower_altcontactcountry" class="[% required.altcontactcountry | html %]">Country:</label>
838 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" class="[% required.altcontactcountry | html %]" />
839 <div class="required_label [% required.altcontactcountry | html %]">Required</div>
843 [% UNLESS hidden.defined('altcontactphone') %]
845 <label for="borrower_altcontactphone" class="[% required.altcontactphone | html %]">Phone:</label>
847 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" class="[% required.altcontactphone | html %]" />
848 <div class="required_label [% required.altcontactphone | html %]">Required</div>
853 </div> <!-- /.col -->
854 </div> <!-- /.row -->
857 [% UNLESS action == 'edit' || hidden.defined('password') %]
860 <fieldset class="rows" id="memberentry_password">
861 <legend id="contact_legend">Password</legend>
862 <div class="alert alert-info">
864 [% IF ( patron.category.effective_require_strong_password ) %]
865 <p>Your password must contain at least [% patron.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</p>
867 <p>Your password must be at least [% patron.category.effective_min_password_length | html %] characters long.</p>
870 <p id="password_alert"></p>
872 [% UNLESS mandatory.defined('password') %]
873 <p>If you do not enter a password a system generated password will be created.</p>
878 <li><label for="password" class="[% required.password | html %]">Password:</label>
879 <input type="password" name="borrower_password" id="password" class="[% required.password | html %]" />
880 <div class="required_label [% required.password | html %]">Required</div>
882 <li><label for="password2" class="[% required.password | html %]">Confirm password:</label>
883 <input type="password" name="borrower_password2" id="password2" />
884 <div class="required_label [% required.password | html %]">Required</div>
888 </div> <!-- /.col -->
889 </div> <!-- /.row -->
892 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && ! ( action == 'new' && Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) ) %]
895 [% FOREACH pa_class IN patron_attribute_classes %]
896 [% IF pa_class.class %]
897 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
898 <legend>[% pa_class.lib | html %]</legend>
900 <fieldset class="rows patron-attributes">
901 <legend>Additional information</legend>
903 <ol class="attributes_table">
904 [% FOREACH pa IN pa_class.items %]
905 [% FOREACH pa_value IN pa.values %]
906 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
907 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
908 <li data-category_code="[% pa.type.category_code | html %]">
909 [% IF pa.type.mandatory && pa.type.opac_editable %]
910 <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
912 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
914 [% IF pa.type.opac_editable %]
915 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
916 [% IF ( pa.type.authorised_value_category ) %]
917 <select id="[% form_id | html %]" name="patron_attribute_value">
918 <option value=""></option>
919 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
920 [% IF ( auth_val.authorised_value == pa_value ) %]
921 <option value="[% auth_val.authorised_value | html %]" selected="selected">
922 [% auth_val.lib | html %]
925 <option value="[% auth_val.authorised_value | html %]" >
926 [% auth_val.lib | html %]
932 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
934 [% IF pa.type.mandatory %]
935 <div class="required">Required</div>
937 <a href="#" class="clear-attribute">Clear</a>
938 [% IF ( pa.type.repeatable ) %]
939 <a href="#" class="clone-attribute">New</a>
942 [% IF ( pa.type.authorised_value_category ) %]
943 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
945 [% pa_value | html_line_break %]
954 </div> <!-- /.col -->
955 </div> <!-- /.row -->
958 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
961 <fieldset class="rows" id="memberentry_gdpr_consent">
962 <legend>GDPR consent</legend>
965 <div class="label"></div>
966 <label class="checkbox-label" for="borrower_gdpr_proc_consent">
967 <input type="checkbox" name="borrower_gdpr_proc_consent" id="borrower_gdpr_proc_consent" class="required" value="agreed">
968 I agree with your processing of my personal data as outlined in the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>.
970 <label class="error" for="borrower_gdpr_proc_consent" style="display: none;"></label>
971 <div class="required_label required">Required</div>
975 </div> <!-- /.col -->
976 </div> <!-- /.row -->
979 [% UNLESS action == 'edit' %]
982 <fieldset class="rows" id="memberentry_captcha">
983 <legend>Verification</legend>
987 <label for="captcha" class="required">Verification:</label>
989 <input type="text" name="captcha" id="captcha" style="text-transform: uppercase;" />
990 <div class="required_label required">Required</div>
991 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
993 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
997 </div> <!-- /.col -->
998 </div> <!-- /.row -->
1003 [% IF action == 'edit' %]
1004 [% IF OPACPatronDetails %]
1005 <fieldset class="action">
1006 <input type="hidden" name="action" value="update" />
1007 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
1008 <input type="submit" class="btn btn-primary" value="Submit update request" />
1012 <fieldset class="action">
1013 <input type="hidden" name="action" value="create" />
1014 <input type="submit" class="btn btn-primary" value="Submit" />
1017 </div> <!-- /.col -->
1018 </div> <!-- /.row -->
1022 </div><!--/div#update-account -->
1028 [% INCLUDE 'opac-bottom.inc' %]
1029 [% BLOCK jsinclude %]
1030 [% INCLUDE 'validator-strings.inc' %]
1031 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1032 [% INCLUDE 'calendar.inc' %]
1036 $(document).ready(function() {
1037 [% IF action == 'edit' && !OPACPatronDetails %]
1038 $("#memberentry-form :input").attr('readonly', true);
1039 $("#borrower_branchcode").attr('disabled',true);
1040 $("#borrower_title").attr('disabled',true);
1041 $('#memberentry-form :radio').attr('disabled',true);
1042 $('span.required').remove();
1043 $('label.required').removeClass('required');
1046 $("#memberentry-form").validate({
1051 borrower_repeat_email: {
1052 equalTo: '#borrower_email'
1054 borrower_emailpro: {
1060 borrower_password: {
1061 password_strong: true,
1062 password_no_spaces: true
1064 borrower_password2: {
1065 password_match: true
1071 submitHandler: function(form) {
1072 if (form.beenSubmitted) {
1076 form.beenSubmitted = true;
1082 $("input.required,select.required,textarea.required").rules("add", {
1086 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1088 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1089 $('#update_privacy_guarantor_checkouts').click( function() {
1090 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1092 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1094 data: JSON.stringify({
1095 allowed: can_see_checkouts
1097 contentType: "application/json",
1098 success: function () {
1099 $('#update_privacy_guarantor_checkouts_message')
1101 .text(_("Your setting has been updated!"))
1105 error: function () {
1106 $('#update_privacy_guarantor_checkouts_message')
1108 .text(_("Unable to update your setting!"))
1116 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1117 $('#update_privacy_guarantor_fines').click( function() {
1118 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1120 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1122 data: JSON.stringify({
1123 allowed: can_see_charges
1125 contentType: 'application/json',
1126 success: function() {
1127 $('#update_privacy_guarantor_fines_message')
1129 .text( _("Your setting has been updated!") )
1134 $('#update_privacy_guarantor_fines_message')
1136 .text( _("Unable to update your setting!") )
1145 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1147 .find('textarea').attr('value', '').end()
1148 .find('select').attr('value', '').end();
1153 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1154 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1156 var newId = 50 + parseInt(Math.random() * 100000);
1157 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1158 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1164 $(".cleardate").on("click", function(){
1165 $('#borrower_dateofbirth').val('');
1169 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1170 $("#borrower_email").bind("cut copy paste", function(e){
1172 $("#borrower_email").bind("contextmenu", function(e){
1176 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1178 $("#borrower_repeat_email").bind("contextmenu", function(e){
1185 var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1186 var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1187 var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1188 var default_strong_password = [% defaultCategory.effective_require_strong_password ? defaultCategory.effective_require_strong_password : 0 | html %];
1189 $(document).ready(function() {
1190 var setPwdMessage = function() {
1191 var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1192 var min_length = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1193 $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_length));
1196 $('select#borrower_categorycode').change(setPwdMessage);
1201 [% 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 %]