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"><span class="patronsex-female">Female:</span></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"><span class="patronsex-male">Male:</span></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-other" class="radio inline"><span class="patronsex-other">Other:</span></label>
390 [% IF borrower.sex == 'O' %]
391 <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" />
393 <input type="radio" name="borrower_sex" id="sex-other" value="O" />
397 <label for="sex-none" class="radio inline"><span class="patronsex-none">None specified:</span></label>
398 [% IF borrower.sex == '' %]
399 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
401 <input type="radio" name="borrower_sex" id="sex-none" value="" />
404 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
410 [% IF ( display_patron_image ) %]
412 <p class="patronimage">
413 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
418 [% END # /UNLESS fields hidden %]
420 [%# Following on one line for translatability %]
421 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
422 <fieldset class="rows" id="memberentry_mainaddress">
423 <legend id="mainaddress_legend">Main address</legend>
426 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
428 [% UNLESS hidden.defined('address') %]
430 [% IF mandatory.defined('address') %]
431 <label for="borrower_address" class="required">Address:</label>
433 <label for="borrower_address">Address:</label>
436 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
437 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
441 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
443 [% UNLESS hidden.defined('address2') %]
445 [% IF mandatory.defined('address2') %]
446 <label for="borrower_address2" class="required">Address 2:</label>
448 <label for="borrower_address2">Address 2:</label>
451 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
452 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
456 [% UNLESS hidden.defined('city') %]
458 [% IF mandatory.defined('city') %]
459 <label for="borrower_city" class="required">City:</label>
461 <label for="borrower_city">City:</label>
464 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
465 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
469 [% UNLESS hidden.defined('state') %]
471 [% IF mandatory.defined('state') %]
472 <label for="borrower_state" class="required">State:</label>
474 <label for="borrower_state">State:</label>
477 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
478 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
482 [% UNLESS hidden.defined('zipcode') %]
484 [% IF mandatory.defined('zipcode') %]
485 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
487 <label for="borrower_zipcode">ZIP/Postal code:</label>
490 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
491 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
495 [% UNLESS hidden.defined('country') %]
497 [% IF mandatory.defined('country') %]
498 <label for="borrower_country" class="required">Country:</label>
500 <label for="borrower_country">Country:</label>
503 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
504 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
512 [%# Following on one line for translatability %]
513 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
514 <fieldset class="rows" id="memberentry_contact">
515 <legend id="contact_legend">Contact information</legend>
518 [% UNLESS hidden.defined('phone') %]
520 [% IF mandatory.defined('phone') %]
521 <label for="borrower_phone" class="required">Primary phone:</label>
523 <label for="borrower_phone">Primary phone:</label>
526 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
527 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
531 [% UNLESS hidden.defined('phonepro') %]
533 [% IF mandatory.defined('phonepro') %]
534 <label for="borrower_phonepro" class="required">Secondary phone:</label>
536 <label for="borrower_phonepro">Secondary phone:</label>
539 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
540 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
544 [% UNLESS hidden.defined('mobile') %]
546 [% IF mandatory.defined('mobile') %]
547 <label for="borrower_mobile" class="required">Other phone:</label>
549 <label for="borrower_mobile">Other phone:</label>
552 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
553 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
557 [% UNLESS hidden.defined('email') %]
559 [% IF mandatory.defined('email') %]
560 <label for="borrower_email" class="required">Primary email:</label>
562 <label for="borrower_email">Primary email:</label>
565 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
566 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
569 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
571 [% IF mandatory.defined('email') %]
572 <label for="borrower_repeat_email" class="required">Confirm primary email:</label>
574 <label for="borrower_repeat_email">Confirm primary email:</label>
577 <input type="text" id="borrower_repeat_email" name="borrower_repeat_email" autocomplete=off>
578 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
583 [% UNLESS hidden.defined('emailpro') %]
585 [% IF mandatory.defined('emailpro') %]
586 <label for="borrower_emailpro" class="required">Secondary email:</label>
588 <label for="borrower_emailpro">Secondary email:</label>
591 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
592 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
596 [% UNLESS hidden.defined('fax') %]
598 [% IF mandatory.defined('fax') %]
599 <label for="borrower_fax" class="required">Fax:</label>
601 <label for="borrower_fax">Fax:</label>
604 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
605 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
612 [%# Following on one line for translatability %]
613 [% 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') %]
614 <fieldset class="rows" id="memberentry_alternateaddress">
615 <legend id="alternateaddress_legend">Alternate address</legend>
618 [% UNLESS hidden.defined('B_address') %]
620 [% IF mandatory.defined('B_address') %]
621 <label for="borrower_B_address" class="required">Address:</label>
623 <label for="borrower_B_address">Address:</label>
626 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
627 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
631 [% UNLESS hidden.defined('B_address2') %]
633 [% IF mandatory.defined('B_address2') %]
634 <label for="borrower_B_address2" class="required">Address 2:</label>
636 <label for="borrower_B_address2">Address 2:</label>
639 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
640 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
644 [% UNLESS hidden.defined('B_city') %]
646 [% IF mandatory.defined('B_city') %]
647 <label for="borrower_B_city" class="required">City:</label>
649 <label for="borrower_B_city">City:</label>
652 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
653 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
657 [% UNLESS hidden.defined('B_state') %]
659 [% IF mandatory.defined('B_state') %]
660 <label for="borrower_B_state" class="required">State:</label>
662 <label for="borrower_B_state">State:</label>
665 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
666 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
670 [% UNLESS hidden.defined('B_zipcode') %]
672 [% IF mandatory.defined('B_zipcode') %]
673 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
675 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
678 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
679 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
683 [% UNLESS hidden.defined('B_country') %]
685 [% IF mandatory.defined('B_country') %]
686 <label for="borrower_B_country" class="required">Country:</label>
688 <label for="borrower_B_country">Country:</label>
691 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
692 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
696 [% UNLESS hidden.defined('B_phone') %]
698 [% IF mandatory.defined('B_phone') %]
699 <label for="borrower_B_phone" class="required">Phone:</label>
701 <label for="borrower_B_phone">Phone:</label>
704 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
705 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
709 [% UNLESS hidden.defined('B_email') %]
711 [% IF mandatory.defined('B_email') %]
712 <label for="borrower_B_email" class="required">Email:</label>
714 <label for="borrower_B_email">Email:</label>
717 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
718 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
722 [% UNLESS hidden.defined('contactnote') %]
724 [% IF mandatory.defined('contactnote') %]
725 <label for="borrower_contactnote" class="required">Contact note:</label>
727 <label for="borrower_contactnote">Contact note:</label>
730 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
731 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
739 [%# Following on one line for translatability %]
740 [% 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') %]
741 <fieldset class="rows" id="memberentry_alternatecontact">
742 <legend id="alternatecontact_legend">Alternate contact</legend>
745 [% UNLESS hidden.defined('altcontactsurname') %]
747 [% IF mandatory.defined('altcontactsurname') %]
748 <label for="borrower_altcontactsurname" class="required">Surname:</label>
750 <label for="borrower_altcontactsurname">Surname:</label>
753 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
754 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
758 [% UNLESS hidden.defined('altcontactfirstname') %]
760 [% IF mandatory.defined('altcontactfirstname') %]
761 <label for="borrower_altcontactfirstname" class="required">First name:</label>
763 <label for="borrower_altcontactfirstname">First name:</label>
766 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
767 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
771 [% UNLESS hidden.defined('altcontactaddress1') %]
773 [% IF mandatory.defined('altcontactaddress1') %]
774 <label for="borrower_altcontactaddress1" class="required">Address:</label>
776 <label for="borrower_altcontactaddress1">Address:</label>
779 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
780 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
784 [% UNLESS hidden.defined('altcontactaddress2') %]
786 [% IF mandatory.defined('altcontactaddress2') %]
787 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
789 <label for="borrower_altcontactaddress2">Address 2:</label>
792 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
793 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
797 [% UNLESS hidden.defined('altcontactaddress3') %]
799 [% IF mandatory.defined('altcontactaddress3') %]
800 <label for="borrower_altcontactaddress3" class="required">City:</label>
802 <label for="borrower_altcontactaddress3">City:</label>
805 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
806 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
810 [% UNLESS hidden.defined('altcontactstate') %]
812 [% IF mandatory.defined('altcontactstate') %]
813 <label for="borrower_altcontactstate" class="required">State:</label>
815 <label for="borrower_altcontactstate">State:</label>
818 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
819 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
823 [% UNLESS hidden.defined('altcontactzipcode') %]
825 [% IF mandatory.defined('altcontactzipcode') %]
826 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
828 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
831 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
832 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
836 [% UNLESS hidden.defined('altcontactcountry') %]
838 [% IF mandatory.defined('altcontactcountry') %]
839 <label for="borrower_altcontactcountry" class="required">Country:</label>
841 <label for="borrower_altcontactcountry">Country:</label>
844 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
845 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
849 [% UNLESS hidden.defined('altcontactphone') %]
851 [% IF mandatory.defined('altcontactphone') %]
852 <label for="borrower_altcontactphone" class="required">Phone:</label>
854 <label for="borrower_altcontactphone">Phone:</label>
857 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
858 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
865 [% UNLESS action == 'edit' || hidden.defined('password') %]
866 <fieldset class="rows" id="memberentry_password">
867 <legend id="contact_legend">Password</legend>
868 <div class="alert alert-info">
869 [% IF ( Koha.Preference('RequireStrongPassword') ) %]
870 <p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p>
872 <p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p>
874 [% UNLESS mandatory.defined('password') %]
875 <p>If you do not enter a password a system generated password will be created.</p>
879 [% IF mandatory.defined('password') %]
881 <li><label for="borrower_password" class="required">Password</label>
882 <input type="password" name="borrower_password" id="password" />
883 <span class="required">Required</span>
885 <li><label for="borrower_password2" class="required">Confirm password</label>
886 <input type="password" name="borrower_password2" id="password2" />
887 <span class="required">Required</span>
892 <li><label for="borrower_password">Password</label>
893 <input type="password" name="borrower_password" id="password" />
895 <li><label for="borrower_password2">Confirm password</label>
896 <input type="password" name="borrower_password2" id="password2" />
903 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && action != 'new' ) %]
904 [% FOREACH pa_class IN patron_attribute_classes %]
905 [% IF pa_class.class %]
906 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
907 <legend>[% pa_class.lib | html %]</legend>
909 <fieldset class="rows patron-attributes">
910 <legend>Additional information</legend>
912 <ol class="attributes_table">
913 [% FOREACH pa IN pa_class.items %]
914 [% FOREACH pa_value IN pa.values %]
915 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
916 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
917 <li data-category_code="[% pa.type.category_code | html %]">
918 [% IF pa.type.mandatory && pa.type.opac_editable %]
919 <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
921 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
923 [% IF pa.type.opac_editable %]
924 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
925 [% IF ( pa.type.authorised_value_category ) %]
926 <select id="[% form_id | html %]" name="patron_attribute_value">
927 <option value=""></option>
928 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
929 [% IF ( auth_val.authorised_value == pa_value ) %]
930 <option value="[% auth_val.authorised_value | html %]" selected="selected">
931 [% auth_val.lib | html %]
934 <option value="[% auth_val.authorised_value | html %]" >
935 [% auth_val.lib | html %]
941 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
943 [% IF pa.type.mandatory %]
944 <span class="required">Required</span>
946 <a href="#" class="clear-attribute">Clear</a>
947 [% IF ( pa.type.repeatable ) %]
948 <a href="#" class="clone-attribute">New</a>
951 [% IF ( pa.type.authorised_value_category ) %]
952 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
954 [% pa_value | html_line_break %]
965 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
966 <fieldset class="rows" id="memberentry_gdpr_consent">
967 <legend>GDPR consent</legend>
970 <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>
976 [% UNLESS action == 'edit' %]
977 <fieldset class="rows" id="memberentry_captcha">
978 <legend>Verification</legend>
982 <label for="captcha" class="required">Verification:</label>
984 <input type="text" name="captcha" id="captcha" />
985 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
987 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
993 [% IF action == 'edit' %]
994 [% IF OPACPatronDetails %]
995 <fieldset class="action">
996 <input type="hidden" name="action" value="update" />
997 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
998 <input type="submit" class="btn" value="Submit update request" />
1002 <fieldset class="action">
1003 <input type="hidden" name="action" value="create" />
1004 <input type="submit" class="btn" value="Submit" />
1010 </div><!--/div id="update-account" -->
1016 [% INCLUDE 'opac-bottom.inc' %]
1017 [% BLOCK jsinclude %]
1018 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1019 [% PROCESS 'password_check.inc' %]
1020 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
1023 $(document).ready(function() {
1024 [% IF action == 'edit' && !OPACPatronDetails %]
1025 $("#memberentry-form :input").attr('readonly', true);
1026 $("#borrower_branchcode").attr('disabled',true);
1027 $("#borrower_title").attr('disabled',true);
1028 $('#memberentry-form :radio').attr('disabled',true);
1029 $('span.required').remove();
1030 $('label.required').removeClass('required');
1033 $("#memberentry-form").validate({
1038 borrower_repeat_email: {
1039 equalTo: '#borrower_email'
1041 borrower_emailpro: {
1047 borrower_password: {
1048 [% IF mandatory.defined('password') %]
1051 password_strong: true,
1052 password_no_spaces: true
1054 borrower_password2: {
1055 [% IF mandatory.defined('password') %]
1058 password_match: true
1064 submitHandler: function(form) {
1065 if (form.beenSubmitted) {
1069 form.beenSubmitted = true;
1073 errorPlacement: function(error, element) {
1074 offset = element.offset();
1075 error.insertAfter(element)
1076 error.addClass('error'); // add a class to the wrapper
1077 error.css('position', 'absolute');
1078 error.css('left', offset.left + element.outerWidth() + 10);
1079 error.css('top', offset.top);
1080 error.css('width', 'auto');
1084 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1086 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1087 $('#update_privacy_guarantor_checkouts').click( function() {
1088 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1090 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1092 data: JSON.stringify({
1093 allowed: can_see_checkouts
1095 contentType: "application/json",
1096 success: function () {
1097 $('#update_privacy_guarantor_checkouts_message')
1099 .text(_("Your setting has been updated!"))
1103 error: function () {
1104 $('#update_privacy_guarantor_checkouts_message')
1106 .text(_("Unable to update your setting!"))
1114 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1115 $('#update_privacy_guarantor_fines').click( function() {
1116 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1118 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1120 data: JSON.stringify({
1121 allowed: can_see_charges
1123 contentType: 'application/json',
1124 success: function() {
1125 $('#update_privacy_guarantor_fines_message')
1127 .text( _("Your setting has been updated!") )
1132 $('#update_privacy_guarantor_fines_message')
1134 .text( _("Unable to update your setting!") )
1143 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1145 .find('textarea').attr('value', '').end()
1146 .find('select').attr('value', '').end();
1151 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1152 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1154 var newId = 50 + parseInt(Math.random() * 100000);
1155 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1156 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1162 $(".cleardate").on("click", function(){
1163 $('#borrower_dateofbirth').val('');
1167 [% IF action != 'edit' and Koha.Preference('PatronSelfRegistrationConfirmEmail') %]
1168 $("#borrower_email").bind("cut copy paste", function(e){
1170 $("#borrower_email").bind("contextmenu", function(e){
1174 $("#borrower_repeat_email").bind("cut copy paste", function(e){
1176 $("#borrower_repeat_email").bind("contextmenu", function(e){
1183 [% INCLUDE 'calendar.inc' %]