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 <ul class="breadcrumb">
40 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
41 [% IF action == 'edit' %]
42 <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li>
43 <li><a href="#">Your personal details</a></li>
45 <li><a href="#">Register a new account</a></li>
49 <div class="container-fluid">
50 <div class="row-fluid">
53 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
57 [% IF action == 'edit' %]
58 <div id="update-account" class="maincontent">
60 <div id="add-account" class="maincontent">
63 [% IF action == 'edit' %]
64 [% UNLESS OPACPatronDetails %]
65 <div class="alert alert-info">To make changes to your record please contact the library.</div>
68 <div class="alert alert-error">No changes were made.</div>
72 [% IF empty_mandatory_fields %]
73 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
76 [% IF invalid_form_fields %]
77 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
79 [% FOREACH field IN invalid_form_fields %]
80 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
81 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
82 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
83 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
84 [% IF field == "password_too_short" %]
85 <li>Password must be at least [% minPasswordLength | html %] characters long.</li>
87 [% IF field == "password_too_weak" %]
88 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
90 [% IF field == "password_has_whitespaces" %]
91 <li>Password must not contain leading or trailing whitespaces.</li>
93 [% IF field == "duplicate_email" %]
94 <li>This email address already exists in our database.</li>
96 [% IF field == "email_match" %]
97 <li>Emails do not match! <a href="#borrower_repeat_email">confirm email address</a></li>
101 <span>Please correct and resubmit.</span>
105 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
106 <div class="alert alert-error">
107 [% IF cardnumber_wrong_length %]
108 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
109 [% ELSIF cardnumber_already_exists %]
110 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
112 <span>Please correct and resubmit.</span>
116 [% IF failed_captcha %]
117 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
120 [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
121 <fieldset class="rows" id="memberentry_privacy">
122 <legend id="privacy_legend">Privacy</legend>
124 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
126 <label>Allow your guarantor to view your current checkouts?</label>
127 <select id="privacy_guarantor_checkouts">
128 <option value="0">No</option>
129 [% IF borrower.privacy_guarantor_checkouts %]
130 <option value="1" selected="selected">Yes</option>
132 <option value="1">Yes</option>
136 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
137 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
142 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
144 <label>Allow your guarantor to view your current fines?</label>
145 <select id="privacy_guarantor_fines">
146 <option value="0">No</option>
147 [% IF borrower.privacy_guarantor_fines %]
148 <option value="1" selected="selected">Yes</option>
150 <option value="1">Yes</option>
154 <a id="update_privacy_guarantor_fines" href="#" class="btn">Update</a>
155 <span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span>
163 [% FOREACH gr IN patron.guarantor_relationships %]
164 [% SET g = gr.guarantor %]
165 [% g.firstname | html %] [% g.surname | html %]
166 [%- IF ! loop.last %], [% END %]
173 [% IF ( extended_unique_id_failed_code ) %]
174 <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>
177 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
179 [%# Following on one line for translatability %]
180 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
181 <fieldset class="rows" id="memberentry_library">
183 <legend id="library_legend">Library</legend>
185 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
187 [% IF mandatory.defined('cardnumber') %]
188 <label for="borrower_cardnumber" class="required">Library card number:</label>
190 <label for="borrower_cardnumber">Library card number:</label>
192 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
193 [% borrower.cardnumber | html %]
195 [% IF minlength_cardnumber == maxlength_cardnumber %]
196 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
197 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
198 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
199 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
200 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
201 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
202 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
203 [% ELSIF maxlength_cardnumber %]
204 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
205 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
206 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
208 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" />
209 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
210 <div class="hint">There is no minimum or maximum character length.</div>
216 [% UNLESS hidden.defined('dateexpiry') %]
218 <label>Expiration date:</label>
219 [% borrower.dateexpiry | $KohaDates %]
223 [% UNLESS hidden.defined('branchcode') %]
225 [% IF mandatory.defined('branchcode') %]
226 <label for="borrower_branchcode" class="required">Home library:</label>
228 <label for="borrower_branchcode">Home library:</label>
231 <select id="borrower_branchcode" name="borrower_branchcode">
232 [% FOREACH l IN libraries %]
233 [% IF l.branchcode == borrower.branchcode %]
234 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
236 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
243 [% UNLESS hidden.defined('categorycode') %]
245 <label for="borrower_categorycode">
249 [% Categories.GetName( borrower.categorycode ) | html %]
250 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
252 <select id="borrower_categorycode" name="borrower_categorycode">
253 [% FOREACH c IN Categories.all() %]
254 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
255 <option value="[% c.categorycode | html %]" selected="selected">[% c.description | html %]</option>
257 <option value="[% c.categorycode | html %]">[% c.description | html %]</option>
266 [% END # / defined 'branchcode' %]
268 [%# Following on one line for translatability %]
269 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
270 <div class="row-fluid">
271 [% IF ( display_patron_image ) %]
276 <fieldset class="rows" id="memberentry_identity">
277 <legend id="identity_legend">Identity</legend>
280 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
282 [% IF mandatory.defined('title') %]
283 <label for="borrower_title" class="required">Salutation:</label>
285 <label for="borrower_title">Salutation:</label>
288 <select id="borrower_title" name="borrower_title">
289 <option value=""></option>
290 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
291 [% IF mt == borrower.title %]
292 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
294 <option value="[% mt | html %]">[% mt | html %]</option>
301 [% UNLESS hidden.defined('surname') %]
303 [% IF mandatory.defined('surname') %]
304 <label for="borrower_surname" class="required">Surname:</label>
306 <label for="borrower_surname">Surname:</label>
309 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
310 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
314 [% UNLESS hidden.defined('firstname') %]
316 [% IF mandatory.defined('firstname') %]
317 <label for="borrower_firstname" class="required">First name:</label>
319 <label for="borrower_firstname">First name:</label>
322 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
323 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
327 [% UNLESS hidden.defined('dateofbirth') %]
329 [% IF mandatory.defined('dateofbirth') %]
330 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
332 <label for="borrower_dateofbirth">Date of birth:</label>
335 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
337 [% UNLESS action == 'edit' && !OPACPatronDetails %]
338 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
339 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
343 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
347 [% UNLESS hidden.defined('initials') %]
349 [% IF mandatory.defined('initials') %]
350 <label for="borrower_initials" class="required">Initials:</label>
352 <label for="borrower_initials">Initials:</label>
355 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
356 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
360 [% UNLESS hidden.defined('othernames') %]
362 [% IF mandatory.defined('othernames') %]
363 <label for="borrower_othernames" class="required">Other names:</label>
365 <label for="borrower_othernames">Other names:</label>
368 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
369 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
373 [% UNLESS hidden.defined('sex') %]
375 <label for="sex-female" class="radio inline">Female:</label>
376 [% IF borrower.sex == 'F' %]
377 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
379 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
382 <label for="sex-male" class="radio inline">Male:</label>
383 [% IF borrower.sex == 'M' %]
384 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
386 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
389 <label for="sex-none" class="radio inline">None specified: </label>
390 [% IF borrower.sex == '' %]
391 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
393 <input type="radio" name="borrower_sex" id="sex-none" value="" />
396 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
402 [% IF ( display_patron_image ) %]
404 <p class="patronimage">
405 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
410 [% END # /UNLESS fields hidden %]
412 [%# Following on one line for translatability %]
413 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
414 <fieldset class="rows" id="memberentry_mainaddress">
415 <legend id="mainaddress_legend">Main address</legend>
418 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
420 [% UNLESS hidden.defined('address') %]
422 [% IF mandatory.defined('address') %]
423 <label for="borrower_address" class="required">Address:</label>
425 <label for="borrower_address">Address:</label>
428 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
429 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
433 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
435 [% UNLESS hidden.defined('address2') %]
437 [% IF mandatory.defined('address2') %]
438 <label for="borrower_address2" class="required">Address 2:</label>
440 <label for="borrower_address2">Address 2:</label>
443 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
444 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
448 [% UNLESS hidden.defined('city') %]
450 [% IF mandatory.defined('city') %]
451 <label for="borrower_city" class="required">City:</label>
453 <label for="borrower_city">City:</label>
456 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
457 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
461 [% UNLESS hidden.defined('state') %]
463 [% IF mandatory.defined('state') %]
464 <label for="borrower_state" class="required">State:</label>
466 <label for="borrower_state">State:</label>
469 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
470 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
474 [% UNLESS hidden.defined('zipcode') %]
476 [% IF mandatory.defined('zipcode') %]
477 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
479 <label for="borrower_zipcode">ZIP/Postal code:</label>
482 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
483 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
487 [% UNLESS hidden.defined('country') %]
489 [% IF mandatory.defined('country') %]
490 <label for="borrower_country" class="required">Country:</label>
492 <label for="borrower_country">Country:</label>
495 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
496 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
504 [%# Following on one line for translatability %]
505 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
506 <fieldset class="rows" id="memberentry_contact">
507 <legend id="contact_legend">Contact information</legend>
510 [% UNLESS hidden.defined('phone') %]
512 [% IF mandatory.defined('phone') %]
513 <label for="borrower_phone" class="required">Primary phone:</label>
515 <label for="borrower_phone">Primary phone:</label>
518 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
519 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
523 [% UNLESS hidden.defined('phonepro') %]
525 [% IF mandatory.defined('phonepro') %]
526 <label for="borrower_phonepro" class="required">Secondary phone:</label>
528 <label for="borrower_phonepro">Secondary phone:</label>
531 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
532 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
536 [% UNLESS hidden.defined('mobile') %]
538 [% IF mandatory.defined('mobile') %]
539 <label for="borrower_mobile" class="required">Other phone:</label>
541 <label for="borrower_mobile">Other phone:</label>
544 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
545 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
549 [% UNLESS hidden.defined('email') %]
551 [% IF mandatory.defined('email') %]
552 <label for="borrower_email" class="required">Primary email:</label>
554 <label for="borrower_email">Primary email:</label>
557 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
558 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
561 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
563 [% IF mandatory.defined('email') %]
564 <label for="borrower_repeat_email" class="required">Confirm primary email:</label>
566 <label for="borrower_repeat_email">Confirm primary email:</label>
569 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete=off>
570 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
575 [% UNLESS hidden.defined('emailpro') %]
577 [% IF mandatory.defined('emailpro') %]
578 <label for="borrower_emailpro" class="required">Secondary email:</label>
580 <label for="borrower_emailpro">Secondary email:</label>
583 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
584 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
588 [% UNLESS hidden.defined('fax') %]
590 [% IF mandatory.defined('fax') %]
591 <label for="borrower_fax" class="required">Fax:</label>
593 <label for="borrower_fax">Fax:</label>
596 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
597 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
604 [%# Following on one line for translatability %]
605 [% 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') %]
606 <fieldset class="rows" id="memberentry_alternateaddress">
607 <legend id="alternateaddress_legend">Alternate address</legend>
610 [% UNLESS hidden.defined('B_address') %]
612 [% IF mandatory.defined('B_address') %]
613 <label for="borrower_B_address" class="required">Address:</label>
615 <label for="borrower_B_address">Address:</label>
618 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
619 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
623 [% UNLESS hidden.defined('B_address2') %]
625 [% IF mandatory.defined('B_address2') %]
626 <label for="borrower_B_address2" class="required">Address 2:</label>
628 <label for="borrower_B_address2">Address 2:</label>
631 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
632 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
636 [% UNLESS hidden.defined('B_city') %]
638 [% IF mandatory.defined('B_city') %]
639 <label for="borrower_B_city" class="required">City:</label>
641 <label for="borrower_B_city">City:</label>
644 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
645 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
649 [% UNLESS hidden.defined('B_state') %]
651 [% IF mandatory.defined('B_state') %]
652 <label for="borrower_B_state" class="required">State:</label>
654 <label for="borrower_B_state">State:</label>
657 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
658 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
662 [% UNLESS hidden.defined('B_zipcode') %]
664 [% IF mandatory.defined('B_zipcode') %]
665 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
667 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
670 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
671 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
675 [% UNLESS hidden.defined('B_country') %]
677 [% IF mandatory.defined('B_country') %]
678 <label for="borrower_B_country" class="required">Country:</label>
680 <label for="borrower_B_country">Country:</label>
683 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
684 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
688 [% UNLESS hidden.defined('B_phone') %]
690 [% IF mandatory.defined('B_phone') %]
691 <label for="borrower_B_phone" class="required">Phone:</label>
693 <label for="borrower_B_phone">Phone:</label>
696 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
697 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
701 [% UNLESS hidden.defined('B_email') %]
703 [% IF mandatory.defined('B_email') %]
704 <label for="borrower_B_email" class="required">Email:</label>
706 <label for="borrower_B_email">Email:</label>
709 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
710 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
714 [% UNLESS hidden.defined('contactnote') %]
716 [% IF mandatory.defined('contactnote') %]
717 <label for="borrower_contactnote" class="required">Contact note:</label>
719 <label for="borrower_contactnote">Contact note:</label>
722 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
723 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
731 [%# Following on one line for translatability %]
732 [% 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') %]
733 <fieldset class="rows" id="memberentry_alternatecontact">
734 <legend id="alternatecontact_legend">Alternate contact</legend>
737 [% UNLESS hidden.defined('altcontactsurname') %]
739 [% IF mandatory.defined('altcontactsurname') %]
740 <label for="borrower_altcontactsurname" class="required">Surname:</label>
742 <label for="borrower_altcontactsurname">Surname:</label>
745 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
746 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
750 [% UNLESS hidden.defined('altcontactfirstname') %]
752 [% IF mandatory.defined('altcontactfirstname') %]
753 <label for="borrower_altcontactfirstname" class="required">First name:</label>
755 <label for="borrower_altcontactfirstname">First name:</label>
758 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
759 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
763 [% UNLESS hidden.defined('altcontactaddress1') %]
765 [% IF mandatory.defined('altcontactaddress1') %]
766 <label for="borrower_altcontactaddress1" class="required">Address:</label>
768 <label for="borrower_altcontactaddress1">Address:</label>
771 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
772 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
776 [% UNLESS hidden.defined('altcontactaddress2') %]
778 [% IF mandatory.defined('altcontactaddress2') %]
779 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
781 <label for="borrower_altcontactaddress2">Address 2:</label>
784 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
785 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
789 [% UNLESS hidden.defined('altcontactaddress3') %]
791 [% IF mandatory.defined('altcontactaddress3') %]
792 <label for="borrower_altcontactaddress3" class="required">City:</label>
794 <label for="borrower_altcontactaddress3">City:</label>
797 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
798 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
802 [% UNLESS hidden.defined('altcontactstate') %]
804 [% IF mandatory.defined('altcontactstate') %]
805 <label for="borrower_altcontactstate" class="required">State:</label>
807 <label for="borrower_altcontactstate">State:</label>
810 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
811 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
815 [% UNLESS hidden.defined('altcontactzipcode') %]
817 [% IF mandatory.defined('altcontactzipcode') %]
818 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
820 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
823 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
824 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
828 [% UNLESS hidden.defined('altcontactcountry') %]
830 [% IF mandatory.defined('altcontactcountry') %]
831 <label for="borrower_altcontactcountry" class="required">Country:</label>
833 <label for="borrower_altcontactcountry">Country:</label>
836 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
837 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
841 [% UNLESS hidden.defined('altcontactphone') %]
843 [% IF mandatory.defined('altcontactphone') %]
844 <label for="borrower_altcontactphone" class="required">Phone:</label>
846 <label for="borrower_altcontactphone">Phone:</label>
849 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
850 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
857 [% UNLESS action == 'edit' || hidden.defined('password') %]
858 <fieldset class="rows" id="memberentry_password">
859 <legend id="contact_legend">Password</legend>
860 <div class="alert alert-info">
861 [% IF ( Koha.Preference('RequireStrongPassword') ) %]
862 <p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p>
864 <p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p>
866 [% UNLESS mandatory.defined('password') %]
867 <p>If you do not enter a password a system generated password will be created.</p>
871 [% IF mandatory.defined('password') %]
873 <li><label for="borrower_password" class="required">Password</label>
874 <input type="password" name="borrower_password" id="password" />
875 <span class="required">Required</span>
877 <li><label for="borrower_password2" class="required">Confirm password</label>
878 <input type="password" name="borrower_password2" id="password2" />
879 <span class="required">Required</span>
884 <li><label for="borrower_password">Password</label>
885 <input type="password" name="borrower_password" id="password" />
887 <li><label for="borrower_password2">Confirm password</label>
888 <input type="password" name="borrower_password2" id="password2" />
895 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
896 [% FOREACH pa_class IN patron_attribute_classes %]
897 [% IF pa_class.class %]
898 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
899 <legend>[% pa_class.lib | html %]</legend>
901 <fieldset class="rows patron-attributes">
902 <legend>Additional information</legend>
904 <ol class="attributes_table">
905 [% FOREACH pa IN pa_class.items %]
906 [% FOREACH pa_value IN pa.values %]
907 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
908 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
909 <li data-category_code="[% pa.type.category_code | html %]">
910 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
911 [% IF pa.type.opac_editable %]
912 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
913 [% IF ( pa.type.authorised_value_category ) %]
914 <select id="[% form_id | html %]" name="patron_attribute_value">
915 <option value=""></option>
916 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
917 [% IF ( auth_val.authorised_value == pa_value ) %]
918 <option value="[% auth_val.authorised_value | html %]" selected="selected">
919 [% auth_val.lib | html %]
922 <option value="[% auth_val.authorised_value | html %]" >
923 [% auth_val.lib | html %]
929 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
931 <a href="#" class="clear-attribute">Clear</a>
932 [% IF ( pa.type.repeatable ) %]
933 <a href="#" class="clone-attribute">New</a>
936 [% IF ( pa.type.authorised_value_category ) %]
937 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
939 [% pa_value | html_line_break %]
950 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
951 <fieldset class="rows" id="memberentry_gdpr_consent">
952 <legend>GDPR consent</legend>
955 <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>
961 [% UNLESS action == 'edit' %]
962 <fieldset class="rows" id="memberentry_captcha">
963 <legend>Verification</legend>
967 <label for="captcha" class="required">Verification:</label>
969 <input type="text" name="captcha" id="captcha" />
970 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
972 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
978 [% IF action == 'edit' %]
979 [% IF OPACPatronDetails %]
980 <fieldset class="action">
981 <input type="hidden" name="action" value="update" />
982 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
983 <input type="submit" class="btn" value="Submit update request" />
987 <fieldset class="action">
988 <input type="hidden" name="action" value="create" />
989 <input type="submit" class="btn" value="Submit" />
995 </div><!--/div id="update-account" -->
1001 [% INCLUDE 'opac-bottom.inc' %]
1002 [% BLOCK jsinclude %]
1003 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1004 [% PROCESS 'password_check.inc' %]
1005 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
1008 $(document).ready(function() {
1009 [% IF action == 'edit' && !OPACPatronDetails %]
1010 $("#memberentry-form :input").attr('readonly', true);
1011 $("#borrower_branchcode").attr('disabled',true);
1012 $("#borrower_title").attr('disabled',true);
1013 $('#memberentry-form :radio').attr('disabled',true);
1014 $('span.required').remove();
1015 $('label.required').removeClass('required');
1018 $("#memberentry-form").validate({
1023 borrower_repeat_email: {
1024 equalTo: '#borrower_email'
1026 borrower_emailpro: {
1032 borrower_password: {
1033 [% IF mandatory.defined('password') %]
1036 password_strong: true,
1037 password_no_spaces: true
1039 borrower_password2: {
1040 [% IF mandatory.defined('password') %]
1043 password_match: true
1049 submitHandler: function(form) {
1050 if (form.beenSubmitted) {
1054 form.beenSubmitted = true;
1058 errorPlacement: function(error, element) {
1059 offset = element.offset();
1060 error.insertAfter(element)
1061 error.addClass('error'); // add a class to the wrapper
1062 error.css('position', 'absolute');
1063 error.css('left', offset.left + element.outerWidth() + 10);
1064 error.css('top', offset.top);
1065 error.css('width', 'auto');
1069 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1071 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1072 $('#update_privacy_guarantor_checkouts').click( function() {
1073 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1075 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1077 data: JSON.stringify({
1078 allowed: can_see_checkouts
1080 contentType: "application/json",
1081 success: function () {
1082 $('#update_privacy_guarantor_checkouts_message')
1084 .text(_("Your setting has been updated!"))
1088 error: function () {
1089 $('#update_privacy_guarantor_checkouts_message')
1091 .text(_("Unable to update your setting!"))
1099 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1100 $('#update_privacy_guarantor_fines').click( function() {
1101 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1103 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1105 data: JSON.stringify({
1106 allowed: can_see_charges
1108 contentType: 'application/json',
1109 success: function() {
1110 $('#update_privacy_guarantor_fines_message')
1112 .text( _("Your setting has been updated!") )
1117 $('#update_privacy_guarantor_fines_message')
1119 .text( _("Unable to update your setting!") )
1128 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1130 .find('textarea').attr('value', '').end()
1131 .find('select').attr('value', '').end();
1136 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1137 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1139 var newId = 50 + parseInt(Math.random() * 100000);
1140 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1141 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1147 $(".cleardate").on("click", function(){
1148 $('#borrower_dateofbirth').val('');
1152 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1153 $("#borrower_email").bind("cut copy paste", function(e){
1155 $("#borrower_email").bind("contextmenu", function(e){
1159 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1161 $("#borrower_repeat_email").bind("contextmenu", function(e){
1168 [% INCLUDE 'calendar.inc' %]