2 [% USE AuthorisedValues %]
8 [% SET userupdateview = 1 %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% BLOCK cssinclude %][% END %]
16 [% IF action == 'edit' %]
17 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
19 <body id="opac-patron-registration" class="opac">
21 [% INCLUDE 'masthead.inc' %]
24 <ul class="breadcrumb">
25 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
26 [% IF action == 'edit' %]
27 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
28 <li><a href="#">Your personal details</a></li>
30 <li><a href="#">Register a new account</a></li>
34 <div class="container-fluid">
35 <div class="row-fluid">
38 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
42 [% IF action == 'edit' %]
43 <div id="update-account">
45 <div id="add-account">
48 [% IF action == 'edit' %]
49 [% UNLESS OPACPatronDetails %]
50 <div class="alert alert-info">To make changes to your record please contact the library.</div>
53 <div class="alert alert-error">No changes were made.</div>
57 [% IF empty_mandatory_fields %]
58 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
61 [% IF invalid_form_fields %]
62 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
64 [% FOREACH field IN invalid_form_fields %]
65 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
66 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
67 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
68 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
69 [% IF field == "password_too_short" %]
70 <li>Password must be at least [% minPasswordLength %] characters long.</li>
72 [% IF field == "password_too_weak" %]
73 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
75 [% IF field == "password_has_whitespaces" %]
76 <li>Password must not contain leading or trailing whitespaces.</li>
78 [% IF field == "duplicate_email" %]
79 <li>This email address already exists in our database.</li>
83 <span>Please correct and resubmit.</span>
87 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
88 <div class="alert alert-error">
89 [% IF cardnumber_wrong_length %]
90 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
91 [% ELSIF cardnumber_already_exists %]
92 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
94 <span>Please correct and resubmit.</span>
98 [% IF failed_captcha %]
99 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
102 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
103 <fieldset class="rows" id="memberentry_privacy">
104 <legend id="privacy_legend">Privacy</legend>
107 <label>Allow your guarantor to view your current checkouts?</label>
108 <select id="privacy_guarantor_checkouts">
109 <option value="0">No</option>
110 [% IF borrower.privacy_guarantor_checkouts %]
111 <option value="1" selected="selected">Yes</option>
113 <option value="1">Yes</option>
117 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
118 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
121 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
127 [% IF ( extended_unique_id_failed_code ) %]
128 <div class="alert" id="extended_unique_id_failed"><a href="#patron-attr-start-[% extended_unique_id_failed_code %]">[% extended_unique_id_failed_description _ ': ' %]</a> Value is already in use ([% extended_unique_id_failed_value %])</div>
131 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off">
133 [%# Following on one line for translatability %]
134 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
135 <fieldset class="rows" id="memberentry_library">
137 <legend id="library_legend">Library</legend>
139 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
141 [% IF mandatory.defined('cardnumber') %]
142 <label for="borrower_cardnumber" class="required">Library card number:</label>
144 <label for="borrower_cardnumber">Library card number:</label>
146 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
147 [% borrower.cardnumber %]
149 [% IF minlength_cardnumber == maxlength_cardnumber %]
150 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
151 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
152 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
153 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
154 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
155 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
156 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
157 [% ELSIF maxlength_cardnumber %]
158 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
159 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
160 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
162 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" />
163 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
164 <div class="hint">There is no minimum or maximum character length.</div>
170 [% UNLESS hidden.defined('dateexpiry') %]
172 <label>Expiration date:</label>
173 [% borrower.dateexpiry | $KohaDates %]
177 [% UNLESS hidden.defined('branchcode') %]
179 [% IF mandatory.defined('branchcode') %]
180 <label for="borrower_branchcode" class="required">Home library:</label>
182 <label for="borrower_branchcode">Home library:</label>
185 <select id="borrower_branchcode" name="borrower_branchcode">
186 [% FOREACH l IN libraries %]
187 [% IF l.branchcode == borrower.branchcode %]
188 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
190 <option value="[% l.branchcode | html %]">[% l.branchname %]</option>
197 [% UNLESS hidden.defined('categorycode') %]
199 <label for="borrower_categorycode">
203 [% Categories.GetName( borrower.categorycode ) %]
204 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode %]" />
206 <select id="borrower_categorycode" name="borrower_categorycode">
207 [% FOREACH c IN Categories.all() %]
208 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
209 <option value="[% c.categorycode %]" selected="selected">[% c.description %]</option>
211 <option value="[% c.categorycode %]">[% c.description %]</option>
220 [% END # / defined 'branchcode' %]
222 [%# Following on one line for translatability %]
223 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
224 <div class="row-fluid">
225 [% IF ( display_patron_image ) %]
230 <fieldset class="rows" id="memberentry_identity">
231 <legend id="identity_legend">Identity</legend>
234 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
236 [% IF mandatory.defined('title') %]
237 <label for="borrower_title" class="required">Salutation:</label>
239 <label for="borrower_title">Salutation:</label>
242 <select id="borrower_title" name="borrower_title">
243 <option value=""></option>
244 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
245 [% IF mt == borrower.title %]
246 <option value="[% mt %]" selected="selected">[% mt %]</option>
248 <option value="[% mt %]">[% mt %]</option>
255 [% UNLESS hidden.defined('surname') %]
257 [% IF mandatory.defined('surname') %]
258 <label for="borrower_surname" class="required">Surname:</label>
260 <label for="borrower_surname">Surname:</label>
263 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
264 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
268 [% UNLESS hidden.defined('firstname') %]
270 [% IF mandatory.defined('firstname') %]
271 <label for="borrower_firstname" class="required">First name:</label>
273 <label for="borrower_firstname">First name:</label>
276 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
277 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
281 [% UNLESS hidden.defined('dateofbirth') %]
283 [% IF mandatory.defined('dateofbirth') %]
284 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
286 <label for="borrower_dateofbirth">Date of birth:</label>
289 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
291 [% UNLESS action == 'edit' && !OPACPatronDetails %]
292 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
293 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
297 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
301 [% UNLESS hidden.defined('initials') %]
303 [% IF mandatory.defined('initials') %]
304 <label for="borrower_initials" class="required">Initials:</label>
306 <label for="borrower_initials">Initials:</label>
309 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
310 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
314 [% UNLESS hidden.defined('othernames') %]
316 [% IF mandatory.defined('othernames') %]
317 <label for="borrower_othernames" class="required">Other names:</label>
319 <label for="borrower_othernames">Other names:</label>
322 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
323 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
327 [% UNLESS hidden.defined('sex') %]
329 <label for="sex-female" class="radio inline">Female:</label>
330 [% IF borrower.sex == 'F' %]
331 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
333 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
336 <label for="sex-male" class="radio inline">Male:</label>
337 [% IF borrower.sex == 'M' %]
338 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
340 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
343 <label for="sex-none" class="radio inline">None specified: </label>
344 [% IF borrower.sex == '' %]
345 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
347 <input type="radio" name="borrower_sex" id="sex-none" value="" />
350 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
356 [% IF ( display_patron_image ) %]
358 <p class="patronimage">
359 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
364 [% END # /UNLESS fields hidden %]
366 [%# Following on one line for translatability %]
367 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
368 <fieldset class="rows" id="memberentry_mainaddress">
369 <legend id="mainaddress_legend">Main address</legend>
372 [% UNLESS hidden.defined('streetnumber') %]
374 [% IF mandatory.defined('streetnumber') %]
375 <label for="borrower_streetnumber" class="required">Street number:</label>
377 <label for="borrower_streetnumber">Street number:</label>
380 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
381 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
385 [% UNLESS hidden.defined('address') %]
387 [% IF mandatory.defined('address') %]
388 <label for="borrower_address" class="required">Address:</label>
390 <label for="borrower_address">Address:</label>
393 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
394 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
398 [% UNLESS hidden.defined('address2') %]
400 [% IF mandatory.defined('address2') %]
401 <label for="borrower_address2" class="required">Address 2:</label>
403 <label for="borrower_address2">Address 2:</label>
406 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
407 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
411 [% UNLESS hidden.defined('city') %]
413 [% IF mandatory.defined('city') %]
414 <label for="borrower_city" class="required">City:</label>
416 <label for="borrower_city">City:</label>
419 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
420 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
424 [% UNLESS hidden.defined('state') %]
426 [% IF mandatory.defined('state') %]
427 <label for="borrower_state" class="required">State:</label>
429 <label for="borrower_state">State:</label>
432 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
433 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
437 [% UNLESS hidden.defined('zipcode') %]
439 [% IF mandatory.defined('zipcode') %]
440 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
442 <label for="borrower_zipcode">ZIP/Postal code:</label>
445 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
446 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
450 [% UNLESS hidden.defined('country') %]
452 [% IF mandatory.defined('country') %]
453 <label for="borrower_country" class="required">Country:</label>
455 <label for="borrower_country">Country:</label>
458 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
459 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
467 [%# Following on one line for translatability %]
468 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
469 <fieldset class="rows" id="memberentry_contact">
470 <legend id="contact_legend">Contact information</legend>
473 [% UNLESS hidden.defined('phone') %]
475 [% IF mandatory.defined('phone') %]
476 <label for="borrower_phone" class="required">Primary phone:</label>
478 <label for="borrower_phone">Primary phone:</label>
481 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
482 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
486 [% UNLESS hidden.defined('phonepro') %]
488 [% IF mandatory.defined('phonepro') %]
489 <label for="borrower_phonepro" class="required">Secondary phone:</label>
491 <label for="borrower_phonepro">Secondary phone:</label>
494 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
495 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
499 [% UNLESS hidden.defined('mobile') %]
501 [% IF mandatory.defined('mobile') %]
502 <label for="borrower_mobile" class="required">Other phone:</label>
504 <label for="borrower_mobile">Other phone:</label>
507 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
508 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
512 [% UNLESS hidden.defined('email') %]
514 [% IF mandatory.defined('email') %]
515 <label for="borrower_email" class="required">Primary email:</label>
517 <label for="borrower_email">Primary email:</label>
520 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
521 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
525 [% UNLESS hidden.defined('emailpro') %]
527 [% IF mandatory.defined('emailpro') %]
528 <label for="borrower_emailpro" class="required">Secondary email:</label>
530 <label for="borrower_emailpro">Secondary email:</label>
533 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
534 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
538 [% UNLESS hidden.defined('fax') %]
540 [% IF mandatory.defined('fax') %]
541 <label for="borrower_fax" class="required">Fax:</label>
543 <label for="borrower_fax">Fax:</label>
546 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
547 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
554 [%# Following on one line for translatability %]
555 [% 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') %]
556 <fieldset class="rows" id="memberentry_alternateaddress">
557 <legend id="alternateaddress_legend">Alternate address</legend>
560 [% UNLESS hidden.defined('B_address') %]
562 [% IF mandatory.defined('B_address') %]
563 <label for="borrower_B_address" class="required">Address:</label>
565 <label for="borrower_B_address">Address:</label>
568 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
569 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
573 [% UNLESS hidden.defined('B_address2') %]
575 [% IF mandatory.defined('B_address2') %]
576 <label for="borrower_B_address2" class="required">Address 2:</label>
578 <label for="borrower_B_address2">Address 2:</label>
581 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
582 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
586 [% UNLESS hidden.defined('B_city') %]
588 [% IF mandatory.defined('B_city') %]
589 <label for="borrower_B_city" class="required">City:</label>
591 <label for="borrower_B_city">City:</label>
594 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
595 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
599 [% UNLESS hidden.defined('B_state') %]
601 [% IF mandatory.defined('B_state') %]
602 <label for="borrower_B_state" class="required">State:</label>
604 <label for="borrower_B_state">State:</label>
607 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
608 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
612 [% UNLESS hidden.defined('B_zipcode') %]
614 [% IF mandatory.defined('B_zipcode') %]
615 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
617 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
620 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
621 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
625 [% UNLESS hidden.defined('B_country') %]
627 [% IF mandatory.defined('B_country') %]
628 <label for="borrower_B_country" class="required">Country:</label>
630 <label for="borrower_B_country">Country:</label>
633 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
634 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
638 [% UNLESS hidden.defined('B_phone') %]
640 [% IF mandatory.defined('B_phone') %]
641 <label for="borrower_B_phone" class="required">Phone:</label>
643 <label for="borrower_B_phone">Phone:</label>
646 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
647 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
651 [% UNLESS hidden.defined('B_email') %]
653 [% IF mandatory.defined('B_email') %]
654 <label for="borrower_B_email" class="required">Email:</label>
656 <label for="borrower_B_email">Email:</label>
659 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
660 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
664 [% UNLESS hidden.defined('contactnote') %]
666 [% IF mandatory.defined('contactnote') %]
667 <label for="borrower_contactnote" class="required">Contact note:</label>
669 <label for="borrower_contactnote">Contact note:</label>
672 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
673 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
681 [%# Following on one line for translatability %]
682 [% 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') %]
683 <fieldset class="rows" id="memberentry_alternatecontact">
684 <legend id="alternatecontact_legend">Alternate contact</legend>
687 [% UNLESS hidden.defined('altcontactsurname') %]
689 [% IF mandatory.defined('altcontactsurname') %]
690 <label for="borrower_altcontactsurname" class="required">Surname:</label>
692 <label for="borrower_altcontactsurname">Surname:</label>
695 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
696 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
700 [% UNLESS hidden.defined('altcontactfirstname') %]
702 [% IF mandatory.defined('altcontactfirstname') %]
703 <label for="borrower_altcontactfirstname" class="required">First name:</label>
705 <label for="borrower_altcontactfirstname">First name:</label>
708 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
709 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
713 [% UNLESS hidden.defined('altcontactaddress1') %]
715 [% IF mandatory.defined('altcontactaddress1') %]
716 <label for="borrower_altcontactaddress1" class="required">Address:</label>
718 <label for="borrower_altcontactaddress1">Address:</label>
721 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
722 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
726 [% UNLESS hidden.defined('altcontactaddress2') %]
728 [% IF mandatory.defined('altcontactaddress2') %]
729 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
731 <label for="borrower_altcontactaddress2">Address 2:</label>
734 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
735 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
739 [% UNLESS hidden.defined('altcontactaddress3') %]
741 [% IF mandatory.defined('altcontactaddress3') %]
742 <label for="borrower_altcontactaddress3" class="required">City:</label>
744 <label for="borrower_altcontactaddress3">City:</label>
747 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
748 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
752 [% UNLESS hidden.defined('altcontactstate') %]
754 [% IF mandatory.defined('altcontactstate') %]
755 <label for="borrower_altcontactstate" class="required">State:</label>
757 <label for="borrower_altcontactstate">State:</label>
760 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
761 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
765 [% UNLESS hidden.defined('altcontactzipcode') %]
767 [% IF mandatory.defined('altcontactzipcode') %]
768 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
770 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
773 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
774 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
778 [% UNLESS hidden.defined('altcontactcountry') %]
780 [% IF mandatory.defined('altcontactcountry') %]
781 <label for="borrower_altcontactcountry" class="required">Country:</label>
783 <label for="borrower_altcontactcountry">Country:</label>
786 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
787 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
791 [% UNLESS hidden.defined('altcontactphone') %]
793 [% IF mandatory.defined('altcontactphone') %]
794 <label for="borrower_altcontactphone" class="required">Phone:</label>
796 <label for="borrower_altcontactphone">Phone:</label>
799 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
800 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
807 [% UNLESS action == 'edit' || hidden.defined('password') %]
808 <fieldset class="rows" id="memberentry_password">
809 <legend id="contact_legend">Password</legend>
810 <div class="alert alert-info">
811 <p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
812 [% UNLESS mandatory.defined('password') %]
813 <div>If you do not enter a password a system generated password will be created.</div>
817 [% IF mandatory.defined('password') %]
819 <li><label for="borrower_password" class="required">Password</label>
820 <input type="password" name="borrower_password" id="password" />
821 <span class="required">Required</span>
823 <li><label for="borrower_password2" class="required">Confirm password</label>
824 <input type="password" name="borrower_password2" id="password2" />
825 <span class="required">Required</span>
830 <li><label for="borrower_password">Password</label>
831 <input type="password" name="borrower_password" id="password" />
833 <li><label for="borrower_password2">Confirm password</label>
834 <input type="password" name="borrower_password2" id="password2" />
841 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
842 [% FOREACH pa_class IN patron_attribute_classes %]
843 [% IF pa_class.class %]
844 <fieldset id="aai_[% pa_loo.class %]" class="rows patron-attributes">
845 <legend>[% pa_class.lib %]</legend>
847 <fieldset class="rows patron-attributes">
848 <legend>Additional information</legend>
850 <ol class="attributes_table">
851 [% FOREACH pa IN pa_class.items %]
852 [% FOREACH pa_value IN pa.values %]
853 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code %]"></a>[% END %]
854 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
855 <li data-category_code="[% pa.type.category_code %]">
856 <label for="[% form_id %]">[% pa.type.description %]: </label>
857 [% IF pa.type.opac_editable %]
858 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code |html %]" />
859 [% IF ( pa.type.authorised_value_category ) %]
860 <select id="[% form_id %]" name="patron_attribute_value">
861 <option value=""></option>
862 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
863 [% IF ( auth_val.authorised_value == pa_value ) %]
864 <option value="[% auth_val.authorised_value %]" selected="selected">
868 <option value="[% auth_val.authorised_value %]" >
875 <textarea rows="2" cols="30" id="[% form_id %]" name="patron_attribute_value">[% pa_value %]</textarea>
877 <a href="#" class="clear-attribute">Clear</a>
878 [% IF ( pa.type.repeatable ) %]
879 <a href="#" class="clone-attribute">New</a>
882 [% IF ( pa.type.authorised_value_category ) %]
883 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
885 [% pa_value | html_line_break %]
896 [% UNLESS action == 'edit' %]
897 <fieldset class="rows" id="memberentry_captcha">
901 <label for="captcha" class="required">Verification:</label>
903 <input type="text" name="captcha" id="captcha" />
904 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
906 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
912 [% IF action == 'edit' %]
913 [% IF OPACPatronDetails %]
914 <fieldset class="action">
915 <input type="hidden" name="action" value="update" />
916 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
917 <input type="submit" class="btn" value="Submit update request" />
921 <fieldset class="action">
922 <input type="hidden" name="action" value="create" />
923 <input type="submit" class="btn" value="Submit" />
929 </div><!--/div id="update-account" -->
935 [% INCLUDE 'opac-bottom.inc' %]
936 [% BLOCK jsinclude %]
937 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") %]
938 [% PROCESS 'password_check.inc' %]
939 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
942 $(document).ready(function() {
943 [% IF action == 'edit' && !OPACPatronDetails %]
944 $("#memberentry-form :input").attr('readonly', true);
945 $("#borrower_branchcode").attr('disabled',true);
946 $("#borrower_title").attr('disabled',true);
947 $('#memberentry-form :radio').attr('disabled',true);
948 $('span.required').remove();
949 $('label.required').removeClass('required');
952 $("#memberentry-form").validate({
964 [% IF mandatory.defined('password') %]
967 password_strong: true,
968 password_no_spaces: true
970 borrower_password2: {
971 [% IF mandatory.defined('password') %]
980 submitHandler: function(form) {
981 if (form.beenSubmitted) {
985 form.beenSubmitted = true;
989 errorPlacement: function(error, element) {
990 offset = element.offset();
991 error.insertAfter(element)
992 error.addClass('error'); // add a class to the wrapper
993 error.css('position', 'absolute');
994 error.css('left', offset.left + element.outerWidth() + 10);
995 error.css('top', offset.top);
996 error.css('width', 'auto');
1000 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
1001 $('#update_privacy_guarantor_checkouts').click( function() {
1002 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
1003 .done(function( data ) {
1005 if ( data.success ) {
1006 message = _("Your setting has been updated!");
1008 message = _("Unable to update your setting!");
1011 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
1016 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1018 .find('textarea').attr('value', '').end()
1019 .find('select').attr('value', '').end();
1024 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1025 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1027 var newId = 50 + parseInt(Math.random() * 100000);
1028 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1029 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1035 $(".cleardate").on("click", function(){
1036 $('#borrower_dateofbirth').val('');
1041 [% INCLUDE 'calendar.inc' %]