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 borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
118 <fieldset class="rows" id="memberentry_privacy">
119 <legend id="privacy_legend">Privacy</legend>
122 <label>Allow your guarantor to view your current checkouts?</label>
123 <select id="privacy_guarantor_checkouts">
124 <option value="0">No</option>
125 [% IF borrower.privacy_guarantor_checkouts %]
126 <option value="1" selected="selected">Yes</option>
128 <option value="1">Yes</option>
132 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
133 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
136 Your guarantor is <i>[% guarantor.firstname | html %] [% guarantor.surname | html %]</i>
142 [% IF ( extended_unique_id_failed_code ) %]
143 <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>
146 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
148 [%# Following on one line for translatability %]
149 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
150 <fieldset class="rows" id="memberentry_library">
152 <legend id="library_legend">Library</legend>
154 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
156 [% IF mandatory.defined('cardnumber') %]
157 <label for="borrower_cardnumber" class="required">Library card number:</label>
159 <label for="borrower_cardnumber">Library card number:</label>
161 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
162 [% borrower.cardnumber | html %]
164 [% IF minlength_cardnumber == maxlength_cardnumber %]
165 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
166 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
167 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div>
168 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
169 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
170 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
171 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div>
172 [% ELSIF maxlength_cardnumber %]
173 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
174 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
175 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div>
177 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber | html %]" />
178 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
179 <div class="hint">There is no minimum or maximum character length.</div>
185 [% UNLESS hidden.defined('dateexpiry') %]
187 <label>Expiration date:</label>
188 [% borrower.dateexpiry | $KohaDates %]
192 [% UNLESS hidden.defined('branchcode') %]
194 [% IF mandatory.defined('branchcode') %]
195 <label for="borrower_branchcode" class="required">Home library:</label>
197 <label for="borrower_branchcode">Home library:</label>
200 <select id="borrower_branchcode" name="borrower_branchcode">
201 [% FOREACH l IN libraries %]
202 [% IF l.branchcode == borrower.branchcode %]
203 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
205 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
212 [% UNLESS hidden.defined('categorycode') %]
214 <label for="borrower_categorycode">
218 [% Categories.GetName( borrower.categorycode ) | html %]
219 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode | html %]" />
221 <select id="borrower_categorycode" name="borrower_categorycode">
222 [% FOREACH c IN Categories.all() %]
223 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
224 <option value="[% c.categorycode | html %]" selected="selected">[% c.description | html %]</option>
226 <option value="[% c.categorycode | html %]">[% c.description | html %]</option>
235 [% END # / defined 'branchcode' %]
237 [%# Following on one line for translatability %]
238 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
239 <div class="row-fluid">
240 [% IF ( display_patron_image ) %]
245 <fieldset class="rows" id="memberentry_identity">
246 <legend id="identity_legend">Identity</legend>
249 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
251 [% IF mandatory.defined('title') %]
252 <label for="borrower_title" class="required">Salutation:</label>
254 <label for="borrower_title">Salutation:</label>
257 <select id="borrower_title" name="borrower_title">
258 <option value=""></option>
259 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
260 [% IF mt == borrower.title %]
261 <option value="[% mt | html %]" selected="selected">[% mt | html %]</option>
263 <option value="[% mt | html %]">[% mt | html %]</option>
270 [% UNLESS hidden.defined('surname') %]
272 [% IF mandatory.defined('surname') %]
273 <label for="borrower_surname" class="required">Surname:</label>
275 <label for="borrower_surname">Surname:</label>
278 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname | html %]" />
279 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
283 [% UNLESS hidden.defined('firstname') %]
285 [% IF mandatory.defined('firstname') %]
286 <label for="borrower_firstname" class="required">First name:</label>
288 <label for="borrower_firstname">First name:</label>
291 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname | html %]" />
292 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
296 [% UNLESS hidden.defined('dateofbirth') %]
298 [% IF mandatory.defined('dateofbirth') %]
299 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
301 <label for="borrower_dateofbirth">Date of birth:</label>
304 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
306 [% UNLESS action == 'edit' && !OPACPatronDetails %]
307 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
308 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
312 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
316 [% UNLESS hidden.defined('initials') %]
318 [% IF mandatory.defined('initials') %]
319 <label for="borrower_initials" class="required">Initials:</label>
321 <label for="borrower_initials">Initials:</label>
324 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials | html %]" />
325 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
329 [% UNLESS hidden.defined('othernames') %]
331 [% IF mandatory.defined('othernames') %]
332 <label for="borrower_othernames" class="required">Other names:</label>
334 <label for="borrower_othernames">Other names:</label>
337 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames | html %]" />
338 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
342 [% UNLESS hidden.defined('sex') %]
344 <label for="sex-female" class="radio inline">Female:</label>
345 [% IF borrower.sex == 'F' %]
346 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
348 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
351 <label for="sex-male" class="radio inline">Male:</label>
352 [% IF borrower.sex == 'M' %]
353 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
355 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
358 <label for="sex-none" class="radio inline">None specified: </label>
359 [% IF borrower.sex == '' %]
360 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
362 <input type="radio" name="borrower_sex" id="sex-none" value="" />
365 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
371 [% IF ( display_patron_image ) %]
373 <p class="patronimage">
374 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
379 [% END # /UNLESS fields hidden %]
381 [%# Following on one line for translatability %]
382 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
383 <fieldset class="rows" id="memberentry_mainaddress">
384 <legend id="mainaddress_legend">Main address</legend>
387 [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %]
389 [% UNLESS hidden.defined('address') %]
391 [% IF mandatory.defined('address') %]
392 <label for="borrower_address" class="required">Address:</label>
394 <label for="borrower_address">Address:</label>
397 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address | html %]" />
398 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
402 [% IF Koha.Preference('AddressFormat') == 'de' %][% INCLUDE streetnumber %][% END %]
404 [% UNLESS hidden.defined('address2') %]
406 [% IF mandatory.defined('address2') %]
407 <label for="borrower_address2" class="required">Address 2:</label>
409 <label for="borrower_address2">Address 2:</label>
412 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 | html %]" />
413 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
417 [% UNLESS hidden.defined('city') %]
419 [% IF mandatory.defined('city') %]
420 <label for="borrower_city" class="required">City:</label>
422 <label for="borrower_city">City:</label>
425 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city | html %]" />
426 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
430 [% UNLESS hidden.defined('state') %]
432 [% IF mandatory.defined('state') %]
433 <label for="borrower_state" class="required">State:</label>
435 <label for="borrower_state">State:</label>
438 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state | html %]" />
439 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
443 [% UNLESS hidden.defined('zipcode') %]
445 [% IF mandatory.defined('zipcode') %]
446 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
448 <label for="borrower_zipcode">ZIP/Postal code:</label>
451 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode | html %]" />
452 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
456 [% UNLESS hidden.defined('country') %]
458 [% IF mandatory.defined('country') %]
459 <label for="borrower_country" class="required">Country:</label>
461 <label for="borrower_country">Country:</label>
464 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country | html %]" />
465 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
473 [%# Following on one line for translatability %]
474 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
475 <fieldset class="rows" id="memberentry_contact">
476 <legend id="contact_legend">Contact information</legend>
479 [% UNLESS hidden.defined('phone') %]
481 [% IF mandatory.defined('phone') %]
482 <label for="borrower_phone" class="required">Primary phone:</label>
484 <label for="borrower_phone">Primary phone:</label>
487 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone | html %]" />
488 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
492 [% UNLESS hidden.defined('phonepro') %]
494 [% IF mandatory.defined('phonepro') %]
495 <label for="borrower_phonepro" class="required">Secondary phone:</label>
497 <label for="borrower_phonepro">Secondary phone:</label>
500 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro | html %]" />
501 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
505 [% UNLESS hidden.defined('mobile') %]
507 [% IF mandatory.defined('mobile') %]
508 <label for="borrower_mobile" class="required">Other phone:</label>
510 <label for="borrower_mobile">Other phone:</label>
513 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile | html %]" />
514 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
518 [% UNLESS hidden.defined('email') %]
520 [% IF mandatory.defined('email') %]
521 <label for="borrower_email" class="required">Primary email:</label>
523 <label for="borrower_email">Primary email:</label>
526 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email | html %]" />
527 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
531 [% UNLESS hidden.defined('emailpro') %]
533 [% IF mandatory.defined('emailpro') %]
534 <label for="borrower_emailpro" class="required">Secondary email:</label>
536 <label for="borrower_emailpro">Secondary email:</label>
539 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro | html %]" />
540 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
544 [% UNLESS hidden.defined('fax') %]
546 [% IF mandatory.defined('fax') %]
547 <label for="borrower_fax" class="required">Fax:</label>
549 <label for="borrower_fax">Fax:</label>
552 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax | html %]" />
553 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
560 [%# Following on one line for translatability %]
561 [% 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') %]
562 <fieldset class="rows" id="memberentry_alternateaddress">
563 <legend id="alternateaddress_legend">Alternate address</legend>
566 [% UNLESS hidden.defined('B_address') %]
568 [% IF mandatory.defined('B_address') %]
569 <label for="borrower_B_address" class="required">Address:</label>
571 <label for="borrower_B_address">Address:</label>
574 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address | html %]" />
575 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
579 [% UNLESS hidden.defined('B_address2') %]
581 [% IF mandatory.defined('B_address2') %]
582 <label for="borrower_B_address2" class="required">Address 2:</label>
584 <label for="borrower_B_address2">Address 2:</label>
587 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 | html %]" />
588 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
592 [% UNLESS hidden.defined('B_city') %]
594 [% IF mandatory.defined('B_city') %]
595 <label for="borrower_B_city" class="required">City:</label>
597 <label for="borrower_B_city">City:</label>
600 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city | html %]" />
601 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
605 [% UNLESS hidden.defined('B_state') %]
607 [% IF mandatory.defined('B_state') %]
608 <label for="borrower_B_state" class="required">State:</label>
610 <label for="borrower_B_state">State:</label>
613 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state | html %]" />
614 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
618 [% UNLESS hidden.defined('B_zipcode') %]
620 [% IF mandatory.defined('B_zipcode') %]
621 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
623 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
626 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode | html %]" />
627 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
631 [% UNLESS hidden.defined('B_country') %]
633 [% IF mandatory.defined('B_country') %]
634 <label for="borrower_B_country" class="required">Country:</label>
636 <label for="borrower_B_country">Country:</label>
639 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country | html %]" />
640 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
644 [% UNLESS hidden.defined('B_phone') %]
646 [% IF mandatory.defined('B_phone') %]
647 <label for="borrower_B_phone" class="required">Phone:</label>
649 <label for="borrower_B_phone">Phone:</label>
652 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone | html %]" />
653 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
657 [% UNLESS hidden.defined('B_email') %]
659 [% IF mandatory.defined('B_email') %]
660 <label for="borrower_B_email" class="required">Email:</label>
662 <label for="borrower_B_email">Email:</label>
665 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email | html %]" />
666 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
670 [% UNLESS hidden.defined('contactnote') %]
672 [% IF mandatory.defined('contactnote') %]
673 <label for="borrower_contactnote" class="required">Contact note:</label>
675 <label for="borrower_contactnote">Contact note:</label>
678 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote | html %]</textarea>
679 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
687 [%# Following on one line for translatability %]
688 [% 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') %]
689 <fieldset class="rows" id="memberentry_alternatecontact">
690 <legend id="alternatecontact_legend">Alternate contact</legend>
693 [% UNLESS hidden.defined('altcontactsurname') %]
695 [% IF mandatory.defined('altcontactsurname') %]
696 <label for="borrower_altcontactsurname" class="required">Surname:</label>
698 <label for="borrower_altcontactsurname">Surname:</label>
701 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname | html %]" />
702 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
706 [% UNLESS hidden.defined('altcontactfirstname') %]
708 [% IF mandatory.defined('altcontactfirstname') %]
709 <label for="borrower_altcontactfirstname" class="required">First name:</label>
711 <label for="borrower_altcontactfirstname">First name:</label>
714 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname | html %]" />
715 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
719 [% UNLESS hidden.defined('altcontactaddress1') %]
721 [% IF mandatory.defined('altcontactaddress1') %]
722 <label for="borrower_altcontactaddress1" class="required">Address:</label>
724 <label for="borrower_altcontactaddress1">Address:</label>
727 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 | html %]" />
728 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
732 [% UNLESS hidden.defined('altcontactaddress2') %]
734 [% IF mandatory.defined('altcontactaddress2') %]
735 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
737 <label for="borrower_altcontactaddress2">Address 2:</label>
740 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 | html %]" />
741 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
745 [% UNLESS hidden.defined('altcontactaddress3') %]
747 [% IF mandatory.defined('altcontactaddress3') %]
748 <label for="borrower_altcontactaddress3" class="required">City:</label>
750 <label for="borrower_altcontactaddress3">City:</label>
753 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 | html %]" />
754 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
758 [% UNLESS hidden.defined('altcontactstate') %]
760 [% IF mandatory.defined('altcontactstate') %]
761 <label for="borrower_altcontactstate" class="required">State:</label>
763 <label for="borrower_altcontactstate">State:</label>
766 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate | html %]" />
767 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
771 [% UNLESS hidden.defined('altcontactzipcode') %]
773 [% IF mandatory.defined('altcontactzipcode') %]
774 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
776 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
779 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode | html %]" />
780 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
784 [% UNLESS hidden.defined('altcontactcountry') %]
786 [% IF mandatory.defined('altcontactcountry') %]
787 <label for="borrower_altcontactcountry" class="required">Country:</label>
789 <label for="borrower_altcontactcountry">Country:</label>
792 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry | html %]" />
793 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
797 [% UNLESS hidden.defined('altcontactphone') %]
799 [% IF mandatory.defined('altcontactphone') %]
800 <label for="borrower_altcontactphone" class="required">Phone:</label>
802 <label for="borrower_altcontactphone">Phone:</label>
805 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone | html %]" />
806 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
813 [% UNLESS action == 'edit' || hidden.defined('password') %]
814 <fieldset class="rows" id="memberentry_password">
815 <legend id="contact_legend">Password</legend>
816 <div class="alert alert-info">
817 [% IF ( Koha.Preference('RequireStrongPassword') ) %]
818 <p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p>
820 <p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p>
822 [% UNLESS mandatory.defined('password') %]
823 <p>If you do not enter a password a system generated password will be created.</p>
827 [% IF mandatory.defined('password') %]
829 <li><label for="borrower_password" class="required">Password</label>
830 <input type="password" name="borrower_password" id="password" />
831 <span class="required">Required</span>
833 <li><label for="borrower_password2" class="required">Confirm password</label>
834 <input type="password" name="borrower_password2" id="password2" />
835 <span class="required">Required</span>
840 <li><label for="borrower_password">Password</label>
841 <input type="password" name="borrower_password" id="password" />
843 <li><label for="borrower_password2">Confirm password</label>
844 <input type="password" name="borrower_password2" id="password2" />
851 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
852 [% FOREACH pa_class IN patron_attribute_classes %]
853 [% IF pa_class.class %]
854 <fieldset id="aai_[% pa_loo.class | html %]" class="rows patron-attributes">
855 <legend>[% pa_class.lib | html %]</legend>
857 <fieldset class="rows patron-attributes">
858 <legend>Additional information</legend>
860 <ol class="attributes_table">
861 [% FOREACH pa IN pa_class.items %]
862 [% FOREACH pa_value IN pa.values %]
863 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
864 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
865 <li data-category_code="[% pa.type.category_code | html %]">
866 <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
867 [% IF pa.type.opac_editable %]
868 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code | html %]" />
869 [% IF ( pa.type.authorised_value_category ) %]
870 <select id="[% form_id | html %]" name="patron_attribute_value">
871 <option value=""></option>
872 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
873 [% IF ( auth_val.authorised_value == pa_value ) %]
874 <option value="[% auth_val.authorised_value | html %]" selected="selected">
875 [% auth_val.lib | html %]
878 <option value="[% auth_val.authorised_value | html %]" >
879 [% auth_val.lib | html %]
885 <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
887 <a href="#" class="clear-attribute">Clear</a>
888 [% IF ( pa.type.repeatable ) %]
889 <a href="#" class="clone-attribute">New</a>
892 [% IF ( pa.type.authorised_value_category ) %]
893 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
895 [% pa_value | html_line_break %]
906 [% IF Koha.Preference('GDPR_Policy') && action != 'edit' %]
907 <fieldset class="rows" id="memberentry_gdpr_consent">
908 <legend>GDPR consent</legend>
911 <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>
917 [% UNLESS action == 'edit' %]
918 <fieldset class="rows" id="memberentry_captcha">
919 <legend>Verification</legend>
923 <label for="captcha" class="required">Verification:</label>
925 <input type="text" name="captcha" id="captcha" />
926 <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" />
928 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha | html %]</strong></span>
934 [% IF action == 'edit' %]
935 [% IF OPACPatronDetails %]
936 <fieldset class="action">
937 <input type="hidden" name="action" value="update" />
938 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
939 <input type="submit" class="btn" value="Submit update request" />
943 <fieldset class="action">
944 <input type="hidden" name="action" value="create" />
945 <input type="submit" class="btn" value="Submit" />
951 </div><!--/div id="update-account" -->
957 [% INCLUDE 'opac-bottom.inc' %]
958 [% BLOCK jsinclude %]
959 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
960 [% PROCESS 'password_check.inc' %]
961 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
964 $(document).ready(function() {
965 [% IF action == 'edit' && !OPACPatronDetails %]
966 $("#memberentry-form :input").attr('readonly', true);
967 $("#borrower_branchcode").attr('disabled',true);
968 $("#borrower_title").attr('disabled',true);
969 $('#memberentry-form :radio').attr('disabled',true);
970 $('span.required').remove();
971 $('label.required').removeClass('required');
974 $("#memberentry-form").validate({
986 [% IF mandatory.defined('password') %]
989 password_strong: true,
990 password_no_spaces: true
992 borrower_password2: {
993 [% IF mandatory.defined('password') %]
1002 submitHandler: function(form) {
1003 if (form.beenSubmitted) {
1007 form.beenSubmitted = true;
1011 errorPlacement: function(error, element) {
1012 offset = element.offset();
1013 error.insertAfter(element)
1014 error.addClass('error'); // add a class to the wrapper
1015 error.css('position', 'absolute');
1016 error.css('left', offset.left + element.outerWidth() + 10);
1017 error.css('top', offset.top);
1018 error.css('width', 'auto');
1022 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1023 $('#update_privacy_guarantor_checkouts').click( function() {
1024 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
1025 .done(function( data ) {
1027 if ( data.success ) {
1028 message = _("Your setting has been updated!");
1030 message = _("Unable to update your setting!");
1033 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
1038 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1040 .find('textarea').attr('value', '').end()
1041 .find('select').attr('value', '').end();
1046 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1047 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1049 var newId = 50 + parseInt(Math.random() * 100000);
1050 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1051 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1057 $(".cleardate").on("click", function(){
1058 $('#borrower_dateofbirth').val('');
1063 [% INCLUDE 'calendar.inc' %]