3 [% USE AuthorisedValues %]
9 [% USE AdditionalContents %]
10 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
11 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, 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 %]" size="5" maxlength="10" />
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 error_type OR error_info %]
129 <div class="alert alert-error"><li>
130 <p>There were problems processing your registration. Please contact your library for help.</p>
131 [% IF error_type == 'Koha::Exceptions::Patron::InvalidUserid' %]
132 <p>Error: Userid is not valid</p>
134 <p>Error [% error_type | html %]: [% error_info | html %]</p>
139 [% IF failed_captcha %]
140 <div class="alert alert-warning">You typed in the wrong characters in the box before submitting. Please try again.</div>
143 [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
146 <fieldset class="rows" id="memberentry_privacy">
147 <legend id="privacy_legend">Privacy</legend>
149 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
151 <label>Allow your guarantor to view your current checkouts?</label>
152 <select id="privacy_guarantor_checkouts">
153 <option value="0">No</option>
154 [% IF borrower.privacy_guarantor_checkouts %]
155 <option value="1" selected="selected">Yes</option>
157 <option value="1">Yes</option>
161 <a id="update_privacy_guarantor_checkouts" href="#" class="btn btn-primary">Update</a>
162 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
167 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
169 <label>Allow your guarantor to view your current fines?</label>
170 <select id="privacy_guarantor_fines">
171 <option value="0">No</option>
172 [% IF borrower.privacy_guarantor_fines %]
173 <option value="1" selected="selected">Yes</option>
175 <option value="1">Yes</option>
179 <a id="update_privacy_guarantor_fines" href="#" class="btn btn-primary">Update</a>
180 <span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span>
188 [% FOREACH gr IN patron.guarantor_relationships %]
189 [% SET g = gr.guarantor %]
190 [% g.firstname | html %] [% g.middle_name | html %] [% g.surname | html %]
191 [%- IF ! loop.last %], [% END %]
201 [% IF ( extended_unique_id_failed_code ) %]
202 <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>
205 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
207 [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'middle_name' 'dateofbirth' 'initials' 'pronouns' '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' ] %]
208 [% IF mandatory.defined( field ) %]
209 [% SET required.$field = 'required' %]
213 [%# Following on one line for translatability %]
214 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
217 <fieldset class="rows" id="memberentry_library">
219 <legend id="library_legend">Library</legend>
221 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
224 <label for="borrower_cardnumber" class="[% required.cardnumber | html %]">Library card number:</label>
226 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) && action == 'edit' %]
227 [% borrower.cardnumber | html %]
229 [% IF minlength_cardnumber == maxlength_cardnumber %]
230 <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 %]" />
231 <div class="required_label [% required.cardnumber | html %]">Required</div>
232 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
233 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
234 <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 %]" />
235 <div class="required_label [% required.cardnumber | html %]">Required</div>
236 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
237 [% ELSIF maxlength_cardnumber %]
238 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" class="[% required.cardnumber | html %]" />
239 <div class="required_label [% required.cardnumber | html %]">Required</div>
240 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
242 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" class="[% required.cardnumber | html %]" />
243 <div class="required_label [% required.cardnumber | html %]">Required</div>
244 <div class="hint">There is no minimum or maximum character length.</div>
250 [% UNLESS hidden.defined('dateexpiry') %]
252 <label>Expiration date:</label>
253 [% borrower.dateexpiry | $KohaDates %]
257 [% UNLESS hidden.defined('branchcode') %]
259 [% IF libraries.count %]
260 <label for="borrower_branchcode" class="[% required.branchcode | html %]">Home library:</label>
262 <select id="borrower_branchcode" name="borrower_branchcode" class="[% required.branchcode | html %]">
263 [% IF required.branchcode %]
264 <option value=""></option>
266 [% FOREACH l IN libraries %]
267 [% IF l.branchcode == borrower.branchcode %]
268 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
270 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
274 <div class="required_label [% required.branchcode | html %]">Required</div>
276 <span class="label">Home library:</span>
277 [% FOREACH l IN libraries %]
278 [% l.branchname | html %]
279 <input type="hidden" name="borrower_branchcode" value="[% l.branchcode | html %]" />
285 [% UNLESS hidden.defined('categorycode') %]
287 <label for="borrower_categorycode" class="[% required.categorycode | html %]">
291 [% Categories.GetName( borrower.categorycode ) | html %]
292 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
294 <select id="borrower_categorycode" name="borrower_categorycode" class="[% required.categorycode | html %]">
295 [% FOREACH c IN Categories.all() %]
296 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
297 <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>
299 <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>
303 <div class="required_label [% required.categorycode | html %]">Required</div>
309 </div> <!-- /.col -->
310 </div> <!-- /.row -->
311 [% END # / defined 'branchcode' %]
313 [%# Following on one line for translatability %]
314 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('middle_name') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('pronouns') && hidden.defined('othernames') && hidden.defined('sex') %]
317 <fieldset class="rows" id="memberentry_identity">
318 <legend id="identity_legend">Identity</legend>
321 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
323 <label for="borrower_title" class="[% required.title | html %]">Salutation:</label>
325 <select id="borrower_title" name="borrower_title" class="[% required.title | html %]">
326 <option value=""></option>
327 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
328 [% IF mt == borrower.title %]
329 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
331 <option value="[% mt | html %]">[% mt | html %]</option>
335 <div class="required_label [% required.title | html %]">Required</div>
339 [% UNLESS hidden.defined('surname') %]
341 <label for="borrower_surname" class="[% required.surname | html %]">Surname:</label>
343 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" class="[% required.surname | html %]" />
344 <div class="required_label [% required.surname | html %]">Required</div>
348 [% UNLESS hidden.defined('firstname') %]
350 <label for="borrower_firstname" class="[% required.firstname | html %]">First name:</label>
352 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" class="[% required.firstname | html %]" />
353 <div class="required_label [% required.firstname | html %]">Required</div>
357 [% UNLESS hidden.defined('middle_name') %]
359 <label for="borrower_middle_name" class="[% required.middle_name | html %]">Middle name:</label>
361 <input type="text" id="borrower_middle_name" name="borrower_middle_name" value="[% borrower.middle_name | html %]" class="[% required.middle_name | html %]" />
362 <div class="required_label [% required.middle_name | html %]">Required</div>
366 [% UNLESS hidden.defined('dateofbirth') %]
368 <label for="borrower_dateofbirth" class="[% required.dateofbirth | html %]">Date of birth:</label>
370 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | html %]" size="10" class="[% required.dateofbirth | html %] flatpickr pastdate" />
372 <div class="required_label [% required.dateofbirth | html %]">Required</div>
376 [% UNLESS hidden.defined('initials') %]
378 <label for="borrower_initials" class="[% required.initials | html %]">Initials:</label>
380 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" class="[% required.initials | html %]" />
381 <div class="required_label [% required.initials | html %]">Required</div>
385 [% UNLESS hidden.defined('pronouns') %]
387 <label for="borrower_pronouns" class="[% required.pronouns | html %]">Pronouns:</label>
389 <input type="text" id="borrower_pronouns" name="borrower_pronouns" value="[% borrower.pronouns | html %]" class="[% required.prnouns | html %]" />
390 <div class="required_label [% required.pronouns | html %]">Required</div>
394 [% UNLESS hidden.defined('othernames') %]
396 <label for="borrower_othernames" class="[% required.othernames | html %]">Other names:</label>
398 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" class="[% required.othernames | html %]" />
399 <div class="required_label [% required.othernames | html %]">Required</div>
403 [% UNLESS hidden.defined('sex') %]
405 <div class="label"></div>
406 <label for="sex-female" class="radio inline"><span class="patronsex-female">Female:</span></label>
407 [% IF borrower.sex == 'F' %]
408 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
410 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
413 <label for="sex-male" class="radio inline"><span class="patronsex-male">Male:</span></label>
414 [% IF borrower.sex == 'M' %]
415 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
417 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
420 <label for="sex-other" class="radio inline"><span class="patronsex-other">Other:</span></label>
421 [% IF borrower.sex == 'O' %]
422 <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" />
424 <input type="radio" name="borrower_sex" id="sex-other" value="O" />
427 <label for="sex-none" class="radio inline"><span class="patronsex-none">None specified:</span></label>
428 [% IF borrower.sex == '' %]
429 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
431 <input type="radio" name="borrower_sex" id="sex-none" value="" />
437 </div> <!-- /.col -->
438 [% IF ( display_patron_image ) %]
439 <div class="col-sm-2">
440 <p class="patronimage">
441 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
445 </div> <!-- /.row -->
446 [% END # /UNLESS fields hidden %]
448 [%# Following on one line for translatability %]
449 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
452 <fieldset class="rows" id="memberentry_mainaddress">
453 <legend id="mainaddress_legend">Main address</legend>
456 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
458 [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %]
459 [% IF roadtypes.count %]
460 [% UNLESS hidden.defined('streettype') %]
462 <label for="borrower_streettype" class="[% required.streettype | html %]">Street type:</label>
464 <select name="borrower_streettype" name="borrower_streettype" class="[% required.streettype | html %]">
465 <option value=""></option>
466 [% FOR roadtype IN roadtypes %]
467 [% IF roadtype.authorised_value == patron.streettype %]
468 <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib_opac OR roadtype.lib | html %]</option>
470 <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib_opac OR roadtype.lib | html %]</option>
474 <div class="required_label [% required.streettype | html %]">Required</div>
479 [% UNLESS hidden.defined('address') %]
481 <label for="borrower_address" class="[% required.address | html %]">Address:</label>
483 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" class="[% required.address | html %]" />
484 <div class="required_label [% required.address | html %]">Required</div>
488 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
490 [% UNLESS hidden.defined('address2') %]
492 <label for="borrower_address2" class="[% required.address2 | html %]">Address 2:</label>
494 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" class="[% required.address2 | html %]" />
495 <div class="required_label [% required.address2 | html %]">Required</div>
499 [% UNLESS hidden.defined('city') %]
501 <label for="borrower_city" class="[% required.city | html %]">City:</label>
503 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" class="[% required.city | html %]" />
504 <div class="required_label [% required.city | html %]">Required</div>
508 [% UNLESS hidden.defined('state') %]
510 <label for="borrower_state" class="[% required.state | html %]">State:</label>
512 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" class="[% required.state | html %]" />
513 <div class="required_label [% required.state | html %]">Required</div>
517 [% UNLESS hidden.defined('zipcode') %]
519 <label for="borrower_zipcode" class="[% required.zipcode | html %]">ZIP/Postal code:</label>
521 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" class="[% required.zipcode | html %]" />
522 <div class="required_label [% required.zipcode | html %]">Required</div>
526 [% UNLESS hidden.defined('country') %]
528 <label for="borrower_country" class="[% required.country | html %]">Country:</label>
530 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" class="[% required.country | html %]" />
531 <div class="required_label [% required.country | html %]">Required</div>
537 </div> <!-- /.col -->
538 </div> <!-- /.row -->
541 [%# Following on one line for translatability %]
542 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
545 <fieldset class="rows" id="memberentry_contact">
546 <legend id="contact_legend">Contact information</legend>
549 [% UNLESS hidden.defined('phone') %]
551 <label for="borrower_phone" class="[% required.phone | html %]">Primary phone:</label>
553 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" class="[% required.phone | html %]" />
554 <div class="required_label [% required.phone | html %]">Required</div>
558 [% UNLESS hidden.defined('phonepro') %]
560 <label for="borrower_phonepro" class="[% required.phonepro | html %]">Secondary phone:</label>
562 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" class="[% required.phonepro | html %]" />
563 <div class="required_label [% required.phonepro | html %]">Required</div>
567 [% UNLESS hidden.defined('mobile') %]
569 <label for="borrower_mobile" class="[% required.mobile | html %]">Other phone:</label>
571 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" class="[% required.mobile | html %]" />
572 <div class="required_label [% required.mobile | html %]">Required</div>
576 [% UNLESS hidden.defined('email') %]
578 <label for="borrower_email" class="[% required.email | html %]">Primary email:</label>
580 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" class="[% required.email | html %]" />
581 <div class="required_label [% required.email | html %]">Required</div>
584 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
586 <label for="borrower_repeat_email" class="[% required.email | html %]">Confirm primary email:</label>
588 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete="off" class="[% required.email | html %]">
589 <div class="required_label [% required.email | html %]">Required</div>
594 [% UNLESS hidden.defined('emailpro') %]
596 <label for="borrower_emailpro" class="[% required.emailpro | html %]">Secondary email:</label>
598 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" class="[% required.emailpro | html %]" />
599 <div class="required_label [% required.emailpro | html %]">Required</div>
603 [% UNLESS hidden.defined('fax') %]
605 <label for="borrower_fax" class="[% required.fax | html %]">Fax:</label>
607 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" class="[% required.fax | html %]" />
608 <div class="required_label [% required.fax | html %]">Required</div>
612 [% UNLESS hidden.defined('primary_contact_method') %]
614 [% IF ( mandatory.defined('primary_contact_method') ) %]
615 <label for="borrower_primary_contact_method" class="required">Main contact method:</label>
617 <label for="borrower_primary_contact_method">Main contact method:</label>
620 <select id="borrower_primary_contact_method" name="borrower_primary_contact_method">
621 <option value=""></option>
622 [% UNLESS hidden.defined('phone') %]
623 [% IF ( borrower.primary_contact_method == 'phone' ) %]
624 <option value="phone" selected="selected">Primary phone</option>
626 <option value="phone">Primary phone</option>
629 [% UNLESS hidden.defined('phonepro') %]
630 [% IF ( borrower.primary_contact_method == 'phonepro' ) %]
631 <option value="phonepro" selected="selected">Secondary phone</option>
633 <option value="phonepro">Secondary phone</option>
636 [% UNLESS hidden.defined('mobile') %]
637 [% IF ( borrower.primary_contact_method == 'mobile' ) %]
638 <option value="mobile" selected="selected">Other phone</option>
640 <option value="mobile">Other phone</option>
643 [% UNLESS hidden.defined('email') %]
644 [% IF ( borrower.primary_contact_method == 'email' ) %]
645 <option value="email" selected="selected">Primary email</option>
647 <option value="email">Primary email</option>
650 [% UNLESS hidden.defined('emailpro') %]
651 [% IF ( borrower.primary_contact_method == 'emailpro' ) %]
652 <option value="emailpro" selected="selected">Secondary email</option>
654 <option value="emailpro">Secondary email</option>
657 [% UNLESS hidden.defined('fax') %]
658 [% IF ( borrower.primary_contact_method == 'fax' ) %]
659 <option value="fax" selected="selected">Fax</option>
661 <option value="fax">Fax</option>
665 [% IF ( mandatory.defined('primary_contact_method') ) %]<span class="required">Required</span>[% END %]
670 </div> <!-- /.col -->
671 </div> <!-- /.row -->
674 [%# Following on one line for translatability %]
675 [% 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') %]
678 <fieldset class="rows" id="memberentry_alternateaddress">
679 <legend id="alternateaddress_legend">Alternate address</legend>
682 [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %]
683 [% IF roadtypes.count %]
684 [% UNLESS hidden.defined('B_streettype') %]
686 <label for="borrower_B_streettype" class="[% required.B_streettype | html %]">Street type:</label>
688 <select name="borrower_B_streettype" name="borrower_B_streettype" class="[% required.B_streettype | html %]">
689 <option value=""></option>
690 [% FOR roadtype IN roadtypes %]
691 [% IF roadtype.authorised_value == patron.streettype %]
692 <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option>
694 <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option>
698 <div class="required_label [% required.B_streettype | html %]">Required</div>
702 [% UNLESS hidden.defined('B_address') %]
704 <label for="borrower_B_address" class="[% required.B_address | html %]">Address:</label>
706 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" class="[% required.B_address | html %]" />
707 <div class="required_label [% required.B_address | html %]">Required</div>
711 [% UNLESS hidden.defined('B_address2') %]
713 <label for="borrower_B_address2" class="[% required.B_address | html %]">Address 2:</label>
715 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" class="[% required.B_address | html %]" />
716 <div class="required_label [% required.B_address2 | html %]">Required</div>
720 [% UNLESS hidden.defined('B_city') %]
722 <label for="borrower_B_city" class="[% required.B_city | html %]">City:</label>
724 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" class="[% required.B_city | html %]" />
725 <div class="required_label [% required.B_city | html %]">Required</div>
729 [% UNLESS hidden.defined('B_state') %]
731 <label for="borrower_B_state" class="[% required.B_state | html %]">State:</label>
733 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" class="[% required.B_state | html %]" />
734 <div class="required_label [% required.B_state | html %]">Required</div>
738 [% UNLESS hidden.defined('B_zipcode') %]
740 <label for="borrower_B_zipcode" class="[% required.B_zipcode | html %]">ZIP/Postal code:</label>
742 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" class="[% required.B_zipcode | html %]" />
743 <div class="required_label [% required.B_zipcode | html %]">Required</div>
747 [% UNLESS hidden.defined('B_country') %]
749 <label for="borrower_B_country" class="[% required.B_country | html %]">Country:</label>
751 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" class="[% required.B_country | html %]" />
752 <div class="required_label [% required.B_country | html %]">Required</div>
756 [% UNLESS hidden.defined('B_phone') %]
758 <label for="borrower_B_phone" class="[% required.B_phone | html %]">Phone:</label>
760 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" class="[% required.B_phone | html %]" />
761 <div class="required_label [% required.B_phone | html %]">Required</div>
765 [% UNLESS hidden.defined('B_email') %]
767 <label for="borrower_B_email" class="[% required.B_email | html %]">Email:</label>
769 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" class="[% required.B_email | html %]" />
770 <div class="required_label [% required.B_email | html %]">Required</div>
774 [% UNLESS hidden.defined('contactnote') %]
776 <label for="borrower_contactnote" class="[% required.contactnote | html %]">Contact note:</label>
778 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2" class="[% required.contactnote | html %]">[% borrower.contactnote | html %]</textarea>
779 <div class="required_label [% required.contactnote | html %]">Required</div>
785 </div> <!-- /.col -->
786 </div> <!-- /.row -->
789 [%# Following on one line for translatability %]
790 [% 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') %]
793 <fieldset class="rows" id="memberentry_alternatecontact">
794 <legend id="alternatecontact_legend">Alternate contact</legend>
797 [% UNLESS hidden.defined('altcontactsurname') %]
799 <label for="borrower_altcontactsurname" class="[% required.altcontactsurname | html %]">Surname:</label>
801 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" class="[% required.altcontactsurname | html %]" />
802 <div class="required_label [% required.altcontactsurname | html %]">Required</div>
806 [% UNLESS hidden.defined('altcontactfirstname') %]
808 <label for="borrower_altcontactfirstname" class="[% required.altcontactfirstname | html %]">First name:</label>
810 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" class="[% required.altcontactfirstname | html %]" />
811 <div class="required_label [% required.altcontactfirstname | html %]">Required</div>
815 [% UNLESS hidden.defined('altcontactaddress1') %]
817 <label for="borrower_altcontactaddress1" class="[% required.altcontactaddress1 | html %]">Address:</label>
819 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" class="[% required.altcontactaddress1 | html %]" />
820 <div class="required_label [% required.altcontactaddress1 | html %]">Required</div>
824 [% UNLESS hidden.defined('altcontactaddress2') %]
826 <label for="borrower_altcontactaddress2" class="[% required.altcontactaddress2 | html %]">Address 2:</label>
828 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" class="[% required.altcontactaddress2 | html %]" />
829 <div class="required_label [% required.altcontactaddress2 | html %]">Required</div>
833 [% UNLESS hidden.defined('altcontactaddress3') %]
835 <label for="borrower_altcontactaddress3" class="[% required.altcontactaddress3 | html %]">City:</label>
837 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" class="[% required.altcontactaddress3 | html %]" />
838 <div class="required_label [% required.altcontactaddress3 | html %]">Required</div>
842 [% UNLESS hidden.defined('altcontactstate') %]
844 <label for="borrower_altcontactstate" class="[% required.altcontactstate | html %]">State:</label>
846 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" class="[% required.altcontactstate | html %]" />
847 <div class="required_label [% required.altcontactstate | html %]">Required</div>
851 [% UNLESS hidden.defined('altcontactzipcode') %]
853 <label for="borrower_altcontactzipcode" class="[% required.altcontactzipcode | html %]">ZIP/Postal code:</label>
855 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" class="[% required.altcontactzipcode | html %]" />
856 <div class="required_label [% required.altcontactzipcode | html %]">Required</div>
860 [% UNLESS hidden.defined('altcontactcountry') %]
862 <label for="borrower_altcontactcountry" class="[% required.altcontactcountry | html %]">Country:</label>
864 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" class="[% required.altcontactcountry | html %]" />
865 <div class="required_label [% required.altcontactcountry | html %]">Required</div>
869 [% UNLESS hidden.defined('altcontactphone') %]
871 <label for="borrower_altcontactphone" class="[% required.altcontactphone | html %]">Phone:</label>
873 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" class="[% required.altcontactphone | html %]" />
874 <div class="required_label [% required.altcontactphone | html %]">Required</div>
879 </div> <!-- /.col -->
880 </div> <!-- /.row -->
883 [% UNLESS action == 'edit' || hidden.defined('password') %]
886 <fieldset class="rows" id="memberentry_password">
887 <legend id="contact_legend">Password</legend>
888 <div class="alert alert-info">
890 [% IF ( patron.category.effective_require_strong_password ) %]
891 <p>Your password must contain at least [% patron.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</p>
893 <p>Your password must be at least [% patron.category.effective_min_password_length | html %] characters long.</p>
896 <p id="password_alert"></p>
898 [% UNLESS mandatory.defined('password') %]
899 <p>If you do not enter a password a system generated password will be created.</p>
904 <li><label for="password" class="[% required.password | html %]">Password:</label>
905 <input type="password" name="borrower_password" id="password" class="[% required.password | html %]" />
906 <div class="required_label [% required.password | html %]">Required</div>
908 <li><label for="password2" class="[% required.password | html %]">Confirm password:</label>
909 <input type="password" name="borrower_password2" id="password2" />
910 <div class="required_label [% required.password | html %]">Required</div>
914 </div> <!-- /.col -->
915 </div> <!-- /.row -->
918 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size ) %]
921 [% FOREACH pa_class IN patron_attribute_classes %]
922 [% IF pa_class.class %]
923 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
924 <legend>[% pa_class.lib | html %]</legend>
926 <fieldset class="rows patron-attributes">
927 <legend>Additional information</legend>
929 <ol class="attributes_table">
930 [% FOREACH pa IN pa_class.items %]
931 [% FOREACH pa_value IN pa.values %]
932 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
933 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
934 <li data-category_code="[% pa.type.category_code | html %]">
935 [% IF pa.type.mandatory && pa.type.opac_editable %]
936 <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
938 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
940 [% IF pa.type.opac_editable %]
941 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
942 [% IF ( pa.type.authorised_value_category ) %]
943 <select id="[% form_id | html %]" name="patron_attribute_value">
944 <option value=""></option>
945 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
946 [% IF ( auth_val.authorised_value == pa_value ) %]
947 <option value="[% auth_val.authorised_value | html %]" selected="selected">
948 [% auth_val.lib | html %]
951 <option value="[% auth_val.authorised_value | html %]" >
952 [% auth_val.lib | html %]
958 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
960 [% IF pa.type.mandatory %]
961 <div class="required">Required</div>
963 <a href="#" class="clear-attribute">Clear</a>
964 [% IF ( pa.type.repeatable ) %]
965 <a href="#" class="clone-attribute">New</a>
968 [% IF ( pa.type.authorised_value_category ) %]
969 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
971 [% pa_value | html_line_break %]
980 </div> <!-- /.col -->
981 </div> <!-- /.row -->
984 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
987 <fieldset class="rows" id="memberentry_gdpr_consent">
988 <legend>GDPR consent</legend>
991 <div class="label"></div>
992 <label class="checkbox-label" for="borrower_gdpr_proc_consent">
993 <input type="checkbox" name="borrower_gdpr_proc_consent" id="borrower_gdpr_proc_consent" class="required" value="agreed">
994 I agree with your processing of my personal data as outlined in the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>.
996 <label class="error" for="borrower_gdpr_proc_consent" style="display: none;"></label>
997 <div class="required_label required">Required</div>
1001 </div> <!-- /.col -->
1002 </div> <!-- /.row -->
1005 [% UNLESS action == 'edit' %]
1008 <fieldset class="rows" id="memberentry_captcha">
1009 <legend>Verification</legend>
1013 <label for="captcha" class="required">Verification:</label>
1015 <input type="text" name="captcha" id="captcha" style="text-transform: uppercase;" />
1016 <div class="required_label required">Required</div>
1017 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
1019 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
1023 </div> <!-- /.col -->
1024 </div> <!-- /.row -->
1029 [% IF action == 'edit' %]
1030 [% IF OPACPatronDetails %]
1031 <fieldset class="action">
1032 <input type="hidden" name="action" value="update" />
1033 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
1034 <input type="submit" class="btn btn-primary" value="Submit update request" />
1038 <fieldset class="action">
1039 <input type="hidden" name="action" value="create" />
1040 <input type="submit" class="btn btn-primary" value="Submit" />
1043 </div> <!-- /.col -->
1044 </div> <!-- /.row -->
1048 </div><!--/div#update-account -->
1054 [% INCLUDE 'opac-bottom.inc' %]
1055 [% BLOCK jsinclude %]
1056 [% INCLUDE 'validator-strings.inc' %]
1057 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1058 [% INCLUDE 'calendar.inc' %]
1062 $(document).ready(function() {
1063 [% IF action == 'edit' && !OPACPatronDetails %]
1064 $("#memberentry-form :input").attr('readonly', true);
1065 $("#borrower_branchcode").attr('disabled',true);
1066 $("#borrower_title").attr('disabled',true);
1067 $('#memberentry-form :radio').attr('disabled',true);
1068 $('span.required').remove();
1069 $('label.required').removeClass('required');
1072 $("#memberentry-form").validate({
1077 borrower_repeat_email: {
1078 equalTo: '#borrower_email'
1080 borrower_emailpro: {
1086 borrower_password: {
1087 password_strong: true,
1088 password_no_spaces: true
1090 borrower_password2: {
1091 password_match: true
1097 submitHandler: function(form) {
1098 if (form.beenSubmitted) {
1102 form.beenSubmitted = true;
1108 if ( $("input.required").length ) {
1109 $("input.required").rules("add", {
1113 if ( $("select.required").length ) {
1114 $("select.required").rules("add", {
1118 if ( $("textarea.required").length ) {
1119 $("textarea.required").rules("add", {
1124 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1126 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1127 $('#update_privacy_guarantor_checkouts').click( function() {
1128 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1130 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1132 data: JSON.stringify({
1133 allowed: can_see_checkouts
1135 contentType: "application/json",
1136 success: function () {
1137 $('#update_privacy_guarantor_checkouts_message')
1139 .text(_("Your setting has been updated!"))
1143 error: function () {
1144 $('#update_privacy_guarantor_checkouts_message')
1146 .text(_("Unable to update your setting!"))
1154 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1155 $('#update_privacy_guarantor_fines').click( function() {
1156 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1158 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1160 data: JSON.stringify({
1161 allowed: can_see_charges
1163 contentType: 'application/json',
1164 success: function() {
1165 $('#update_privacy_guarantor_fines_message')
1167 .text( _("Your setting has been updated!") )
1172 $('#update_privacy_guarantor_fines_message')
1174 .text( _("Unable to update your setting!") )
1183 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1185 .find('textarea').attr('value', '').end()
1186 .find('select').attr('value', '').end();
1191 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1192 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1194 var newId = 50 + parseInt(Math.random() * 100000);
1195 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1196 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1202 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1203 $("#borrower_email").bind("cut copy paste", function(e){
1205 $("#borrower_email").bind("contextmenu", function(e){
1209 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1211 $("#borrower_repeat_email").bind("contextmenu", function(e){
1218 var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1219 var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1220 var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1221 var default_strong_password = [% defaultCategory.effective_require_strong_password ? defaultCategory.effective_require_strong_password : 0 | html %];
1222 $(document).ready(function() {
1223 var setPwdMessage = function() {
1224 var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1225 var min_length = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1226 $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_length));
1229 $('select#borrower_categorycode').change(setPwdMessage);
1234 [% 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 %]