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">
60 <div id="add-account">
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>
98 <span>Please correct and resubmit.</span>
102 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
103 <div class="alert alert-error">
104 [% IF cardnumber_wrong_length %]
105 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
106 [% ELSIF cardnumber_already_exists %]
107 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
109 <span>Please correct and resubmit.</span>
113 [% IF failed_captcha %]
114 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
117 [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
118 <fieldset class="rows" id="memberentry_privacy">
119 <legend id="privacy_legend">Privacy</legend>
121 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
123 <label>Allow your guarantor to view your current checkouts?</label>
124 <select id="privacy_guarantor_checkouts">
125 <option value="0">No</option>
126 [% IF borrower.privacy_guarantor_checkouts %]
127 <option value="1" selected="selected">Yes</option>
129 <option value="1">Yes</option>
133 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
134 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
139 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
141 <label>Allow your guarantor to view your current fines?</label>
142 <select id="privacy_guarantor_fines">
143 <option value="0">No</option>
144 [% IF borrower.privacy_guarantor_fines %]
145 <option value="1" selected="selected">Yes</option>
147 <option value="1">Yes</option>
151 <a id="update_privacy_guarantor_fines" href="#" class="btn">Update</a>
152 <span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span>
160 [% FOREACH gr IN patron.guarantor_relationships %]
161 [% SET g = gr.guarantor %]
162 [% g.firstname | html %] [% g.surname | html %]
163 [%- IF ! loop.last %], [% END %]
170 [% IF ( extended_unique_id_failed_code ) %]
171 <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>
174 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
176 [%# Following on one line for translatability %]
177 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
178 <fieldset class="rows" id="memberentry_library">
180 <legend id="library_legend">Library</legend>
182 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
184 [% IF mandatory.defined('cardnumber') %]
185 <label for="borrower_cardnumber" class="required">Library card number:</label>
187 <label for="borrower_cardnumber">Library card number:</label>
189 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
190 [% borrower.cardnumber | html %]
192 [% IF minlength_cardnumber == maxlength_cardnumber %]
193 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
194 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
195 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
196 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
197 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
198 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
199 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
200 [% ELSIF maxlength_cardnumber %]
201 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
202 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
203 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
205 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" />
206 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
207 <div class="hint">There is no minimum or maximum character length.</div>
213 [% UNLESS hidden.defined('dateexpiry') %]
215 <label>Expiration date:</label>
216 [% borrower.dateexpiry | $KohaDates %]
220 [% UNLESS hidden.defined('branchcode') %]
222 [% IF mandatory.defined('branchcode') %]
223 <label for="borrower_branchcode" class="required">Home library:</label>
225 <label for="borrower_branchcode">Home library:</label>
228 <select id="borrower_branchcode" name="borrower_branchcode">
229 [% FOREACH l IN libraries %]
230 [% IF l.branchcode == borrower.branchcode %]
231 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
233 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
240 [% UNLESS hidden.defined('categorycode') %]
242 <label for="borrower_categorycode">
246 [% Categories.GetName( borrower.categorycode ) | html %]
247 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
249 <select id="borrower_categorycode" name="borrower_categorycode">
250 [% FOREACH c IN Categories.all() %]
251 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
252 <option value="[% c.categorycode | html %]" selected="selected">[% c.description | html %]</option>
254 <option value="[% c.categorycode | html %]">[% c.description | html %]</option>
261 [% UNLESS hidden.defined('autorenewal') %]
263 <label for="yes-autorenewal">
266 [% IF ( borrower.autorenewal ) %]
267 <label class="radio inline" for="yes-autorenewal">
269 <input type="radio" id="yes-autorenewal" name="borrower_autorenewal" value="1" checked="checked" />
272 <label class="radio inline" for="no-autorenewal">
274 <input type="radio" id="no-autorenewal" name="borrower_autorenewal" value="0" />
277 <label class="radio inline" for="yes-autorenewal">
279 <input type="radio" id="yes-autorenewal" name="borrower_autorenewal" value="1" />
281 <label class="radio inline" for="no-autorenewal">
283 <input type="radio" id="no-autorenewal" name="borrower_autorenewal" value="0" checked="checked" />
290 [% END # / defined 'branchcode' %]
292 [%# Following on one line for translatability %]
293 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
294 <div class="row-fluid">
295 [% IF ( display_patron_image ) %]
300 <fieldset class="rows" id="memberentry_identity">
301 <legend id="identity_legend">Identity</legend>
304 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
306 [% IF mandatory.defined('title') %]
307 <label for="borrower_title" class="required">Salutation:</label>
309 <label for="borrower_title">Salutation:</label>
312 <select id="borrower_title" name="borrower_title">
313 <option value=""></option>
314 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
315 [% IF mt == borrower.title %]
316 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
318 <option value="[% mt | html %]">[% mt | html %]</option>
325 [% UNLESS hidden.defined('surname') %]
327 [% IF mandatory.defined('surname') %]
328 <label for="borrower_surname" class="required">Surname:</label>
330 <label for="borrower_surname">Surname:</label>
333 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
334 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
338 [% UNLESS hidden.defined('firstname') %]
340 [% IF mandatory.defined('firstname') %]
341 <label for="borrower_firstname" class="required">First name:</label>
343 <label for="borrower_firstname">First name:</label>
346 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
347 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
351 [% UNLESS hidden.defined('dateofbirth') %]
353 [% IF mandatory.defined('dateofbirth') %]
354 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
356 <label for="borrower_dateofbirth">Date of birth:</label>
359 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
361 [% UNLESS action == 'edit' && !OPACPatronDetails %]
362 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
363 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
367 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
371 [% UNLESS hidden.defined('initials') %]
373 [% IF mandatory.defined('initials') %]
374 <label for="borrower_initials" class="required">Initials:</label>
376 <label for="borrower_initials">Initials:</label>
379 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
380 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
384 [% UNLESS hidden.defined('othernames') %]
386 [% IF mandatory.defined('othernames') %]
387 <label for="borrower_othernames" class="required">Other names:</label>
389 <label for="borrower_othernames">Other names:</label>
392 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
393 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
397 [% UNLESS hidden.defined('sex') %]
399 <label for="sex-female" class="radio inline">Female:</label>
400 [% IF borrower.sex == 'F' %]
401 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
403 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
406 <label for="sex-male" class="radio inline">Male:</label>
407 [% IF borrower.sex == 'M' %]
408 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
410 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
413 <label for="sex-none" class="radio inline">None specified: </label>
414 [% IF borrower.sex == '' %]
415 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
417 <input type="radio" name="borrower_sex" id="sex-none" value="" />
420 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
426 [% IF ( display_patron_image ) %]
428 <p class="patronimage">
429 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
434 [% END # /UNLESS fields hidden %]
436 [%# Following on one line for translatability %]
437 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
438 <fieldset class="rows" id="memberentry_mainaddress">
439 <legend id="mainaddress_legend">Main address</legend>
442 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
444 [% UNLESS hidden.defined('address') %]
446 [% IF mandatory.defined('address') %]
447 <label for="borrower_address" class="required">Address:</label>
449 <label for="borrower_address">Address:</label>
452 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
453 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
457 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
459 [% UNLESS hidden.defined('address2') %]
461 [% IF mandatory.defined('address2') %]
462 <label for="borrower_address2" class="required">Address 2:</label>
464 <label for="borrower_address2">Address 2:</label>
467 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
468 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
472 [% UNLESS hidden.defined('city') %]
474 [% IF mandatory.defined('city') %]
475 <label for="borrower_city" class="required">City:</label>
477 <label for="borrower_city">City:</label>
480 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
481 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
485 [% UNLESS hidden.defined('state') %]
487 [% IF mandatory.defined('state') %]
488 <label for="borrower_state" class="required">State:</label>
490 <label for="borrower_state">State:</label>
493 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
494 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
498 [% UNLESS hidden.defined('zipcode') %]
500 [% IF mandatory.defined('zipcode') %]
501 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
503 <label for="borrower_zipcode">ZIP/Postal code:</label>
506 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
507 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
511 [% UNLESS hidden.defined('country') %]
513 [% IF mandatory.defined('country') %]
514 <label for="borrower_country" class="required">Country:</label>
516 <label for="borrower_country">Country:</label>
519 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
520 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
528 [%# Following on one line for translatability %]
529 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
530 <fieldset class="rows" id="memberentry_contact">
531 <legend id="contact_legend">Contact information</legend>
534 [% UNLESS hidden.defined('phone') %]
536 [% IF mandatory.defined('phone') %]
537 <label for="borrower_phone" class="required">Primary phone:</label>
539 <label for="borrower_phone">Primary phone:</label>
542 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
543 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
547 [% UNLESS hidden.defined('phonepro') %]
549 [% IF mandatory.defined('phonepro') %]
550 <label for="borrower_phonepro" class="required">Secondary phone:</label>
552 <label for="borrower_phonepro">Secondary phone:</label>
555 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
556 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
560 [% UNLESS hidden.defined('mobile') %]
562 [% IF mandatory.defined('mobile') %]
563 <label for="borrower_mobile" class="required">Other phone:</label>
565 <label for="borrower_mobile">Other phone:</label>
568 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
569 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
573 [% UNLESS hidden.defined('email') %]
575 [% IF mandatory.defined('email') %]
576 <label for="borrower_email" class="required">Primary email:</label>
578 <label for="borrower_email">Primary email:</label>
581 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
582 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
586 [% UNLESS hidden.defined('emailpro') %]
588 [% IF mandatory.defined('emailpro') %]
589 <label for="borrower_emailpro" class="required">Secondary email:</label>
591 <label for="borrower_emailpro">Secondary email:</label>
594 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
595 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
599 [% UNLESS hidden.defined('fax') %]
601 [% IF mandatory.defined('fax') %]
602 <label for="borrower_fax" class="required">Fax:</label>
604 <label for="borrower_fax">Fax:</label>
607 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
608 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
615 [%# Following on one line for translatability %]
616 [% 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') %]
617 <fieldset class="rows" id="memberentry_alternateaddress">
618 <legend id="alternateaddress_legend">Alternate address</legend>
621 [% UNLESS hidden.defined('B_address') %]
623 [% IF mandatory.defined('B_address') %]
624 <label for="borrower_B_address" class="required">Address:</label>
626 <label for="borrower_B_address">Address:</label>
629 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
630 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
634 [% UNLESS hidden.defined('B_address2') %]
636 [% IF mandatory.defined('B_address2') %]
637 <label for="borrower_B_address2" class="required">Address 2:</label>
639 <label for="borrower_B_address2">Address 2:</label>
642 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
643 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
647 [% UNLESS hidden.defined('B_city') %]
649 [% IF mandatory.defined('B_city') %]
650 <label for="borrower_B_city" class="required">City:</label>
652 <label for="borrower_B_city">City:</label>
655 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
656 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
660 [% UNLESS hidden.defined('B_state') %]
662 [% IF mandatory.defined('B_state') %]
663 <label for="borrower_B_state" class="required">State:</label>
665 <label for="borrower_B_state">State:</label>
668 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
669 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
673 [% UNLESS hidden.defined('B_zipcode') %]
675 [% IF mandatory.defined('B_zipcode') %]
676 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
678 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
681 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
682 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
686 [% UNLESS hidden.defined('B_country') %]
688 [% IF mandatory.defined('B_country') %]
689 <label for="borrower_B_country" class="required">Country:</label>
691 <label for="borrower_B_country">Country:</label>
694 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
695 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
699 [% UNLESS hidden.defined('B_phone') %]
701 [% IF mandatory.defined('B_phone') %]
702 <label for="borrower_B_phone" class="required">Phone:</label>
704 <label for="borrower_B_phone">Phone:</label>
707 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
708 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
712 [% UNLESS hidden.defined('B_email') %]
714 [% IF mandatory.defined('B_email') %]
715 <label for="borrower_B_email" class="required">Email:</label>
717 <label for="borrower_B_email">Email:</label>
720 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
721 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
725 [% UNLESS hidden.defined('contactnote') %]
727 [% IF mandatory.defined('contactnote') %]
728 <label for="borrower_contactnote" class="required">Contact note:</label>
730 <label for="borrower_contactnote">Contact note:</label>
733 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
734 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
742 [%# Following on one line for translatability %]
743 [% 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') %]
744 <fieldset class="rows" id="memberentry_alternatecontact">
745 <legend id="alternatecontact_legend">Alternate contact</legend>
748 [% UNLESS hidden.defined('altcontactsurname') %]
750 [% IF mandatory.defined('altcontactsurname') %]
751 <label for="borrower_altcontactsurname" class="required">Surname:</label>
753 <label for="borrower_altcontactsurname">Surname:</label>
756 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
757 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
761 [% UNLESS hidden.defined('altcontactfirstname') %]
763 [% IF mandatory.defined('altcontactfirstname') %]
764 <label for="borrower_altcontactfirstname" class="required">First name:</label>
766 <label for="borrower_altcontactfirstname">First name:</label>
769 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
770 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
774 [% UNLESS hidden.defined('altcontactaddress1') %]
776 [% IF mandatory.defined('altcontactaddress1') %]
777 <label for="borrower_altcontactaddress1" class="required">Address:</label>
779 <label for="borrower_altcontactaddress1">Address:</label>
782 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
783 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
787 [% UNLESS hidden.defined('altcontactaddress2') %]
789 [% IF mandatory.defined('altcontactaddress2') %]
790 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
792 <label for="borrower_altcontactaddress2">Address 2:</label>
795 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
796 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
800 [% UNLESS hidden.defined('altcontactaddress3') %]
802 [% IF mandatory.defined('altcontactaddress3') %]
803 <label for="borrower_altcontactaddress3" class="required">City:</label>
805 <label for="borrower_altcontactaddress3">City:</label>
808 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
809 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
813 [% UNLESS hidden.defined('altcontactstate') %]
815 [% IF mandatory.defined('altcontactstate') %]
816 <label for="borrower_altcontactstate" class="required">State:</label>
818 <label for="borrower_altcontactstate">State:</label>
821 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
822 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
826 [% UNLESS hidden.defined('altcontactzipcode') %]
828 [% IF mandatory.defined('altcontactzipcode') %]
829 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
831 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
834 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
835 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
839 [% UNLESS hidden.defined('altcontactcountry') %]
841 [% IF mandatory.defined('altcontactcountry') %]
842 <label for="borrower_altcontactcountry" class="required">Country:</label>
844 <label for="borrower_altcontactcountry">Country:</label>
847 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
848 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
852 [% UNLESS hidden.defined('altcontactphone') %]
854 [% IF mandatory.defined('altcontactphone') %]
855 <label for="borrower_altcontactphone" class="required">Phone:</label>
857 <label for="borrower_altcontactphone">Phone:</label>
860 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
861 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
868 [% UNLESS action == 'edit' || hidden.defined('password') %]
869 <fieldset class="rows" id="memberentry_password">
870 <legend id="contact_legend">Password</legend>
871 <div class="alert alert-info">
872 [% IF ( Koha.Preference('RequireStrongPassword') ) %]
873 <p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p>
875 <p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p>
877 [% UNLESS mandatory.defined('password') %]
878 <p>If you do not enter a password a system generated password will be created.</p>
882 [% IF mandatory.defined('password') %]
884 <li><label for="borrower_password" class="required">Password</label>
885 <input type="password" name="borrower_password" id="password" />
886 <span class="required">Required</span>
888 <li><label for="borrower_password2" class="required">Confirm password</label>
889 <input type="password" name="borrower_password2" id="password2" />
890 <span class="required">Required</span>
895 <li><label for="borrower_password">Password</label>
896 <input type="password" name="borrower_password" id="password" />
898 <li><label for="borrower_password2">Confirm password</label>
899 <input type="password" name="borrower_password2" id="password2" />
906 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
907 [% FOREACH pa_class IN patron_attribute_classes %]
908 [% IF pa_class.class %]
909 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
910 <legend>[% pa_class.lib | html %]</legend>
912 <fieldset class="rows patron-attributes">
913 <legend>Additional information</legend>
915 <ol class="attributes_table">
916 [% FOREACH pa IN pa_class.items %]
917 [% FOREACH pa_value IN pa.values %]
918 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
919 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
920 <li data-category_code="[% pa.type.category_code | html %]">
921 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
922 [% IF pa.type.opac_editable %]
923 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
924 [% IF ( pa.type.authorised_value_category ) %]
925 <select id="[% form_id | html %]" name="patron_attribute_value">
926 <option value=""></option>
927 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
928 [% IF ( auth_val.authorised_value == pa_value ) %]
929 <option value="[% auth_val.authorised_value | html %]" selected="selected">
930 [% auth_val.lib | html %]
933 <option value="[% auth_val.authorised_value | html %]" >
934 [% auth_val.lib | html %]
940 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
942 <a href="#" class="clear-attribute">Clear</a>
943 [% IF ( pa.type.repeatable ) %]
944 <a href="#" class="clone-attribute">New</a>
947 [% IF ( pa.type.authorised_value_category ) %]
948 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
950 [% pa_value | html_line_break %]
961 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
962 <fieldset class="rows" id="memberentry_gdpr_consent">
963 <legend>GDPR consent</legend>
966 <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>
972 [% UNLESS action == 'edit' %]
973 <fieldset class="rows" id="memberentry_captcha">
974 <legend>Verification</legend>
978 <label for="captcha" class="required">Verification:</label>
980 <input type="text" name="captcha" id="captcha" />
981 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
983 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
989 [% IF action == 'edit' %]
990 [% IF OPACPatronDetails %]
991 <fieldset class="action">
992 <input type="hidden" name="action" value="update" />
993 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
994 <input type="submit" class="btn" value="Submit update request" />
998 <fieldset class="action">
999 <input type="hidden" name="action" value="create" />
1000 <input type="submit" class="btn" value="Submit" />
1006 </div><!--/div id="update-account" -->
1012 [% INCLUDE 'opac-bottom.inc' %]
1013 [% BLOCK jsinclude %]
1014 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
1015 [% PROCESS 'password_check.inc' %]
1016 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
1019 $(document).ready(function() {
1020 [% IF action == 'edit' && !OPACPatronDetails %]
1021 $("#memberentry-form :input").attr('readonly', true);
1022 $("#borrower_branchcode").attr('disabled',true);
1023 $("#borrower_title").attr('disabled',true);
1024 $('#memberentry-form :radio').attr('disabled',true);
1025 $('span.required').remove();
1026 $('label.required').removeClass('required');
1029 $("#memberentry-form").validate({
1034 borrower_emailpro: {
1040 borrower_password: {
1041 [% IF mandatory.defined('password') %]
1044 password_strong: true,
1045 password_no_spaces: true
1047 borrower_password2: {
1048 [% IF mandatory.defined('password') %]
1051 password_match: true
1057 submitHandler: function(form) {
1058 if (form.beenSubmitted) {
1062 form.beenSubmitted = true;
1066 errorPlacement: function(error, element) {
1067 offset = element.offset();
1068 error.insertAfter(element)
1069 error.addClass('error'); // add a class to the wrapper
1070 error.css('position', 'absolute');
1071 error.css('left', offset.left + element.outerWidth() + 10);
1072 error.css('top', offset.top);
1073 error.css('width', 'auto');
1077 [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %]
1079 [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1080 $('#update_privacy_guarantor_checkouts').click( function() {
1081 var can_see_checkouts = $('#privacy_guarantor_checkouts').val() == 1;
1083 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
1085 data: JSON.stringify({
1086 allowed: can_see_checkouts
1088 contentType: "application/json",
1089 success: function () {
1090 $('#update_privacy_guarantor_checkouts_message')
1092 .text(_("Your setting has been updated!"))
1096 error: function () {
1097 $('#update_privacy_guarantor_checkouts_message')
1099 .text(_("Unable to update your setting!"))
1107 [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
1108 $('#update_privacy_guarantor_fines').click( function() {
1109 var can_see_charges = $('#privacy_guarantor_fines').val() == 1;
1111 url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
1113 data: JSON.stringify({
1114 allowed: can_see_charges
1116 contentType: 'application/json',
1117 success: function() {
1118 $('#update_privacy_guarantor_fines_message')
1120 .text( _("Your setting has been updated!") )
1125 $('#update_privacy_guarantor_fines_message')
1127 .text( _("Unable to update your setting!") )
1136 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1138 .find('textarea').attr('value', '').end()
1139 .find('select').attr('value', '').end();
1144 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1145 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1147 var newId = 50 + parseInt(Math.random() * 100000);
1148 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1149 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1155 $(".cleardate").on("click", function(){
1156 $('#borrower_dateofbirth').val('');
1161 [% INCLUDE 'calendar.inc' %]