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 ( libraries.size > 1 ) %]
243 [% IF mandatory.defined('branchcode') %]
244 <label for="borrower_branchcode" class="required">Home library:</label>
246 <label for="borrower_branchcode">Home library:</label>
249 <select id="borrower_branchcode" name="borrower_branchcode">
250 [% FOREACH l IN libraries %]
251 [% IF l.branchcode == borrower.branchcode %]
252 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
254 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
259 <span class="label">Home library:</span>
260 [% FOREACH l IN libraries %]
261 [% l.branchname | html %]
262 <input type="hidden" name="borrower_branchcode" value="[% l.branchcode | html %]" />
268 [% UNLESS hidden.defined('categorycode') %]
270 <label for="borrower_categorycode">
274 [% Categories.GetName( borrower.categorycode ) | html %]
275 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
277 <select id="borrower_categorycode" name="borrower_categorycode">
278 [% FOREACH c IN Categories.all() %]
279 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
280 <option value="[% c.categorycode | html %]" data-pwd-length="[% c.effective_min_password_length | html %]" data-pwd-strong="[% c.effective_require_strong_password | html %]" selected="selected">[% c.description | html %]</option>
282 <option value="[% c.categorycode | html %]" data-pwd-length="[% c.effective_min_password_length | html %]" data-pwd-strong="[% c.effective_require_strong_password | html %]">[% c.description | html %]</option>
291 </div> <!-- /.col -->
292 </div> <!-- /.row -->
293 [% END # / defined 'branchcode' %]
295 [%# Following on one line for translatability %]
296 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
299 <fieldset class="rows" id="memberentry_identity">
300 <legend id="identity_legend">Identity</legend>
303 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
305 [% IF mandatory.defined('title') %]
306 <label for="borrower_title" class="required">Salutation:</label>
308 <label for="borrower_title">Salutation:</label>
311 <select id="borrower_title" name="borrower_title">
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>
324 [% UNLESS hidden.defined('surname') %]
326 [% IF mandatory.defined('surname') %]
327 <label for="borrower_surname" class="required">Surname:</label>
329 <label for="borrower_surname">Surname:</label>
332 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
333 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
337 [% UNLESS hidden.defined('firstname') %]
339 [% IF mandatory.defined('firstname') %]
340 <label for="borrower_firstname" class="required">First name:</label>
342 <label for="borrower_firstname">First name:</label>
345 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
346 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
350 [% UNLESS hidden.defined('dateofbirth') %]
352 [% IF mandatory.defined('dateofbirth') %]
353 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
355 <label for="borrower_dateofbirth">Date of birth:</label>
358 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
360 [% UNLESS action == 'edit' && !OPACPatronDetails %]
361 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
362 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
366 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
370 [% UNLESS hidden.defined('initials') %]
372 [% IF mandatory.defined('initials') %]
373 <label for="borrower_initials" class="required">Initials:</label>
375 <label for="borrower_initials">Initials:</label>
378 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
379 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
383 [% UNLESS hidden.defined('othernames') %]
385 [% IF mandatory.defined('othernames') %]
386 <label for="borrower_othernames" class="required">Other names:</label>
388 <label for="borrower_othernames">Other names:</label>
391 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
392 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
396 [% UNLESS hidden.defined('sex') %]
398 <label for="sex-female" class="radio inline"><span class="patronsex-female">Female:</span></label>
399 [% IF borrower.sex == 'F' %]
400 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
402 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
405 <label for="sex-male" class="radio inline"><span class="patronsex-male">Male:</span></label>
406 [% IF borrower.sex == 'M' %]
407 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
409 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
412 <label for="sex-other" class="radio inline"><span class="patronsex-other">Other:</span></label>
413 [% IF borrower.sex == 'O' %]
414 <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" />
416 <input type="radio" name="borrower_sex" id="sex-other" value="O" />
419 <label for="sex-none" class="radio inline"><span class="patronsex-none">None specified:</span></label>
420 [% IF borrower.sex == '' %]
421 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
423 <input type="radio" name="borrower_sex" id="sex-none" value="" />
429 </div> <!-- /.col -->
430 [% IF ( display_patron_image ) %]
431 <div class="col-sm-2">
432 <p class="patronimage">
433 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
437 </div> <!-- /.row -->
438 [% END # /UNLESS fields hidden %]
440 [%# Following on one line for translatability %]
441 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
444 <fieldset class="rows" id="memberentry_mainaddress">
445 <legend id="mainaddress_legend">Main address</legend>
448 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
450 [% UNLESS hidden.defined('address') %]
452 [% IF mandatory.defined('address') %]
453 <label for="borrower_address" class="required">Address:</label>
455 <label for="borrower_address">Address:</label>
458 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
459 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
463 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
465 [% UNLESS hidden.defined('address2') %]
467 [% IF mandatory.defined('address2') %]
468 <label for="borrower_address2" class="required">Address 2:</label>
470 <label for="borrower_address2">Address 2:</label>
473 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
474 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
478 [% UNLESS hidden.defined('city') %]
480 [% IF mandatory.defined('city') %]
481 <label for="borrower_city" class="required">City:</label>
483 <label for="borrower_city">City:</label>
486 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
487 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
491 [% UNLESS hidden.defined('state') %]
493 [% IF mandatory.defined('state') %]
494 <label for="borrower_state" class="required">State:</label>
496 <label for="borrower_state">State:</label>
499 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
500 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
504 [% UNLESS hidden.defined('zipcode') %]
506 [% IF mandatory.defined('zipcode') %]
507 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
509 <label for="borrower_zipcode">ZIP/Postal code:</label>
512 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
513 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
517 [% UNLESS hidden.defined('country') %]
519 [% IF mandatory.defined('country') %]
520 <label for="borrower_country" class="required">Country:</label>
522 <label for="borrower_country">Country:</label>
525 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
526 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
532 </div> <!-- /.col -->
533 </div> <!-- /.row -->
536 [%# Following on one line for translatability %]
537 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
540 <fieldset class="rows" id="memberentry_contact">
541 <legend id="contact_legend">Contact information</legend>
544 [% UNLESS hidden.defined('phone') %]
546 [% IF mandatory.defined('phone') %]
547 <label for="borrower_phone" class="required">Primary phone:</label>
549 <label for="borrower_phone">Primary phone:</label>
552 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
553 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
557 [% UNLESS hidden.defined('phonepro') %]
559 [% IF mandatory.defined('phonepro') %]
560 <label for="borrower_phonepro" class="required">Secondary phone:</label>
562 <label for="borrower_phonepro">Secondary phone:</label>
565 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
566 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
570 [% UNLESS hidden.defined('mobile') %]
572 [% IF mandatory.defined('mobile') %]
573 <label for="borrower_mobile" class="required">Other phone:</label>
575 <label for="borrower_mobile">Other phone:</label>
578 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
579 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
583 [% UNLESS hidden.defined('email') %]
585 [% IF mandatory.defined('email') %]
586 <label for="borrower_email" class="required">Primary email:</label>
588 <label for="borrower_email">Primary email:</label>
591 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
592 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
595 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
597 [% IF mandatory.defined('email') %]
598 <label for="borrower_repeat_email" class="required">Confirm primary email:</label>
600 <label for="borrower_repeat_email">Confirm primary email:</label>
603 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete=off>
604 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
609 [% UNLESS hidden.defined('emailpro') %]
611 [% IF mandatory.defined('emailpro') %]
612 <label for="borrower_emailpro" class="required">Secondary email:</label>
614 <label for="borrower_emailpro">Secondary email:</label>
617 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
618 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
622 [% UNLESS hidden.defined('fax') %]
624 [% IF mandatory.defined('fax') %]
625 <label for="borrower_fax" class="required">Fax:</label>
627 <label for="borrower_fax">Fax:</label>
630 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
631 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
636 </div> <!-- /.col -->
637 </div> <!-- /.row -->
640 [%# Following on one line for translatability %]
641 [% 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') %]
644 <fieldset class="rows" id="memberentry_alternateaddress">
645 <legend id="alternateaddress_legend">Alternate address</legend>
648 [% UNLESS hidden.defined('B_address') %]
650 [% IF mandatory.defined('B_address') %]
651 <label for="borrower_B_address" class="required">Address:</label>
653 <label for="borrower_B_address">Address:</label>
656 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
657 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
661 [% UNLESS hidden.defined('B_address2') %]
663 [% IF mandatory.defined('B_address2') %]
664 <label for="borrower_B_address2" class="required">Address 2:</label>
666 <label for="borrower_B_address2">Address 2:</label>
669 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
670 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
674 [% UNLESS hidden.defined('B_city') %]
676 [% IF mandatory.defined('B_city') %]
677 <label for="borrower_B_city" class="required">City:</label>
679 <label for="borrower_B_city">City:</label>
682 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
683 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
687 [% UNLESS hidden.defined('B_state') %]
689 [% IF mandatory.defined('B_state') %]
690 <label for="borrower_B_state" class="required">State:</label>
692 <label for="borrower_B_state">State:</label>
695 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
696 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
700 [% UNLESS hidden.defined('B_zipcode') %]
702 [% IF mandatory.defined('B_zipcode') %]
703 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
705 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
708 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
709 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
713 [% UNLESS hidden.defined('B_country') %]
715 [% IF mandatory.defined('B_country') %]
716 <label for="borrower_B_country" class="required">Country:</label>
718 <label for="borrower_B_country">Country:</label>
721 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
722 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
726 [% UNLESS hidden.defined('B_phone') %]
728 [% IF mandatory.defined('B_phone') %]
729 <label for="borrower_B_phone" class="required">Phone:</label>
731 <label for="borrower_B_phone">Phone:</label>
734 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
735 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
739 [% UNLESS hidden.defined('B_email') %]
741 [% IF mandatory.defined('B_email') %]
742 <label for="borrower_B_email" class="required">Email:</label>
744 <label for="borrower_B_email">Email:</label>
747 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
748 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
752 [% UNLESS hidden.defined('contactnote') %]
754 [% IF mandatory.defined('contactnote') %]
755 <label for="borrower_contactnote" class="required">Contact note:</label>
757 <label for="borrower_contactnote">Contact note:</label>
760 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
761 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
767 </div> <!-- /.col -->
768 </div> <!-- /.row -->
771 [%# Following on one line for translatability %]
772 [% 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') %]
775 <fieldset class="rows" id="memberentry_alternatecontact">
776 <legend id="alternatecontact_legend">Alternate contact</legend>
779 [% UNLESS hidden.defined('altcontactsurname') %]
781 [% IF mandatory.defined('altcontactsurname') %]
782 <label for="borrower_altcontactsurname" class="required">Surname:</label>
784 <label for="borrower_altcontactsurname">Surname:</label>
787 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
788 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
792 [% UNLESS hidden.defined('altcontactfirstname') %]
794 [% IF mandatory.defined('altcontactfirstname') %]
795 <label for="borrower_altcontactfirstname" class="required">First name:</label>
797 <label for="borrower_altcontactfirstname">First name:</label>
800 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
801 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
805 [% UNLESS hidden.defined('altcontactaddress1') %]
807 [% IF mandatory.defined('altcontactaddress1') %]
808 <label for="borrower_altcontactaddress1" class="required">Address:</label>
810 <label for="borrower_altcontactaddress1">Address:</label>
813 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
814 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
818 [% UNLESS hidden.defined('altcontactaddress2') %]
820 [% IF mandatory.defined('altcontactaddress2') %]
821 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
823 <label for="borrower_altcontactaddress2">Address 2:</label>
826 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
827 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
831 [% UNLESS hidden.defined('altcontactaddress3') %]
833 [% IF mandatory.defined('altcontactaddress3') %]
834 <label for="borrower_altcontactaddress3" class="required">City:</label>
836 <label for="borrower_altcontactaddress3">City:</label>
839 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
840 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
844 [% UNLESS hidden.defined('altcontactstate') %]
846 [% IF mandatory.defined('altcontactstate') %]
847 <label for="borrower_altcontactstate" class="required">State:</label>
849 <label for="borrower_altcontactstate">State:</label>
852 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
853 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
857 [% UNLESS hidden.defined('altcontactzipcode') %]
859 [% IF mandatory.defined('altcontactzipcode') %]
860 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
862 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
865 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
866 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
870 [% UNLESS hidden.defined('altcontactcountry') %]
872 [% IF mandatory.defined('altcontactcountry') %]
873 <label for="borrower_altcontactcountry" class="required">Country:</label>
875 <label for="borrower_altcontactcountry">Country:</label>
878 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
879 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
883 [% UNLESS hidden.defined('altcontactphone') %]
885 [% IF mandatory.defined('altcontactphone') %]
886 <label for="borrower_altcontactphone" class="required">Phone:</label>
888 <label for="borrower_altcontactphone">Phone:</label>
891 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
892 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
897 </div> <!-- /.col -->
898 </div> <!-- /.row -->
901 [% UNLESS action == 'edit' || hidden.defined('password') %]
904 <fieldset class="rows" id="memberentry_password">
905 <legend id="contact_legend">Password</legend>
906 <div class="alert alert-info">
908 [% IF ( patron.category.effective_require_strong_password ) %]
909 <p>Your password must contain at least [% patron.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</p>
911 <p>Your password must be at least [% patron.category.effective_min_password_length | html %] characters long.</p>
914 <p id="password_alert"></p>
916 [% UNLESS mandatory.defined('password') %]
917 <p>If you do not enter a password a system generated password will be created.</p>
921 [% IF mandatory.defined('password') %]
923 <li><label for="borrower_password" class="required">Password</label>
924 <input type="password" name="borrower_password" id="password" />
925 <span class="required">Required</span>
927 <li><label for="borrower_password2" class="required">Confirm password</label>
928 <input type="password" name="borrower_password2" id="password2" />
929 <span class="required">Required</span>
934 <li><label for="borrower_password">Password</label>
935 <input type="password" name="borrower_password" id="password" />
937 <li><label for="borrower_password2">Confirm password</label>
938 <input type="password" name="borrower_password2" id="password2" />
943 </div> <!-- /.col -->
944 </div> <!-- /.row -->
947 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && ! ( action == 'new' && Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) ) %]
950 [% FOREACH pa_class IN patron_attribute_classes %]
951 [% IF pa_class.class %]
952 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
953 <legend>[% pa_class.lib | html %]</legend>
955 <fieldset class="rows patron-attributes">
956 <legend>Additional information</legend>
958 <ol class="attributes_table">
959 [% FOREACH pa IN pa_class.items %]
960 [% FOREACH pa_value IN pa.values %]
961 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
962 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
963 <li data-category_code="[% pa.type.category_code | html %]">
964 [% IF pa.type.mandatory && pa.type.opac_editable %]
965 <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
967 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
969 [% IF pa.type.opac_editable %]
970 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
971 [% IF ( pa.type.authorised_value_category ) %]
972 <select id="[% form_id | html %]" name="patron_attribute_value">
973 <option value=""></option>
974 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
975 [% IF ( auth_val.authorised_value == pa_value ) %]
976 <option value="[% auth_val.authorised_value | html %]" selected="selected">
977 [% auth_val.lib | html %]
980 <option value="[% auth_val.authorised_value | html %]" >
981 [% auth_val.lib | html %]
987 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
989 [% IF pa.type.mandatory %]
990 <span class="required">Required</span>
992 <a href="#" class="clear-attribute">Clear</a>
993 [% IF ( pa.type.repeatable ) %]
994 <a href="#" class="clone-attribute">New</a>
997 [% IF ( pa.type.authorised_value_category ) %]
998 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
1000 [% pa_value | html_line_break %]
1009 </div> <!-- /.col -->
1010 </div> <!-- /.row -->
1013 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
1016 <fieldset class="rows" id="memberentry_gdpr_consent">
1017 <legend>GDPR consent</legend>
1020 <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>
1024 </div> <!-- /.col -->
1025 </div> <!-- /.row -->
1028 [% UNLESS action == 'edit' %]
1031 <fieldset class="rows" id="memberentry_captcha">
1032 <legend>Verification</legend>
1036 <label for="captcha" class="required">Verification:</label>
1038 <input type="text" name="captcha" id="captcha" />
1039 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
1041 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
1045 </div> <!-- /.col -->
1046 </div> <!-- /.row -->
1051 [% IF action == 'edit' %]
1052 [% IF OPACPatronDetails %]
1053 <fieldset class="action">
1054 <input type="hidden" name="action" value="update" />
1055 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
1056 <input type="submit" class="btn btn-primary" value="Submit update request" />
1060 <fieldset class="action">
1061 <input type="hidden" name="action" value="create" />
1062 <input type="submit" class="btn btn-primary" value="Submit" />
1065 </div> <!-- /.col -->
1066 </div> <!-- /.row -->
1070 </div><!--/div#update-account -->
1076 [% INCLUDE 'opac-bottom.inc' %]
1077 [% BLOCK jsinclude %]
1078 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1079 [% INCLUDE 'calendar.inc' %]
1083 $(document).ready(function() {
1084 [% IF action == 'edit' && !OPACPatronDetails %]
1085 $("#memberentry-form :input").attr('readonly', true);
1086 $("#borrower_branchcode").attr('disabled',true);
1087 $("#borrower_title").attr('disabled',true);
1088 $('#memberentry-form :radio').attr('disabled',true);
1089 $('span.required').remove();
1090 $('label.required').removeClass('required');
1093 $("#memberentry-form").validate({
1098 borrower_repeat_email: {
1099 equalTo: '#borrower_email'
1101 borrower_emailpro: {
1107 borrower_password: {
1108 [% IF mandatory.defined('password') %]
1111 password_strong: true,
1112 password_no_spaces: true
1114 borrower_password2: {
1115 [% IF mandatory.defined('password') %]
1118 password_match: true
1124 submitHandler: function(form) {
1125 if (form.beenSubmitted) {
1129 form.beenSubmitted = true;
1133 errorPlacement: function(error, element) {
1134 offset = element.offset();
1135 error.insertAfter(element)
1136 error.addClass('error'); // add a class to the wrapper
1137 error.css('position', 'absolute');
1138 error.css('left', offset.left + element.outerWidth() + 10);
1139 error.css('top', offset.top);
1140 error.css('width', 'auto');
1144 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1146 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1147 $('#update_privacy_guarantor_checkouts').click( function() {
1148 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1150 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1152 data: JSON.stringify({
1153 allowed: can_see_checkouts
1155 contentType: "application/json",
1156 success: function () {
1157 $('#update_privacy_guarantor_checkouts_message')
1159 .text(_("Your setting has been updated!"))
1163 error: function () {
1164 $('#update_privacy_guarantor_checkouts_message')
1166 .text(_("Unable to update your setting!"))
1174 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1175 $('#update_privacy_guarantor_fines').click( function() {
1176 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1178 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1180 data: JSON.stringify({
1181 allowed: can_see_charges
1183 contentType: 'application/json',
1184 success: function() {
1185 $('#update_privacy_guarantor_fines_message')
1187 .text( _("Your setting has been updated!") )
1192 $('#update_privacy_guarantor_fines_message')
1194 .text( _("Unable to update your setting!") )
1203 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1205 .find('textarea').attr('value', '').end()
1206 .find('select').attr('value', '').end();
1211 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1212 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1214 var newId = 50 + parseInt(Math.random() * 100000);
1215 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1216 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1222 $(".cleardate").on("click", function(){
1223 $('#borrower_dateofbirth').val('');
1227 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1228 $("#borrower_email").bind("cut copy paste", function(e){
1230 $("#borrower_email").bind("contextmenu", function(e){
1234 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1236 $("#borrower_repeat_email").bind("contextmenu", function(e){
1243 var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1244 var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1245 var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1246 var default_strong_password = [% defaultCategory.effective_require_strong_password ? defaultCategory.effective_require_strong_password : 0 | html %];
1247 $(document).ready(function() {
1248 var setPwdMessage = function() {
1249 var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1250 var min_length = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1251 $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_length));
1254 $('select#borrower_categorycode').change(setPwdMessage);
1259 [% 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 %]