3 [% SET userupdateview = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
11 [% IF action == 'edit' %]
12 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-update' %]
14 <body id="opac-patron-registration" class="opac">
16 [% INCLUDE 'masthead.inc' %]
19 <ul class="breadcrumb">
20 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
21 [% IF action == 'edit' %]
22 <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li>
23 <li><a href="#">Your personal details</a></li>
25 <li><a href="#">Register a new account</a></li>
29 <div class="container-fluid">
30 <div class="row-fluid">
33 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
37 [% IF action == 'edit' %]
38 <div id="update-account">
40 <div id="add-account">
43 [% IF action == 'edit' %]
44 [% UNLESS OPACPatronDetails %]
45 <div class="alert alert-info">To make changes to your record please contact the library.</div>
48 <div class="alert alert-error">No changes were made.</div>
52 [% IF empty_mandatory_fields %]
53 <div class="alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
56 [% IF invalid_form_fields %]
57 <div class="alert alert-error"><strong>The following fields contain invalid information:</strong>
59 [% FOREACH field IN invalid_form_fields %]
60 [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
61 [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
62 [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
65 Please correct the errors and resubmit.
69 [% IF failed_captcha %]
70 <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
73 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
74 <fieldset class="rows" id="memberentry_privacy">
75 <legend id="privacy_legend">Privacy</legend>
78 <label>Allow your guarantor to view your current checkouts?</label>
79 <select id="privacy_guarantor_checkouts">
80 <option value="0">No</option>
81 [% IF borrower.privacy_guarantor_checkouts %]
82 <option value="1" selected="selected">Yes</option>
84 <option value="1">Yes</option>
88 <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
89 <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
92 Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i>
99 <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
101 [% UNLESS hidden.defined('branchcode') %]
102 <fieldset class="rows" id="memberentry_library">
104 <legend id="library_legend">Library</legend>
106 [% UNLESS hidden.defined('cardnumber') %]
108 <label>Card number:</label>
109 [% borrower.cardnumber %]
113 [% UNLESS hidden.defined('dateexpiry') %]
115 <label>Expiration date:</label>
116 [% borrower.dateexpiry | $KohaDates %]
120 [% UNLESS hidden.defined('branchcode') %]
122 [% IF mandatory.defined('branchcode') %]
123 <label for="borrower_branchcode" class="required">
125 <label for="borrower_branchcode">
127 Home library:</label>
129 <select id="borrower_branchcode" name="borrower_branchcode">
130 [% FOREACH b IN branches %]
131 [% IF b.value == borrower.branchcode %]
132 <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
134 <option value="[% b.value %]">[% b.branchname %]</option>
142 [% END # / defined 'branchcode' %]
145 hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
146 hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
147 hidden.defined('sex')
149 <div class="row-fluid">
150 [% IF ( display_patron_image ) %]
155 <fieldset class="rows" id="memberentry_identity">
156 <legend id="identity_legend">Identity</legend>
159 [% UNLESS hidden.defined('title') || !member_titles %]
161 [% IF mandatory.defined('title') %]
162 <label for="borrower_title" class="required">
164 <label for="borrower_title">
168 <select id="borrower_title" name="borrower_title">
169 [% FOREACH mt IN member_titles %]
170 [% IF mt == borrower.title %]
171 <option value="[% mt %]" selected="selected">[% mt %]</option>
173 <option value="[% mt %]">[% mt %]</option>
180 [% UNLESS hidden.defined('surname') %]
182 [% IF mandatory.defined('surname') %]
183 <label for="borrower_surname" class="required">
185 <label for="borrower_surname">
189 <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
190 [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
194 [% UNLESS hidden.defined('firstname') %]
196 [% IF mandatory.defined('firstname') %]
197 <label for="borrower_firstname" class="required">
199 <label for="borrower_firstname">
203 <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
204 [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
208 [% UNLESS hidden.defined('dateofbirth') %]
210 [% IF mandatory.defined('dateofbirth') %]
211 <label for="borrower_dateofbirth" class="required">
213 <label for="borrower_dateofbirth">
215 Date of birth:</label>
217 <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
219 [% UNLESS action == 'edit' && !OPACPatronDetails %]
220 [% UNLESS ( mandatory.defined('dateofbirth') ) %]
221 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a>
225 [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
229 [% UNLESS hidden.defined('initials') %]
231 [% IF mandatory.defined('initials') %]
232 <label for="borrower_initials" class="required">
234 <label for="borrower_initials">
238 <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
239 [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
243 [% UNLESS hidden.defined('othernames') %]
245 [% IF mandatory.defined('othernames') %]
246 <label for="borrower_othernames" class="required">
248 <label for="borrower_othernames">
252 <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
253 [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
257 [% UNLESS hidden.defined('sex') %]
259 <label for="sex-female" class="radio inline">Female:</label>
260 [% IF borrower.sex == 'F' %]
261 <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
263 <input type="radio" name="borrower_sex" id="sex-female" value="F" />
266 <label for="sex-male" class="radio inline">Male:</label>
267 [% IF borrower.sex == 'M' %]
268 <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
270 <input type="radio" name="borrower_sex" id="sex-male" value="M" />
273 <label for="sex-none" class="radio inline">None specified: </label>
274 [% IF borrower.sex == '' %]
275 <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
277 <input type="radio" name="borrower_sex" id="sex-none" value="" />
280 [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
286 [% IF ( display_patron_image ) %]
288 <p class="patronimage">
289 <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
294 [% END # /UNLESS fields hidden %]
297 hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
298 hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
299 hidden.defined('country')
301 <fieldset class="rows" id="memberentry_mainaddress">
302 <legend id="mainaddress_legend">Main address</legend>
305 [% UNLESS hidden.defined('streetnumber') %]
307 [% IF mandatory.defined('streetnumber') %]
308 <label for="borrower_streetnumber" class="required">
310 <label for="borrower_streetnumber">
312 Street number:</label>
314 <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
315 [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
319 [% UNLESS hidden.defined('address') %]
321 [% IF mandatory.defined('address') %]
322 <label for="borrower_address" class="required">
324 <label for="borrower_address">
328 <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
329 [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
333 [% UNLESS hidden.defined('address2') %]
335 [% IF mandatory.defined('address2') %]
336 <label for="borrower_address2" class="required">
338 <label for="borrower_address2">
342 <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
343 [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
347 [% UNLESS hidden.defined('city') %]
349 [% IF mandatory.defined('city') %]
350 <label for="borrower_city" class="required">
352 <label for="borrower_city">
356 <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
357 [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
361 [% UNLESS hidden.defined('state') %]
363 [% IF mandatory.defined('state') %]
364 <label for="borrower_state" class="required">
366 <label for="borrower_state">
370 <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
371 [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
375 [% UNLESS hidden.defined('zipcode') %]
377 [% IF mandatory.defined('zipcode') %]
378 <label for="borrower_zipcode" class="required">
380 <label for="borrower_zipcode">
382 ZIP/Postal code:</label>
384 <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
385 [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
389 [% UNLESS hidden.defined('country') %]
391 [% IF mandatory.defined('country') %]
392 <label for="borrower_country" class="required">
394 <label for="borrower_country">
398 <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
399 [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
408 hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
409 hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
411 <fieldset class="rows" id="memberentry_contact">
412 <legend id="contact_legend">Contact information</legend>
415 [% UNLESS hidden.defined('phone') %]
417 [% IF mandatory.defined('phone') %]
418 <label for="borrower_phone" class="required">
420 <label for="borrower_phone">
422 Primary phone:</label>
424 <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
425 [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
429 [% UNLESS hidden.defined('phonepro') %]
431 [% IF mandatory.defined('phonepro') %]
432 <label for="borrower_phonepro" class="required">
434 <label for="borrower_phonepro">
436 Secondary phone:</label>
438 <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
439 [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
443 [% UNLESS hidden.defined('mobile') %]
445 [% IF mandatory.defined('mobile') %]
446 <label for="borrower_mobile" class="required">
448 <label for="borrower_mobile">
452 <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
453 [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
457 [% UNLESS hidden.defined('email') %]
459 [% IF mandatory.defined('email') %]
460 <label for="borrower_email" class="required">
462 <label for="borrower_email">
464 Primary email:</label>
466 <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
467 [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
471 [% UNLESS hidden.defined('emailpro') %]
473 [% IF mandatory.defined('emailpro') %]
474 <label for="borrower_emailpro" class="required">
476 <label for="borrower_emailpro">
478 Secondary email:</label>
480 <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
481 [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
485 [% UNLESS hidden.defined('fax') %]
487 [% IF mandatory.defined('fax') %]
488 <label for="borrower_fax" class="required">
490 <label for="borrower_fax">
494 <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
495 [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
503 hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
504 hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') &&
505 hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
507 <fieldset class="rows" id="memberentry_alternateaddress">
508 <legend id="alternateaddress_legend">Alternate address</legend>
511 [% UNLESS hidden.defined('B_address') %]
513 [% IF mandatory.defined('B_address') %]
514 <label for="borrower_B_address" class="required">
516 <label for="borrower_B_address">
520 <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
521 [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
525 [% UNLESS hidden.defined('B_address2') %]
527 [% IF mandatory.defined('B_address2') %]
528 <label for="borrower_B_address2" class="required">
530 <label for="borrower_B_address2">
534 <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
535 [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
539 [% UNLESS hidden.defined('B_city') %]
541 [% IF mandatory.defined('B_city') %]
542 <label for="borrower_B_city" class="required">
544 <label for="borrower_B_city">
548 <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
549 [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
553 [% UNLESS hidden.defined('B_state') %]
555 [% IF mandatory.defined('B_state') %]
556 <label for="borrower_B_state" class="required">
558 <label for="borrower_B_state">
562 <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
563 [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
567 [% UNLESS hidden.defined('B_zipcode') %]
569 [% IF mandatory.defined('B_zipcode') %]
570 <label for="borrower_B_zipcode" class="required">
572 <label for="borrower_B_zipcode">
574 ZIP/Postal code:</label>
576 <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
577 [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
581 [% UNLESS hidden.defined('B_country') %]
583 [% IF mandatory.defined('B_country') %]
584 <label for="borrower_B_country" class="required">
586 <label for="borrower_B_country">
590 <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
591 [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
595 [% UNLESS hidden.defined('B_phone') %]
597 [% IF mandatory.defined('B_phone') %]
598 <label for="borrower_B_phone" class="required">
600 <label for="borrower_B_phone">
604 <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
605 [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
609 [% UNLESS hidden.defined('B_email') %]
611 [% IF mandatory.defined('B_email') %]
612 <label for="borrower_B_email" class="required">
614 <label for="borrower_B_email">
618 <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
619 [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
623 [% UNLESS hidden.defined('contactnote') %]
625 [% IF mandatory.defined('contactnote') %]
626 <label for="borrower_contactnote" class="required">
628 <label for="borrower_contactnote">
630 Contact note:</label>
632 <textarea id="borrower_contactnote" name="borrower_contactnote" cols="30" rows="2">[% borrower.contactnote %]</textarea>
633 [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
642 hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
643 hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
644 hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
646 <fieldset class="rows" id="memberentry_alternatecontact">
647 <legend id="alternatecontact_legend">Alternate contact</legend>
650 [% UNLESS hidden.defined('altcontactsurname') %]
652 [% IF mandatory.defined('altcontactsurname') %]
653 <label for="borrower_altcontactsurname" class="required">
655 <label for="borrower_altcontactsurname">
659 <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
660 [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
664 [% UNLESS hidden.defined('altcontactfirstname') %]
666 [% IF mandatory.defined('altcontactfirstname') %]
667 <label for="borrower_altcontactfirstname" class="required">
669 <label for="borrower_altcontactfirstname">
673 <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
674 [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
678 [% UNLESS hidden.defined('altcontactaddress1') %]
680 [% IF mandatory.defined('altcontactaddress1') %]
681 <label for="borrower_altcontactaddress1" class="required">
683 <label for="borrower_altcontactaddress1">
687 <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
688 [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
692 [% UNLESS hidden.defined('altcontactaddress2') %]
694 [% IF mandatory.defined('altcontactaddress2') %]
695 <label for="borrower_altcontactaddress2" class="required">
697 <label for="borrower_altcontactaddress2">
701 <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
702 [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
706 [% UNLESS hidden.defined('altcontactaddress3') %]
708 [% IF mandatory.defined('altcontactaddress3') %]
709 <label for="borrower_altcontactaddress3" class="required">
711 <label for="borrower_altcontactaddress3">
715 <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
716 [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
720 [% UNLESS hidden.defined('altcontactstate') %]
722 [% IF mandatory.defined('altcontactstate') %]
723 <label for="borrower_altcontactstate" class="required">
725 <label for="borrower_altcontactstate">
729 <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
730 [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
734 [% UNLESS hidden.defined('altcontactzipcode') %]
736 [% IF mandatory.defined('altcontactzipcode') %]
737 <label for="borrower_altcontactzipcode" class="required">
739 <label for="borrower_altcontactzipcode">
741 ZIP/Postal code:</label>
743 <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
744 [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
748 [% UNLESS hidden.defined('altcontactcountry') %]
750 [% IF mandatory.defined('altcontactcountry') %]
751 <label for="borrower_altcontactcountry" class="required">
753 <label for="borrower_altcontactcountry">
757 <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
758 [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
762 [% UNLESS hidden.defined('altcontactphone') %]
764 [% IF mandatory.defined('altcontactphone') %]
765 <label for="borrower_altcontactphone" class="required">
767 <label for="borrower_altcontactphone">
771 <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
772 [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
779 [% UNLESS action == 'edit' %]
780 <fieldset class="rows" id="memberentry_captcha">
783 <label for="captcha" class="required">Verification:</label>
785 <input type="text" name="captcha" id="captcha" />
786 <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
788 <span class="hint">Please type the following characters into the preceding box: <strong>[% captcha %]</strong></span>
789 <span class="hint">Note: The preceding box is case-sensitive. Ensure that the entered characters are in all-caps.</span>
795 [% IF ( borrower.ExtendedPatronAttributes ) %]
796 <fieldset class="rows">
797 <legend>Additional information</legend>
799 [% FOREACH patron_attribute IN borrower.patron_attributes %]
801 <label>[% patron_attribute.description %]:</label>
802 [% IF ( patron_attribute.value_description ) %]
803 [% patron_attribute.value_description %]
805 [% patron_attribute.value |html_line_break %]
813 [% IF action == 'edit' %]
814 [% IF OPACPatronDetails %]
815 <fieldset class="action">
816 <input type="hidden" name="action" value="update" />
817 <input type="submit" class="btn" value="Submit update request" />
821 <fieldset class="action">
822 <input type="hidden" name="action" value="create" />
823 <input type="submit" class="btn" value="Submit" />
829 </div><!--/div id="update-account" -->
835 [% INCLUDE 'opac-bottom.inc' %]
836 [% BLOCK jsinclude %]
837 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min.js"></script>
838 <script type="text/javascript">
840 $(document).ready(function() {
841 [% IF action == 'edit' && !OPACPatronDetails %]
842 $("#memberentry-form :input").attr('readonly', true);
843 $("#borrower_branchcode").attr('disabled',true);
844 $("#borrower_title").attr('disabled',true);
845 $('#memberentry-form :radio').attr('disabled',true);
846 $('span.required').remove();
847 $('label.required').removeClass('required');
849 $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
852 $("#memberentry-form").validate({
864 submitHandler: function(form) {
865 if (form.beenSubmitted) {
869 form.beenSubmitted = true;
873 errorPlacement: function(error, element) {
874 offset = element.offset();
875 error.insertAfter(element)
876 error.addClass('error'); // add a class to the wrapper
877 error.css('position', 'absolute');
878 error.css('left', offset.left + element.outerWidth() + 10);
879 error.css('top', offset.top);
880 error.css('width', 'auto');
884 [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
885 $('#update_privacy_guarantor_checkouts').click( function() {
886 $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json')
887 .done(function( data ) {
889 if ( data.success ) {
890 message = _("Your setting has been updated!");
892 message = _("Unable to update your setting!");
895 $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
902 [% INCLUDE 'calendar.inc' %]