3 [% USE AuthorisedValues %]
9 [% SET userupdateview = 1 %]
10 [% BLOCK streetnumber %]
11 [% UNLESS hidden.defined('streetnumber') %]
13 [% IF mandatory.defined('streetnumber') %]
14 <label for="borrower_streetnumber" class="required">Street number:</label>
16 <label for="borrower_streetnumber">Street number:</label>
19 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber | html %]" />
20 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
25 [% INCLUDE 'doc-head-open.inc' %]
26 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
27 [% INCLUDE 'doc-head-close.inc' %]
28 [% BLOCK cssinclude %][% END %]
31 [% IF action == 'edit' %]
32 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
34 <body id="opac-patron-registration" class="opac">
36 [% INCLUDE 'masthead.inc' %]
39 <nav aria-label="breadcrumb">
40 <ul class="breadcrumb">
41 <li class="breadcrumb-item">
42 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
44 [% IF action == 'edit' %]
45 <li class="breadcrumb-item">
46 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
48 <li class="breadcrumb-item active">
49 <a href="#">Your personal details</a>
52 <li class="breadcrumb-item active">
53 <a href="#">Register a new account</a>
59 <div class="container-fluid">
61 <div class="col col-lg-2 order-2 order-lg-1">
63 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
66 <div class="col-md-12 col-lg-10 order-1">
67 [% IF action == 'edit' %]
68 <div id="update-account" class="maincontent">
70 <div id="add-account" class="maincontent">
73 [% IF action == 'edit' %]
74 [% UNLESS OPACPatronDetails %]
75 <div class="alert alert-info">To make changes to your record please contact the library.</div>
78 <div class="alert alert-error">No changes were made.</div>
82 [% IF empty_mandatory_fields %]
83 <div class="alert alert-warning">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
86 [% IF invalid_form_fields %]
87 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
89 [% FOREACH field IN invalid_form_fields %]
90 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
91 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
92 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
93 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
94 [% IF field == "password_too_short" %]
95 <li>Password must be at least [% patron.category.effective_min_password_length | html %] characters long.</li>
97 [% IF field == "password_too_weak" %]
98 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
100 [% IF field == "password_has_whitespaces" %]
101 <li>Password must not contain leading or trailing whitespaces.</li>
103 [% IF field == "duplicate_email" %]
104 <li>This email address already exists in our database.</li>
106 [% IF field == "email_match" %]
107 <li>Emails do not match! <a href="#borrower_repeat_email">confirm email address</a></li>
111 <span>Please correct and resubmit.</span>
115 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
116 <div class="alert alert-error">
117 [% IF cardnumber_wrong_length %]
118 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
119 [% ELSIF cardnumber_already_exists %]
120 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
122 <span>Please correct and resubmit.</span>
126 [% IF failed_captcha %]
127 <div class="alert alert-warning">You typed in the wrong characters in the box before submitting. Please try again.</div>
130 [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
133 <fieldset class="rows" id="memberentry_privacy">
134 <legend id="privacy_legend">Privacy</legend>
136 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
138 <label>Allow your guarantor to view your current checkouts?</label>
139 <select id="privacy_guarantor_checkouts">
140 <option value="0">No</option>
141 [% IF borrower.privacy_guarantor_checkouts %]
142 <option value="1" selected="selected">Yes</option>
144 <option value="1">Yes</option>
148 <a id="update_privacy_guarantor_checkouts" href="#" class="btn btn-primary">Update</a>
149 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
154 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
156 <label>Allow your guarantor to view your current fines?</label>
157 <select id="privacy_guarantor_fines">
158 <option value="0">No</option>
159 [% IF borrower.privacy_guarantor_fines %]
160 <option value="1" selected="selected">Yes</option>
162 <option value="1">Yes</option>
166 <a id="update_privacy_guarantor_fines" href="#" class="btn btn-primary">Update</a>
167 <span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span>
175 [% FOREACH gr IN patron.guarantor_relationships %]
176 [% SET g = gr.guarantor %]
177 [% g.firstname | html %] [% g.surname | html %]
178 [%- IF ! loop.last %], [% END %]
188 [% IF ( extended_unique_id_failed_code ) %]
189 <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>
192 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
194 [%# Following on one line for translatability %]
195 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
198 <fieldset class="rows" id="memberentry_library">
200 <legend id="library_legend">Library</legend>
202 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
204 [% IF mandatory.defined('cardnumber') %]
205 <label for="borrower_cardnumber" class="required">Library card number:</label>
207 <label for="borrower_cardnumber">Library card number:</label>
209 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
210 [% borrower.cardnumber | html %]
212 [% IF minlength_cardnumber == maxlength_cardnumber %]
213 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
214 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
215 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
216 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
217 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
218 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
219 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
220 [% ELSIF maxlength_cardnumber %]
221 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
222 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
223 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
225 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" />
226 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
227 <div class="hint">There is no minimum or maximum character length.</div>
233 [% UNLESS hidden.defined('dateexpiry') %]
235 <label>Expiration date:</label>
236 [% borrower.dateexpiry | $KohaDates %]
240 [% UNLESS hidden.defined('branchcode') %]
242 [% IF mandatory.defined('branchcode') %]
243 <label for="borrower_branchcode" class="required">Home library:</label>
245 <label for="borrower_branchcode">Home library:</label>
248 <select id="borrower_branchcode" name="borrower_branchcode">
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>
260 [% UNLESS hidden.defined('categorycode') %]
262 <label for="borrower_categorycode">
266 [% Categories.GetName( borrower.categorycode ) | html %]
267 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
269 <select id="borrower_categorycode" name="borrower_categorycode">
270 [% FOREACH c IN Categories.all() %]
271 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
272 <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>
274 <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>
283 </div> <!-- /.col -->
284 </div> <!-- /.row -->
285 [% END # / defined 'branchcode' %]
287 [%# Following on one line for translatability %]
288 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
291 <fieldset class="rows" id="memberentry_identity">
292 <legend id="identity_legend">Identity</legend>
295 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
297 [% IF mandatory.defined('title') %]
298 <label for="borrower_title" class="required">Salutation:</label>
300 <label for="borrower_title">Salutation:</label>
303 <select id="borrower_title" name="borrower_title">
304 <option value=""></option>
305 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
306 [% IF mt == borrower.title %]
307 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
309 <option value="[% mt | html %]">[% mt | html %]</option>
316 [% UNLESS hidden.defined('surname') %]
318 [% IF mandatory.defined('surname') %]
319 <label for="borrower_surname" class="required">Surname:</label>
321 <label for="borrower_surname">Surname:</label>
324 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
325 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
329 [% UNLESS hidden.defined('firstname') %]
331 [% IF mandatory.defined('firstname') %]
332 <label for="borrower_firstname" class="required">First name:</label>
334 <label for="borrower_firstname">First name:</label>
337 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
338 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
342 [% UNLESS hidden.defined('dateofbirth') %]
344 [% IF mandatory.defined('dateofbirth') %]
345 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
347 <label for="borrower_dateofbirth">Date of birth:</label>
350 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
352 [% UNLESS action == 'edit' && !OPACPatronDetails %]
353 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
354 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
358 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
362 [% UNLESS hidden.defined('initials') %]
364 [% IF mandatory.defined('initials') %]
365 <label for="borrower_initials" class="required">Initials:</label>
367 <label for="borrower_initials">Initials:</label>
370 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
371 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
375 [% UNLESS hidden.defined('othernames') %]
377 [% IF mandatory.defined('othernames') %]
378 <label for="borrower_othernames" class="required">Other names:</label>
380 <label for="borrower_othernames">Other names:</label>
383 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
384 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
388 [% UNLESS hidden.defined('sex') %]
390 <label for="sex-female" class="radio inline"><span class="patronsex-female">Female:</span></label>
391 [% IF borrower.sex == 'F' %]
392 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
394 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
397 <label for="sex-male" class="radio inline"><span class="patronsex-male">Male:</span></label>
398 [% IF borrower.sex == 'M' %]
399 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
401 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
404 <label for="sex-other" class="radio inline"><span class="patronsex-other">Other:</span></label>
405 [% IF borrower.sex == 'O' %]
406 <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" />
408 <input type="radio" name="borrower_sex" id="sex-other" value="O" />
411 <label for="sex-none" class="radio inline"><span class="patronsex-none">None specified:</span></label>
412 [% IF borrower.sex == '' %]
413 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
415 <input type="radio" name="borrower_sex" id="sex-none" value="" />
421 </div> <!-- /.col -->
422 [% IF ( display_patron_image ) %]
423 <div class="col-sm-2">
424 <p class="patronimage">
425 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
429 </div> <!-- /.row -->
430 [% END # /UNLESS fields hidden %]
432 [%# Following on one line for translatability %]
433 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
436 <fieldset class="rows" id="memberentry_mainaddress">
437 <legend id="mainaddress_legend">Main address</legend>
440 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
442 [% UNLESS hidden.defined('address') %]
444 [% IF mandatory.defined('address') %]
445 <label for="borrower_address" class="required">Address:</label>
447 <label for="borrower_address">Address:</label>
450 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
451 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
455 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
457 [% UNLESS hidden.defined('address2') %]
459 [% IF mandatory.defined('address2') %]
460 <label for="borrower_address2" class="required">Address 2:</label>
462 <label for="borrower_address2">Address 2:</label>
465 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
466 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
470 [% UNLESS hidden.defined('city') %]
472 [% IF mandatory.defined('city') %]
473 <label for="borrower_city" class="required">City:</label>
475 <label for="borrower_city">City:</label>
478 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
479 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
483 [% UNLESS hidden.defined('state') %]
485 [% IF mandatory.defined('state') %]
486 <label for="borrower_state" class="required">State:</label>
488 <label for="borrower_state">State:</label>
491 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
492 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
496 [% UNLESS hidden.defined('zipcode') %]
498 [% IF mandatory.defined('zipcode') %]
499 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
501 <label for="borrower_zipcode">ZIP/Postal code:</label>
504 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
505 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
509 [% UNLESS hidden.defined('country') %]
511 [% IF mandatory.defined('country') %]
512 <label for="borrower_country" class="required">Country:</label>
514 <label for="borrower_country">Country:</label>
517 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
518 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
524 </div> <!-- /.col -->
525 </div> <!-- /.row -->
528 [%# Following on one line for translatability %]
529 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
532 <fieldset class="rows" id="memberentry_contact">
533 <legend id="contact_legend">Contact information</legend>
536 [% UNLESS hidden.defined('phone') %]
538 [% IF mandatory.defined('phone') %]
539 <label for="borrower_phone" class="required">Primary phone:</label>
541 <label for="borrower_phone">Primary phone:</label>
544 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
545 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
549 [% UNLESS hidden.defined('phonepro') %]
551 [% IF mandatory.defined('phonepro') %]
552 <label for="borrower_phonepro" class="required">Secondary phone:</label>
554 <label for="borrower_phonepro">Secondary phone:</label>
557 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
558 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
562 [% UNLESS hidden.defined('mobile') %]
564 [% IF mandatory.defined('mobile') %]
565 <label for="borrower_mobile" class="required">Other phone:</label>
567 <label for="borrower_mobile">Other phone:</label>
570 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
571 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
575 [% UNLESS hidden.defined('email') %]
577 [% IF mandatory.defined('email') %]
578 <label for="borrower_email" class="required">Primary email:</label>
580 <label for="borrower_email">Primary email:</label>
583 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
584 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
587 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
589 [% IF mandatory.defined('email') %]
590 <label for="borrower_repeat_email" class="required">Confirm primary email:</label>
592 <label for="borrower_repeat_email">Confirm primary email:</label>
595 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete=off>
596 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
601 [% UNLESS hidden.defined('emailpro') %]
603 [% IF mandatory.defined('emailpro') %]
604 <label for="borrower_emailpro" class="required">Secondary email:</label>
606 <label for="borrower_emailpro">Secondary email:</label>
609 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
610 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
614 [% UNLESS hidden.defined('fax') %]
616 [% IF mandatory.defined('fax') %]
617 <label for="borrower_fax" class="required">Fax:</label>
619 <label for="borrower_fax">Fax:</label>
622 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
623 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
628 </div> <!-- /.col -->
629 </div> <!-- /.row -->
632 [%# Following on one line for translatability %]
633 [% 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') %]
636 <fieldset class="rows" id="memberentry_alternateaddress">
637 <legend id="alternateaddress_legend">Alternate address</legend>
640 [% UNLESS hidden.defined('B_address') %]
642 [% IF mandatory.defined('B_address') %]
643 <label for="borrower_B_address" class="required">Address:</label>
645 <label for="borrower_B_address">Address:</label>
648 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
649 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
653 [% UNLESS hidden.defined('B_address2') %]
655 [% IF mandatory.defined('B_address2') %]
656 <label for="borrower_B_address2" class="required">Address 2:</label>
658 <label for="borrower_B_address2">Address 2:</label>
661 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
662 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
666 [% UNLESS hidden.defined('B_city') %]
668 [% IF mandatory.defined('B_city') %]
669 <label for="borrower_B_city" class="required">City:</label>
671 <label for="borrower_B_city">City:</label>
674 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
675 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
679 [% UNLESS hidden.defined('B_state') %]
681 [% IF mandatory.defined('B_state') %]
682 <label for="borrower_B_state" class="required">State:</label>
684 <label for="borrower_B_state">State:</label>
687 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
688 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
692 [% UNLESS hidden.defined('B_zipcode') %]
694 [% IF mandatory.defined('B_zipcode') %]
695 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
697 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
700 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
701 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
705 [% UNLESS hidden.defined('B_country') %]
707 [% IF mandatory.defined('B_country') %]
708 <label for="borrower_B_country" class="required">Country:</label>
710 <label for="borrower_B_country">Country:</label>
713 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
714 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
718 [% UNLESS hidden.defined('B_phone') %]
720 [% IF mandatory.defined('B_phone') %]
721 <label for="borrower_B_phone" class="required">Phone:</label>
723 <label for="borrower_B_phone">Phone:</label>
726 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
727 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
731 [% UNLESS hidden.defined('B_email') %]
733 [% IF mandatory.defined('B_email') %]
734 <label for="borrower_B_email" class="required">Email:</label>
736 <label for="borrower_B_email">Email:</label>
739 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
740 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
744 [% UNLESS hidden.defined('contactnote') %]
746 [% IF mandatory.defined('contactnote') %]
747 <label for="borrower_contactnote" class="required">Contact note:</label>
749 <label for="borrower_contactnote">Contact note:</label>
752 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
753 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
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 [% IF mandatory.defined('altcontactsurname') %]
774 <label for="borrower_altcontactsurname" class="required">Surname:</label>
776 <label for="borrower_altcontactsurname">Surname:</label>
779 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
780 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
784 [% UNLESS hidden.defined('altcontactfirstname') %]
786 [% IF mandatory.defined('altcontactfirstname') %]
787 <label for="borrower_altcontactfirstname" class="required">First name:</label>
789 <label for="borrower_altcontactfirstname">First name:</label>
792 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
793 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
797 [% UNLESS hidden.defined('altcontactaddress1') %]
799 [% IF mandatory.defined('altcontactaddress1') %]
800 <label for="borrower_altcontactaddress1" class="required">Address:</label>
802 <label for="borrower_altcontactaddress1">Address:</label>
805 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
806 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
810 [% UNLESS hidden.defined('altcontactaddress2') %]
812 [% IF mandatory.defined('altcontactaddress2') %]
813 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
815 <label for="borrower_altcontactaddress2">Address 2:</label>
818 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
819 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
823 [% UNLESS hidden.defined('altcontactaddress3') %]
825 [% IF mandatory.defined('altcontactaddress3') %]
826 <label for="borrower_altcontactaddress3" class="required">City:</label>
828 <label for="borrower_altcontactaddress3">City:</label>
831 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
832 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
836 [% UNLESS hidden.defined('altcontactstate') %]
838 [% IF mandatory.defined('altcontactstate') %]
839 <label for="borrower_altcontactstate" class="required">State:</label>
841 <label for="borrower_altcontactstate">State:</label>
844 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
845 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
849 [% UNLESS hidden.defined('altcontactzipcode') %]
851 [% IF mandatory.defined('altcontactzipcode') %]
852 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
854 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
857 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
858 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
862 [% UNLESS hidden.defined('altcontactcountry') %]
864 [% IF mandatory.defined('altcontactcountry') %]
865 <label for="borrower_altcontactcountry" class="required">Country:</label>
867 <label for="borrower_altcontactcountry">Country:</label>
870 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
871 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
875 [% UNLESS hidden.defined('altcontactphone') %]
877 [% IF mandatory.defined('altcontactphone') %]
878 <label for="borrower_altcontactphone" class="required">Phone:</label>
880 <label for="borrower_altcontactphone">Phone:</label>
883 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
884 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
889 </div> <!-- /.col -->
890 </div> <!-- /.row -->
893 [% UNLESS action == 'edit' || hidden.defined('password') %]
896 <fieldset class="rows" id="memberentry_password">
897 <legend id="contact_legend">Password</legend>
898 <div class="alert alert-info">
900 [% IF ( patron.category.effective_require_strong_password ) %]
901 <p>Your password must contain at least [% patron.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</p>
903 <p>Your password must be at least [% patron.category.effective_min_password_length | html %] characters long.</p>
906 <p id="password_alert"></p>
908 [% UNLESS mandatory.defined('password') %]
909 <p>If you do not enter a password a system generated password will be created.</p>
913 [% IF mandatory.defined('password') %]
915 <li><label for="borrower_password" class="required">Password</label>
916 <input type="password" name="borrower_password" id="password" />
917 <span class="required">Required</span>
919 <li><label for="borrower_password2" class="required">Confirm password</label>
920 <input type="password" name="borrower_password2" id="password2" />
921 <span class="required">Required</span>
926 <li><label for="borrower_password">Password</label>
927 <input type="password" name="borrower_password" id="password" />
929 <li><label for="borrower_password2">Confirm password</label>
930 <input type="password" name="borrower_password2" id="password2" />
935 </div> <!-- /.col -->
936 </div> <!-- /.row -->
939 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && ! ( action == 'new' && Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) ) %]
942 [% FOREACH pa_class IN patron_attribute_classes %]
943 [% IF pa_class.class %]
944 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
945 <legend>[% pa_class.lib | html %]</legend>
947 <fieldset class="rows patron-attributes">
948 <legend>Additional information</legend>
950 <ol class="attributes_table">
951 [% FOREACH pa IN pa_class.items %]
952 [% FOREACH pa_value IN pa.values %]
953 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
954 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
955 <li data-category_code="[% pa.type.category_code | html %]">
956 [% IF pa.type.mandatory && pa.type.opac_editable %]
957 <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
959 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
961 [% IF pa.type.opac_editable %]
962 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
963 [% IF ( pa.type.authorised_value_category ) %]
964 <select id="[% form_id | html %]" name="patron_attribute_value">
965 <option value=""></option>
966 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
967 [% IF ( auth_val.authorised_value == pa_value ) %]
968 <option value="[% auth_val.authorised_value | html %]" selected="selected">
969 [% auth_val.lib | html %]
972 <option value="[% auth_val.authorised_value | html %]" >
973 [% auth_val.lib | html %]
979 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
981 [% IF pa.type.mandatory %]
982 <span class="required">Required</span>
984 <a href="#" class="clear-attribute">Clear</a>
985 [% IF ( pa.type.repeatable ) %]
986 <a href="#" class="clone-attribute">New</a>
989 [% IF ( pa.type.authorised_value_category ) %]
990 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
992 [% pa_value | html_line_break %]
1001 </div> <!-- /.col -->
1002 </div> <!-- /.row -->
1005 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
1008 <fieldset class="rows" id="memberentry_gdpr_consent">
1009 <legend>GDPR consent</legend>
1012 <label></label><span><input type="checkbox" name="borrower_gdpr_proc_consent" value="agreed"> I agree with your processing of my personal data as outlined in the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>. <span class="required">Required</span></span>
1016 </div> <!-- /.col -->
1017 </div> <!-- /.row -->
1020 [% UNLESS action == 'edit' %]
1023 <fieldset class="rows" id="memberentry_captcha">
1024 <legend>Verification</legend>
1028 <label for="captcha" class="required">Verification:</label>
1030 <input type="text" name="captcha" id="captcha" />
1031 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
1033 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
1037 </div> <!-- /.col -->
1038 </div> <!-- /.row -->
1043 [% IF action == 'edit' %]
1044 [% IF OPACPatronDetails %]
1045 <fieldset class="action">
1046 <input type="hidden" name="action" value="update" />
1047 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
1048 <input type="submit" class="btn btn-primary" value="Submit update request" />
1052 <fieldset class="action">
1053 <input type="hidden" name="action" value="create" />
1054 <input type="submit" class="btn btn-primary" value="Submit" />
1057 </div> <!-- /.col -->
1058 </div> <!-- /.row -->
1062 </div><!--/div#update-account -->
1068 [% INCLUDE 'opac-bottom.inc' %]
1069 [% BLOCK jsinclude %]
1070 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1071 [% INCLUDE 'calendar.inc' %]
1075 $(document).ready(function() {
1076 [% IF action == 'edit' && !OPACPatronDetails %]
1077 $("#memberentry-form :input").attr('readonly', true);
1078 $("#borrower_branchcode").attr('disabled',true);
1079 $("#borrower_title").attr('disabled',true);
1080 $('#memberentry-form :radio').attr('disabled',true);
1081 $('span.required').remove();
1082 $('label.required').removeClass('required');
1085 $("#memberentry-form").validate({
1090 borrower_repeat_email: {
1091 equalTo: '#borrower_email'
1093 borrower_emailpro: {
1099 borrower_password: {
1100 [% IF mandatory.defined('password') %]
1103 password_strong: true,
1104 password_no_spaces: true
1106 borrower_password2: {
1107 [% IF mandatory.defined('password') %]
1110 password_match: true
1116 submitHandler: function(form) {
1117 if (form.beenSubmitted) {
1121 form.beenSubmitted = true;
1125 errorPlacement: function(error, element) {
1126 offset = element.offset();
1127 error.insertAfter(element)
1128 error.addClass('error'); // add a class to the wrapper
1129 error.css('position', 'absolute');
1130 error.css('left', offset.left + element.outerWidth() + 10);
1131 error.css('top', offset.top);
1132 error.css('width', 'auto');
1136 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1138 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1139 $('#update_privacy_guarantor_checkouts').click( function() {
1140 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1142 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1144 data: JSON.stringify({
1145 allowed: can_see_checkouts
1147 contentType: "application/json",
1148 success: function () {
1149 $('#update_privacy_guarantor_checkouts_message')
1151 .text(_("Your setting has been updated!"))
1155 error: function () {
1156 $('#update_privacy_guarantor_checkouts_message')
1158 .text(_("Unable to update your setting!"))
1166 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1167 $('#update_privacy_guarantor_fines').click( function() {
1168 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1170 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1172 data: JSON.stringify({
1173 allowed: can_see_charges
1175 contentType: 'application/json',
1176 success: function() {
1177 $('#update_privacy_guarantor_fines_message')
1179 .text( _("Your setting has been updated!") )
1184 $('#update_privacy_guarantor_fines_message')
1186 .text( _("Unable to update your setting!") )
1195 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1197 .find('textarea').attr('value', '').end()
1198 .find('select').attr('value', '').end();
1203 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1204 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1206 var newId = 50 + parseInt(Math.random() * 100000);
1207 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1208 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1214 $(".cleardate").on("click", function(){
1215 $('#borrower_dateofbirth').val('');
1219 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1220 $("#borrower_email").bind("cut copy paste", function(e){
1222 $("#borrower_email").bind("contextmenu", function(e){
1226 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1228 $("#borrower_repeat_email").bind("contextmenu", function(e){
1235 var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1236 var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1237 var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1238 var default_strong_password = [% defaultCategory.effective_require_strong_password | html %];
1239 $(document).ready(function() {
1240 var setPwdMessage = function() {
1241 var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1242 var min_lenght = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1243 $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_lenght));
1246 $('select#borrower_categorycode').change(setPwdMessage);
1251 [% 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 %]