1 [% USE AuthorisedValues %]
7 [% SET userupdateview = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% BLOCK cssinclude %][% END %]
15 [% IF action == 'edit' %]
16 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
18 <body id="opac-patron-registration" class="opac">
20 [% INCLUDE 'masthead.inc' %]
23 <ul class="breadcrumb">
24 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
25 [% IF action == 'edit' %]
26 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
27 <li><a href="#">Your personal details</a></li>
29 <li><a href="#">Register a new account</a></li>
33 <div class="container-fluid">
34 <div class="row-fluid">
37 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
41 [% IF action == 'edit' %]
42 <div id="update-account">
44 <div id="add-account">
47 [% IF action == 'edit' %]
48 [% UNLESS OPACPatronDetails %]
49 <div class="alert alert-info">To make changes to your record please contact the library.</div>
52 <div class="alert alert-error">No changes were made.</div>
56 [% IF empty_mandatory_fields %]
57 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
60 [% IF invalid_form_fields %]
61 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
63 [% FOREACH field IN invalid_form_fields %]
64 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
65 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
66 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
67 [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
68 [% IF field == "password_invalid" %]<li>Password does not meet minimum requirements! <a href="#password">password</a></li>[% END %]
69 [% IF field == "password_spaces" %]<li>Password contains leading and/or trailing spaces! <a href="#password">password</a></li>[% END %]
70 [% IF field == "duplicate_email" %]
71 <li>This email address already exists in our database.</li>
75 <span>Please correct and resubmit.</span>
79 [% IF cardnumber_wrong_length || cardnumber_already_exists %]
80 <div class="alert alert-error">
81 [% IF cardnumber_wrong_length %]
82 <a href="#borrower_cardnumber"><strong>The entered card number is the wrong length.</strong></a>
83 [% ELSIF cardnumber_already_exists %]
84 <a href="#borrower_cardnumber"><strong>The entered card number is already in use.</strong></a>
86 <span>Please correct and resubmit.</span>
90 [% IF failed_captcha %]
91 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
94 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
95 <fieldset class="rows" id="memberentry_privacy">
96 <legend id="privacy_legend">Privacy</legend>
99 <label>Allow your guarantor to view your current checkouts?</label>
100 <select id="privacy_guarantor_checkouts">
101 <option value="0">No</option>
102 [% IF borrower.privacy_guarantor_checkouts %]
103 <option value="1" selected="selected">Yes</option>
105 <option value="1">Yes</option>
109 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
110 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
113 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
119 [% IF ( extended_unique_id_failed_code ) %]
120 <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>
123 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
125 [%# Following on one line for translatability %]
126 [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
127 <fieldset class="rows" id="memberentry_library">
129 <legend id="library_legend">Library</legend>
131 [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
133 [% IF mandatory.defined('cardnumber') %]
134 <label for="borrower_cardnumber" class="required">Library card number:</label>
136 <label for="borrower_cardnumber">Library card number:</label>
138 [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
139 [% borrower.cardnumber %]
141 [% IF minlength_cardnumber == maxlength_cardnumber %]
142 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
143 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
144 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
145 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
146 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
147 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
148 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
149 [% ELSIF maxlength_cardnumber %]
150 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
151 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
152 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
154 <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" />
155 [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
156 <div class="hint">There is no minimum or maximum character length.</div>
162 [% UNLESS hidden.defined('dateexpiry') %]
164 <label>Expiration date:</label>
165 [% borrower.dateexpiry | $KohaDates %]
169 [% UNLESS hidden.defined('branchcode') %]
171 [% IF mandatory.defined('branchcode') %]
172 <label for="borrower_branchcode" class="required">Home library:</label>
174 <label for="borrower_branchcode">Home library:</label>
177 <select id="borrower_branchcode" name="borrower_branchcode">
178 [% FOREACH l IN libraries %]
179 [% IF l.branchcode == borrower.branchcode %]
180 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
182 <option value="[% l.branchcode | html %]">[% l.branchname %]</option>
189 [% UNLESS hidden.defined('categorycode') %]
191 <label for="borrower_categorycode">
195 [% Categories.GetName( borrower.categorycode ) %]
196 <input type="hidden" name="borrower_categorycode" value="[% borrower.categorycode %]" />
198 <select id="borrower_categorycode" name="borrower_categorycode">
199 [% FOREACH c IN Categories.all() %]
200 [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %]
201 <option value="[% c.categorycode %]" selected="selected">[% c.description %]</option>
203 <option value="[% c.categorycode %]">[% c.description %]</option>
212 [% END # / defined 'branchcode' %]
214 [%# Following on one line for translatability %]
215 [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %]
216 <div class="row-fluid">
217 [% IF ( display_patron_image ) %]
222 <fieldset class="rows" id="memberentry_identity">
223 <legend id="identity_legend">Identity</legend>
226 [% UNLESS hidden.defined('title') || !Koha.Preference('BorrowersTitles') %]
228 [% IF mandatory.defined('title') %]
229 <label for="borrower_title" class="required">Salutation:</label>
231 <label for="borrower_title">Salutation:</label>
234 <select id="borrower_title" name="borrower_title">
235 <option value=""></option>
236 [% FOREACH mt IN Koha.Preference('BorrowersTitles').split('\|') %]
237 [% IF mt == borrower.title %]
238 <option value="[% mt %]" selected="selected">[% mt %]</option>
240 <option value="[% mt %]">[% mt %]</option>
247 [% UNLESS hidden.defined('surname') %]
249 [% IF mandatory.defined('surname') %]
250 <label for="borrower_surname" class="required">Surname:</label>
252 <label for="borrower_surname">Surname:</label>
255 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
256 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
260 [% UNLESS hidden.defined('firstname') %]
262 [% IF mandatory.defined('firstname') %]
263 <label for="borrower_firstname" class="required">First name:</label>
265 <label for="borrower_firstname">First name:</label>
268 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
269 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
273 [% UNLESS hidden.defined('dateofbirth') %]
275 [% IF mandatory.defined('dateofbirth') %]
276 <label for="borrower_dateofbirth" class="required">Date of birth:</label>
278 <label for="borrower_dateofbirth">Date of birth:</label>
281 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
283 [% UNLESS action == 'edit' && !OPACPatronDetails %]
284 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
285 <a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
289 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
293 [% UNLESS hidden.defined('initials') %]
295 [% IF mandatory.defined('initials') %]
296 <label for="borrower_initials" class="required">Initials:</label>
298 <label for="borrower_initials">Initials:</label>
301 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
302 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
306 [% UNLESS hidden.defined('othernames') %]
308 [% IF mandatory.defined('othernames') %]
309 <label for="borrower_othernames" class="required">Other names:</label>
311 <label for="borrower_othernames">Other names:</label>
314 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
315 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
319 [% UNLESS hidden.defined('sex') %]
321 <label for="sex-female" class="radio inline">Female:</label>
322 [% IF borrower.sex == 'F' %]
323 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
325 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
328 <label for="sex-male" class="radio inline">Male:</label>
329 [% IF borrower.sex == 'M' %]
330 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
332 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
335 <label for="sex-none" class="radio inline">None specified: </label>
336 [% IF borrower.sex == '' %]
337 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
339 <input type="radio" name="borrower_sex" id="sex-none" value="" />
342 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
348 [% IF ( display_patron_image ) %]
350 <p class="patronimage">
351 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
356 [% END # /UNLESS fields hidden %]
358 [%# Following on one line for translatability %]
359 [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
360 <fieldset class="rows" id="memberentry_mainaddress">
361 <legend id="mainaddress_legend">Main address</legend>
364 [% UNLESS hidden.defined('streetnumber') %]
366 [% IF mandatory.defined('streetnumber') %]
367 <label for="borrower_streetnumber" class="required">Street number:</label>
369 <label for="borrower_streetnumber">Street number:</label>
372 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
373 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
377 [% UNLESS hidden.defined('address') %]
379 [% IF mandatory.defined('address') %]
380 <label for="borrower_address" class="required">Address:</label>
382 <label for="borrower_address">Address:</label>
385 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
386 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
390 [% UNLESS hidden.defined('address2') %]
392 [% IF mandatory.defined('address2') %]
393 <label for="borrower_address2" class="required">Address 2:</label>
395 <label for="borrower_address2">Address 2:</label>
398 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
399 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
403 [% UNLESS hidden.defined('city') %]
405 [% IF mandatory.defined('city') %]
406 <label for="borrower_city" class="required">City:</label>
408 <label for="borrower_city">City:</label>
411 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
412 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
416 [% UNLESS hidden.defined('state') %]
418 [% IF mandatory.defined('state') %]
419 <label for="borrower_state" class="required">State:</label>
421 <label for="borrower_state">State:</label>
424 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
425 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
429 [% UNLESS hidden.defined('zipcode') %]
431 [% IF mandatory.defined('zipcode') %]
432 <label for="borrower_zipcode" class="required">ZIP/Postal code:</label>
434 <label for="borrower_zipcode">ZIP/Postal code:</label>
437 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
438 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
442 [% UNLESS hidden.defined('country') %]
444 [% IF mandatory.defined('country') %]
445 <label for="borrower_country" class="required">Country:</label>
447 <label for="borrower_country">Country:</label>
450 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
451 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
459 [%# Following on one line for translatability %]
460 [% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
461 <fieldset class="rows" id="memberentry_contact">
462 <legend id="contact_legend">Contact information</legend>
465 [% UNLESS hidden.defined('phone') %]
467 [% IF mandatory.defined('phone') %]
468 <label for="borrower_phone" class="required">Primary phone:</label>
470 <label for="borrower_phone">Primary phone:</label>
473 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
474 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
478 [% UNLESS hidden.defined('phonepro') %]
480 [% IF mandatory.defined('phonepro') %]
481 <label for="borrower_phonepro" class="required">Secondary phone:</label>
483 <label for="borrower_phonepro">Secondary phone:</label>
486 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
487 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
491 [% UNLESS hidden.defined('mobile') %]
493 [% IF mandatory.defined('mobile') %]
494 <label for="borrower_mobile" class="required">Other phone:</label>
496 <label for="borrower_mobile">Other phone:</label>
499 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
500 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
504 [% UNLESS hidden.defined('email') %]
506 [% IF mandatory.defined('email') %]
507 <label for="borrower_email" class="required">Primary email:</label>
509 <label for="borrower_email">Primary email:</label>
512 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
513 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
517 [% UNLESS hidden.defined('emailpro') %]
519 [% IF mandatory.defined('emailpro') %]
520 <label for="borrower_emailpro" class="required">Secondary email:</label>
522 <label for="borrower_emailpro">Secondary email:</label>
525 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
526 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
530 [% UNLESS hidden.defined('fax') %]
532 [% IF mandatory.defined('fax') %]
533 <label for="borrower_fax" class="required">Fax:</label>
535 <label for="borrower_fax">Fax:</label>
538 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
539 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
546 [%# Following on one line for translatability %]
547 [% 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') %]
548 <fieldset class="rows" id="memberentry_alternateaddress">
549 <legend id="alternateaddress_legend">Alternate address</legend>
552 [% UNLESS hidden.defined('B_address') %]
554 [% IF mandatory.defined('B_address') %]
555 <label for="borrower_B_address" class="required">Address:</label>
557 <label for="borrower_B_address">Address:</label>
560 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
561 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
565 [% UNLESS hidden.defined('B_address2') %]
567 [% IF mandatory.defined('B_address2') %]
568 <label for="borrower_B_address2" class="required">Address 2:</label>
570 <label for="borrower_B_address2">Address 2:</label>
573 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
574 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
578 [% UNLESS hidden.defined('B_city') %]
580 [% IF mandatory.defined('B_city') %]
581 <label for="borrower_B_city" class="required">City:</label>
583 <label for="borrower_B_city">City:</label>
586 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
587 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
591 [% UNLESS hidden.defined('B_state') %]
593 [% IF mandatory.defined('B_state') %]
594 <label for="borrower_B_state" class="required">State:</label>
596 <label for="borrower_B_state">State:</label>
599 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
600 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
604 [% UNLESS hidden.defined('B_zipcode') %]
606 [% IF mandatory.defined('B_zipcode') %]
607 <label for="borrower_B_zipcode" class="required">ZIP/Postal code:</label>
609 <label for="borrower_B_zipcode">ZIP/Postal code:</label>
612 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
613 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
617 [% UNLESS hidden.defined('B_country') %]
619 [% IF mandatory.defined('B_country') %]
620 <label for="borrower_B_country" class="required">Country:</label>
622 <label for="borrower_B_country">Country:</label>
625 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
626 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
630 [% UNLESS hidden.defined('B_phone') %]
632 [% IF mandatory.defined('B_phone') %]
633 <label for="borrower_B_phone" class="required">Phone:</label>
635 <label for="borrower_B_phone">Phone:</label>
638 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
639 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
643 [% UNLESS hidden.defined('B_email') %]
645 [% IF mandatory.defined('B_email') %]
646 <label for="borrower_B_email" class="required">Email:</label>
648 <label for="borrower_B_email">Email:</label>
651 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
652 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
656 [% UNLESS hidden.defined('contactnote') %]
658 [% IF mandatory.defined('contactnote') %]
659 <label for="borrower_contactnote" class="required">Contact note:</label>
661 <label for="borrower_contactnote">Contact note:</label>
664 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
665 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
673 [%# Following on one line for translatability %]
674 [% 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') %]
675 <fieldset class="rows" id="memberentry_alternatecontact">
676 <legend id="alternatecontact_legend">Alternate contact</legend>
679 [% UNLESS hidden.defined('altcontactsurname') %]
681 [% IF mandatory.defined('altcontactsurname') %]
682 <label for="borrower_altcontactsurname" class="required">Surname:</label>
684 <label for="borrower_altcontactsurname">Surname:</label>
687 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
688 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
692 [% UNLESS hidden.defined('altcontactfirstname') %]
694 [% IF mandatory.defined('altcontactfirstname') %]
695 <label for="borrower_altcontactfirstname" class="required">First name:</label>
697 <label for="borrower_altcontactfirstname">First name:</label>
700 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
701 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
705 [% UNLESS hidden.defined('altcontactaddress1') %]
707 [% IF mandatory.defined('altcontactaddress1') %]
708 <label for="borrower_altcontactaddress1" class="required">Address:</label>
710 <label for="borrower_altcontactaddress1">Address:</label>
713 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
714 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
718 [% UNLESS hidden.defined('altcontactaddress2') %]
720 [% IF mandatory.defined('altcontactaddress2') %]
721 <label for="borrower_altcontactaddress2" class="required">Address 2:</label>
723 <label for="borrower_altcontactaddress2">Address 2:</label>
726 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
727 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
731 [% UNLESS hidden.defined('altcontactaddress3') %]
733 [% IF mandatory.defined('altcontactaddress3') %]
734 <label for="borrower_altcontactaddress3" class="required">City:</label>
736 <label for="borrower_altcontactaddress3">City:</label>
739 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
740 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
744 [% UNLESS hidden.defined('altcontactstate') %]
746 [% IF mandatory.defined('altcontactstate') %]
747 <label for="borrower_altcontactstate" class="required">State:</label>
749 <label for="borrower_altcontactstate">State:</label>
752 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
753 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
757 [% UNLESS hidden.defined('altcontactzipcode') %]
759 [% IF mandatory.defined('altcontactzipcode') %]
760 <label for="borrower_altcontactzipcode" class="required">ZIP/Postal code:</label>
762 <label for="borrower_altcontactzipcode">ZIP/Postal code:</label>
765 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
766 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
770 [% UNLESS hidden.defined('altcontactcountry') %]
772 [% IF mandatory.defined('altcontactcountry') %]
773 <label for="borrower_altcontactcountry" class="required">Country:</label>
775 <label for="borrower_altcontactcountry">Country:</label>
778 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
779 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
783 [% UNLESS hidden.defined('altcontactphone') %]
785 [% IF mandatory.defined('altcontactphone') %]
786 <label for="borrower_altcontactphone" class="required">Phone:</label>
788 <label for="borrower_altcontactphone">Phone:</label>
791 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
792 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
799 [% UNLESS action == 'edit' || hidden.defined('password') %]
800 <fieldset class="rows" id="memberentry_password">
801 <legend id="contact_legend">Password</legend>
802 [% IF Koha.Preference('minPasswordLength') || !mandatory.defined('password') %]
803 <div class="alert alert-info">
804 [% IF Koha.Preference('minPasswordLength') %]
805 <p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
807 [% UNLESS mandatory.defined('password') %]
808 <div>If you do not enter a password a system generated password will be created.</div>
813 [% IF mandatory.defined('password') %]
815 <li><label for="borrower_password" class="required">Password</label>
816 <input type="password" name="borrower_password" id="password" />
817 <span class="required">Required</span>
819 <li><label for="borrower_password2" class="required">Confirm password</label>
820 <input type="password" name="borrower_password2" id="password2" />
821 <span class="required">Required</span>
826 <li><label for="borrower_password">Password</label>
827 <input type="password" name="borrower_password" id="password" />
829 <li><label for="borrower_password2">Confirm password</label>
830 <input type="password" name="borrower_password2" id="password2" />
837 [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
838 [% FOREACH pa_class IN patron_attribute_classes %]
839 [% IF pa_class.class %]
840 <fieldset id="aai_[% pa_loo.class %]" class="rows patron-attributes">
841 <legend>[% pa_class.lib %]</legend>
843 <fieldset class="rows patron-attributes">
844 <legend>Additional information</legend>
846 <ol class="attributes_table">
847 [% FOREACH pa IN pa_class.items %]
848 [% FOREACH pa_value IN pa.values %]
849 [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code %]"></a>[% END %]
850 [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
851 <li data-category_code="[% pa.type.category_code %]">
852 <label for="[% form_id %]">[% pa.type.description %]: </label>
853 [% IF pa.type.opac_editable %]
854 <input type="hidden" name="patron_attribute_code" value="[% pa.type.code |html %]" />
855 [% IF ( pa.type.authorised_value_category ) %]
856 <select id="[% form_id %]" name="patron_attribute_value">
857 <option value=""></option>
858 [% FOREACH auth_val IN AuthorisedValues.Get( pa.type.authorised_value_category, 1 ) %]
859 [% IF ( auth_val.authorised_value == pa_value ) %]
860 <option value="[% auth_val.authorised_value %]" selected="selected">
864 <option value="[% auth_val.authorised_value %]" >
871 <textarea rows="2" cols="30" id="[% form_id %]" name="patron_attribute_value">[% pa_value %]</textarea>
873 <a href="#" class="clear-attribute">Clear</a>
874 [% IF ( pa.type.repeatable ) %]
875 <a href="#" class="clone-attribute">New</a>
878 [% IF ( pa.type.authorised_value_category ) %]
879 [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
881 [% pa_value | html_line_break %]
892 [% UNLESS action == 'edit' %]
893 <fieldset class="rows" id="memberentry_captcha">
897 <label for="captcha" class="required">Verification:</label>
899 <input type="text" name="captcha" id="captcha" />
900 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
902 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
908 [% IF action == 'edit' %]
909 [% IF OPACPatronDetails %]
910 <fieldset class="action">
911 <input type="hidden" name="action" value="update" />
912 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
913 <input type="submit" class="btn" value="Submit update request" />
917 <fieldset class="action">
918 <input type="hidden" name="action" value="create" />
919 <input type="submit" class="btn" value="Submit" />
925 </div><!--/div id="update-account" -->
931 [% INCLUDE 'opac-bottom.inc' %]
932 [% BLOCK jsinclude %]
933 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min.js"></script>
934 [% PROCESS 'password_check.inc' %]
935 [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
936 <script type="text/javascript">
938 $(document).ready(function() {
939 [% IF action == 'edit' && !OPACPatronDetails %]
940 $("#memberentry-form :input").attr('readonly', true);
941 $("#borrower_branchcode").attr('disabled',true);
942 $("#borrower_title").attr('disabled',true);
943 $('#memberentry-form :radio').attr('disabled',true);
944 $('span.required').remove();
945 $('label.required').removeClass('required');
948 $("#memberentry-form").validate({
960 [% IF mandatory.defined('password') %]
963 password_strong: true,
964 password_no_spaces: true
966 borrower_password2: {
967 [% IF mandatory.defined('password') %]
976 submitHandler: function(form) {
977 if (form.beenSubmitted) {
981 form.beenSubmitted = true;
985 errorPlacement: function(error, element) {
986 offset = element.offset();
987 error.insertAfter(element)
988 error.addClass('error'); // add a class to the wrapper
989 error.css('position', 'absolute');
990 error.css('left', offset.left + element.outerWidth() + 10);
991 error.css('top', offset.top);
992 error.css('width', 'auto');
996 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
997 $('#update_privacy_guarantor_checkouts').click( function() {
998 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
999 .done(function( data ) {
1001 if ( data.success ) {
1002 message = _("Your setting has been updated!");
1004 message = _("Unable to update your setting!");
1007 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
1012 $(".patron-attributes").on( 'click', '.clear-attribute', function() {
1014 .find('textarea').attr('value', '').end()
1015 .find('select').attr('value', '').end();
1020 $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1021 var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1023 var newId = 50 + parseInt(Math.random() * 100000);
1024 $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1025 $("label", clone).attr('for', 'patron-attr-' + newId).attr('value', '');
1031 $(".cleardate").on("click", function(){
1032 $('#borrower_dateofbirth').val('');
1037 [% INCLUDE 'calendar.inc' %]