3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <script type="text/javascript">
9 $(document).ready(function() {
10 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
11 $("#guarantordelete").click(function() {
12 $("#contact-details").hide().find('a').remove();
13 $("#guarantorid, #contactname, #contactfirstname").each(function () { this.value = "" });
14 $("#contactname, #contactfirstname")
15 .each(function () { this.type = 'text' })
16 .parent().find('span').remove();
17 $("#guarantorsearch").val(_("Set to patron"));
19 $("#select_city").change(function(){
20 var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
21 document.form.select_city.value.match(myRegEx);
22 document.form.zipcode.value=RegExp.$1;
23 document.form.city.value=RegExp.$2;
24 document.form.state.value=RegExp.$3;
25 document.form.country.value=RegExp.$4;
29 update_category_code( "[% categorycode %]" );
31 if ( $("#categorycode_entry").length > 0 ){
32 var category_code = $("#categorycode_entry").find("option:selected").val();
33 update_category_code( category_code );
36 $("#dateofbirth").datepicker({ maxDate: "-1D" });
37 $("#entryform").validate({
49 submitHandler: function(form) {
50 $("body, form input[type='submit'], form button[type='submit'], form a").addClass('waiting');
51 if (form.beenSubmitted)
54 form.beenSubmitted = true;
59 var mrform = $("#manual_restriction_form");
60 var mrlink = $("#add_manual_restriction");
62 mrlink.on("click",function(e){
67 $("#cancel_manual_restriction").on("click",function(e){
68 $('#debarred_expiration').val('');
69 $('#add_debarment').val(0);
70 $('#debarred_comment').val('');
77 function clear_entry(node) {
78 var original = $(node).parent();
79 $("textarea", original).attr('value', '');
80 $("select", original).attr('value', '');
83 function clone_entry(node) {
84 var original = $(node).parent();
85 var clone = original.clone();
87 var newId = 50 + parseInt(Math.random() * 100000);
88 $("input,select,textarea", clone).attr('id', function() {
89 return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
91 $("input,select,textarea", clone).attr('name', function() {
92 return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
94 $("label", clone).attr('for', function() {
95 return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId);
97 $("input#patron_attr_" + newId, clone).attr('value','');
98 $("select#patron_attr_" + newId, clone).attr('value','');
99 $(original).after(clone);
103 function update_category_code(category_code) {
104 if ( $(category_code).is("select") ) {
105 category_code = $("#categorycode_entry").find("option:selected").val();
107 var mytables = $(".attributes_table");
108 $(mytables).find("li").hide();
109 $(mytables).find(" li[data-category_code='"+category_code+"']").show();
110 $(mytables).find(" li[data-category_code='']").show();
113 function select_user(borrowernumber, borrower) {
114 var form = $('#entryform').get(0);
115 if (form.guarantorid.value) {
116 $("#contact-details").find('a').remove();
117 $("#contactname, #contactfirstname").parent().find('span').remove();
120 var id = borrower.borrowernumber;
121 form.guarantorid.value = id;
122 $('#contact-details')
125 .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
128 .val(borrower.surname)
129 .before('<span>' + borrower.surname + '</span>').get(0).type = 'hidden';
130 $(form.contactfirstname)
131 .val(borrower.firstname)
132 .before('<span>' + borrower.firstname + '</span>').get(0).type = 'hidden';
134 form.streetnumber.value = borrower.streetnumber;
135 form.address.value = borrower.address;
136 form.address2.value = borrower.address2;
137 form.city.value = borrower.city;
138 form.state.value = borrower.state;
139 form.zipcode.value = borrower.zipcode;
140 form.country.value = borrower.country;
141 form.branchcode.value = borrower.branchcode;
143 form.guarantorsearch.value = _("Change");
150 var MSG_SEPARATOR = _("Separator must be / in field %s");
151 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
152 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
153 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
154 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
155 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
156 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
157 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
158 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
159 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
162 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
164 <body id="pat_memberentrygen" class="pat">
165 [% INCLUDE 'header.inc' %]
166 [% INCLUDE 'patron-search.inc' %]
168 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
169 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
170 <strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong>
172 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
178 [% IF ( error_alert == "no_email" ) %]
179 <div class="error">This member has no email</div>
181 <div class="error">[% error_alert %]</div>
185 <div class="dialog message">Email has been sent.</div>
188 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
189 [% IF ( no_branches ) %]<p><strong>There are no libraries defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/branches.pl">Please add a library.</a>[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
190 [% IF ( no_categories ) %]<p><strong>There are no patron categories defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categorie.pl">Please add a patron category.</a>[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
192 [% UNLESS ( no_add ) %]
193 <h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1>
195 [% IF ( check_member ) %]
196 <div class="dialog alert">
197 <h3>Duplicate patron record?</h3>
198 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');" >View existing record</a></p>
199 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
200 <input type="hidden" name="op" value="modify" />
201 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
202 <input class="edit" type="submit" value="It is a duplicate. Edit existing record" />
205 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
206 <input type="hidden" name="nodouble" value="1" />
207 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
212 <div class="dialog alert">
213 <p>The following fields are wrong. Please fix them.</p>
215 [% IF ( ERROR_login_exist ) %]
216 <li id="ERROR_login_exist">Username/password already exists.</li>
218 [% IF ERROR_cardnumber_already_exists %]
219 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
221 [% IF ERROR_cardnumber_length %]
222 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
224 [% IF ( ERROR_age_limitations ) %]
225 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
226 Ages allowed are [% age_low %]-[% age_high %].</li>
228 [% IF ( ERROR_branch ) %]
229 <li id="ERROR_branch">Library is invalid.</li>
231 [% IF ( ERROR_dateofbirth ) %]
232 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
234 [% IF ( ERROR_dateenrolled ) %]
235 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
237 [% IF ( ERROR_dateexpiry ) %]
238 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
240 [% IF ( ERROR_short_password ) %]
241 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
243 [% IF ( ERROR_password_mismatch ) %]
244 <li id="ERROR_password_mismatch">Passwords do not match.</li>
246 [% IF ( ERROR_extended_unique_id_failed ) %]
247 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value %]" is already in use by another patron record.</li>
249 [% IF ERROR_bad_email %]
250 <li id="ERROR_bad_email">The primary email is invalid.</li>
252 [% IF ERROR_bad_email_secondary %]
253 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
255 [% IF ERROR_bad_email_alternative %]
256 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
263 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
264 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
265 <!-- field always hidden in different form (1,2,3) -->
266 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
267 <input type="hidden" name="category_type" value="[% category_type %]" />
268 <input type="hidden" name="updtype" value="[% updtype %]" />
269 <input type="hidden" name="destination" value="[% destination %]" />
270 <input type="hidden" name="check_member" value="[% check_member %]" />
271 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
272 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
273 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
274 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
275 [% ELSIF ( opduplicate ) %]
276 <input type="hidden" name="op" value="insert" />
278 <input type="hidden" name="op" value="save" />
279 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
280 [%# Only put the cardnumber if we arent showing it in the form later %]
282 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
288 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
289 <fieldset class="rows" id="memberentry_identity">
290 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
294 [% IF ( title_cgipopup ) %]
296 [% IF ( mandatorytitle ) %]
297 <label for="btitle" class="required">
302 [% borrotitlepopup %]
303 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
308 [% UNLESS nosurname %]
310 [% IF ( mandatorysurname ) %]
311 <label for="surname" class="required">
313 <label for="surname">
316 [% IF ( uppercasesurnames ) %]
317 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
319 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
321 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
325 [% UNLESS nofirstname %]
327 [% IF ( mandatoryfirstname ) %]
328 <label for="firstname" class="required">
330 <label for="firstname">
333 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
334 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
337 [% UNLESS nodateofbirth %]
339 [% IF ( mandatorydateofbirth ) %]
340 <label for="dateofbirth" class="required">
342 <label for="dateofbirth">
344 Date of birth: </label>
346 [% IF ( dateformat == "metric" ) %]
347 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
349 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
352 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
353 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
354 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
357 [% UNLESS noinitials %]
359 [% IF ( mandatoryinitials ) %]
360 <label for="initials" class="required">
362 <label for="initials">
365 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
366 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
370 [% UNLESS noothernames %]
372 [% IF ( mandatoryothernames ) %]
373 <label for="othernames" class="required">
375 <label for="othernames">
378 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
379 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
380 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
387 [% UNLESS ( opduplicate ) %]
389 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
391 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
394 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
396 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
399 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
401 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
404 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
405 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
406 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
414 [% END # hide fieldset %]
416 [% IF ( showguarantor ) %]
417 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
419 <input type="hidden" name="branchcode" value="[% branchcode %]" />
421 <fieldset id="memberentry_guarantor" class="rows">
422 <legend id="guarantor_lgd">Guarantor information</legend>
425 [% IF ( guarantorid ) %]
426 <li id="contact-details">
428 <li id="contact-details" style="display: none">
430 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
433 <label for="contactname">Organization name: </label>
434 [% IF ( guarantorid ) %]
435 <span>[% contactname %]</span>
436 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
438 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
443 [% IF ( guarantorid ) %]
444 <li id="contact-details">
446 <li id="contact-details" style="display: none">
448 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
450 [% UNLESS nocontactname %]
452 <label for="contactname">Surname: </label>
453 [% IF ( guarantorid ) %]
454 <span>[% contactname %]</span>
455 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
457 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
461 [% UNLESS nocontactfirstname %]
463 <label for="contactfirstname">First name: </label>
464 [% IF ( guarantorid ) %]
465 <span>[% contactfirstname %]</span>
466 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
468 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
472 [% IF ( relshiploop ) %]
474 <label for="relationship">Relationship: </label>
475 <select name="relationship" id="relationship" >
476 [% FOREACH relshiploo IN relshiploop %]
477 [% IF ( relshiploo.selected ) %]
478 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
480 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
489 <span class="label"> </span>
490 [% IF ( guarantorid ) %]
491 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
493 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
495 <input id="guarantordelete" type="button" value="Delete" />
501 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
502 [% IF Koha.Preference( 'AddressFormat' ) %]
503 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
505 [% INCLUDE 'member-main-address-style-us.inc' %]
507 [% END # nostreet && nocity etc group%]
509 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
510 <fieldset class="rows" id="memberentry_contact">
511 <legend id="contact_lgd">Contact</legend><ol>
514 [% IF ( mandatoryphone ) %]
515 <label for="phone" class="required">
519 Primary phone: </label>
520 <input type="text" id="phone" name="phone" value="[% phone %]" />
521 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
525 [% UNLESS nophonepro %]
527 [% IF ( mandatoryphonepro ) %]
528 <label for="phonepro" class="required">
530 <label for="phonepro">
532 Secondary phone: </label>
533 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
534 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
537 [% UNLESS nomobile %]
539 [% IF ( mandatorymobile ) %]
540 <label for="mobile" class="required">
544 Other phone: </label>
545 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
546 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
551 [% IF ( mandatoryemail ) %]
552 <label for="email" class="required">
556 Primary email: </label>
557 <input type="text" id="email" name="email" size="45" value="[% email %]" />
558 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
562 [% UNLESS noemailpro %]
564 [% IF ( mandatoryemailpro ) %]
565 <label for="emailpro" class="required">
567 <label for="emailpro">
569 Secondary email: </label>
570 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
571 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
576 [% IF ( mandatoryfax ) %]
577 <label for="fax" class="required">
582 <input type="text" id="fax" name="fax" value="[% fax %]" />
583 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
588 [%END # hide fieldset %]
590 <!-- ************************ STEP_1 *********************** -->
594 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
595 [% IF Koha.Preference( 'AddressFormat' ) %]
596 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
598 [% INCLUDE 'member-alt-address-style-us.inc' %]
600 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
603 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
604 [% IF Koha.Preference( 'AddressFormat' ) %]
605 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
607 [% INCLUDE 'member-alt-contact-style-us.inc' %]
609 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
614 <fieldset class="rows" id="memberentry_library_management">
615 <legend id="library_management_lgd">Library management</legend><ol>
616 [% UNLESS nocardnumber %]
618 [% IF ( mandatorycardnumber ) %]
619 <label for="cardnumber" class="required">
621 <label for="cardnumber" class="validated">
623 Card number: </label>
624 [% IF minlength_cardnumber == maxlength_cardnumber %]
625 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
626 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
627 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
628 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
629 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
630 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
631 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
632 [% ELSIF maxlength_cardnumber %]
633 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
634 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
635 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
637 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
638 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
639 <div class="hint">There is no minimum or maximum character length.</div>
643 [% UNLESS nobranchcode %]
645 <label for="libraries" class="required">Library:</label>
646 <select name="branchcode" size="1" id="libraries">
647 [%- FOREACH branchloo IN branchloop %]
648 [% IF ( branchloo.selected ) -%]
649 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
651 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
655 <span class="required">Required</span>
659 <label for="categorycode_entry" class="required">Category: </label>
660 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
661 [% FOREACH typeloo IN typeloop %]
662 [% FOREACH categoryloo IN typeloo.categoryloop %]
663 [% IF ( loop.first ) %]
664 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
665 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
666 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
667 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
668 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
669 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
671 [% IF ( categoryloo.categorycodeselected ) %]
672 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
674 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
676 [% IF ( loop.last ) %]
682 <span class="required">Required</span>
686 [% IF ( mandatorysort1 ) %]
687 <label for="sort1" class="required">
692 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
693 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
698 [% IF ( mandatorysort2 ) %]
699 <label for="sort2" class="required">
704 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
705 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
708 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
710 <label for="sort2">Sync with the Norwegian national patron database:</label>
711 [% IF ( sync == 0 ) %]
712 <input type="radio" id="sync" name="sync" value="1"> Yes
713 <input type="radio" id="sync" name="sync" value="0" checked> No
715 <input type="radio" id="sync" name="sync" value="1" checked> Yes
716 <input type="radio" id="sync" name="sync" value="0"> No
722 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
723 <fieldset class="rows" id="memberentry_subscription">
724 <legend id="library_setup_lgd">Library set-up</legend><ol>
725 [% UNLESS nodateenrolled %]
727 [% IF ( mandatorydateenrolled ) %]
728 <label for="from" class="required">
732 Registration date: </label>
733 [% IF ( dateformat == "metric" ) %]
734 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
736 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
738 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
739 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
740 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
743 [% UNLESS nodateexpiry %]
746 <li style="display:none">
748 [% IF ( mandatorydateexpiry ) %]
749 <label for="to" class="required">
753 Expiry date (leave blank for auto calc) </label>
754 [% IF ( dateformat == "metric" ) %]
755 [% UNLESS ( opadd ) %]
756 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
758 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
761 [% UNLESS ( opadd ) %]
762 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
764 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
767 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
768 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
769 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
771 [% UNLESS noopacnote %]
773 [% IF ( mandatoryopacnote ) %]
774 <label for="opacnote" class="required">
776 <label for="opacnote">
779 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
780 <div class="hint">This message appears on this patron's user page in the OPAC</div>
781 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
784 [% UNLESS noborrowernotes %]
786 [% IF ( mandatoryborrowernotes ) %]
787 <label for="borrowernotes" class="required">
789 <label for="borrowernotes">
791 Circulation note: </label>
792 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
793 <div class="hint">This message displays when checking out to this patron</div>
794 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
799 [% END # hide fieldset %]
801 [% UNLESS nouserid && nopassword %]
802 <fieldset class="rows" id="memberentry_userid">
803 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
804 [% UNLESS nouserid %]
806 [% IF ( mandatoryuserid ) %]
807 <label for="userid" class="required">
813 [% IF ( NoUpdateLogin ) %]
814 [% IF ( opduplicate ) %]
815 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
817 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
820 [% IF ( opduplicate ) %]
821 <input type="text" id="userid" name="userid" size="20" value="" />
823 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
827 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
828 <input type="text" disabled="disabled" style="display:none" />
830 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
833 [% UNLESS nopassword %]
835 [% IF ( mandatorypassword ) %]
836 <label for="password" class="required">
838 <label for="password">
842 [% IF ( NoUpdateLogin ) %]
843 [% IF ( opduplicate ) %]
844 <input type="password" id="password" name="password" size="20" disabled="disabled" />
846 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
849 [% IF ( opduplicate ) %]
850 <input type="password" id="password" name="password" size="20" />
852 <input type="password" id="password" name="password" size="20" value="[% password %]" />
856 [% IF ( password ) %]
857 [% IF ( NoUpdateLogin ) %]
858 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
860 [% IF ( opduplicate ) %]
861 <input type="password" id="password" name="password" size="20" />
863 <input type="password" id="password" name="password" size="20" value="****" />
867 [% IF ( NoUpdateLogin ) %]
868 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
870 <input type="password" id="password" name="password" size="20" value="" />
874 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
875 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
878 [% IF ( mandatorypassword ) %]
879 <label for="password2" class="required">
881 <label for="password2">
883 Confirm password: </label>
885 [% IF ( NoUpdateLogin ) %]
886 [% IF ( opduplicate ) %]
887 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
889 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
892 [% IF ( opduplicate ) %]
893 <input type="password" id="password2" name="password2" size="20" />
895 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
899 [% IF ( password ) %]
900 [% IF ( NoUpdateLogin ) %]
901 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
903 [% IF ( opduplicate ) %]
904 <input type="password" id="password2" name="password2" size="20" />
906 <input type="password" id="password2" name="password2" size="20" value="****" />
910 [% IF ( NoUpdateLogin ) %]
911 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
913 <input type="password" id="password2" name="password2" size="20" value="" />
917 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
921 [% END # hide fieldset %][% END %]
922 <!--this zones are not necessary in modif mode -->
923 [% UNLESS ( opadd || opduplicate ) %]
924 <fieldset class="rows" id="memberentry_account_flags">
925 <legend id="account_flags_lgd">Patron account flags</legend>
927 [% FOREACH flagloo IN flagloop %]
928 <li><label class="radio" for="yes[% flagloo.name %]">
929 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
930 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
932 [% IF CAN_user_circulate_manage_restrictions %]
933 <label for="yes[% flagloo.name %]">Yes </label>
934 [% IF ( flagloo.yes ) %]
935 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
937 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
939 <label for="no[% flagloo.name %]">No </label>
940 [% IF ( flagloo.no ) %]
941 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
943 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
946 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
955 <fieldset class="rows" id="memberentry_restrictions">
956 <legend id="restrictions_lgd">Patron restrictions</legend>
958 [% IF ( debarments ) %]
965 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
972 [% FOREACH d IN debarments %]
974 <td>[% d.type %]</td>
975 <td>[% d.comment %]</td>
976 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
977 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
979 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
987 <p>Patron is currently unrestricted.</p>
990 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
991 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
992 <fieldset id="manual_restriction_form">
993 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
994 <legend id="manual_restriction_lgd">Add manual restriction</legend>
996 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
997 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" readonly="readonly" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
998 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1002 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1011 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1012 <fieldset class="rows" id="memberentry_patron_attributes">
1013 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1014 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1015 [% FOREACH pa_loo IN patron_attributes %]
1016 [% IF pa_loo.class %]
1017 <fieldset id="aai_[% pa_loo.class %]">
1018 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1020 <ol class="attributes_table">
1021 [% FOREACH patron_attribute IN pa_loo.items %]
1022 <li data-category_code="[% patron_attribute.category_code %]">
1023 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1024 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1025 [% IF ( patron_attribute.use_dropdown ) %]
1026 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1027 <option value=""></option>
1028 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1029 [% IF ( auth_val_loo.selected ) %]
1030 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1031 [% auth_val_loo.lib %]
1034 <option value="[% auth_val_loo.authorised_value %]" >
1035 [% auth_val_loo.lib %]
1041 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1043 [% IF ( patron_attribute.password_allowed ) %]
1044 (<label class="yesno" for="[% patron_attribute.form_id %]_password">Password:</label> <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1045 id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1047 <a href="#" class="clear-field" onclick="clear_entry(this); return false;">Clear</a>
1048 [% IF ( patron_attribute.repeatable ) %]
1049 <a href="#" class="clone-field" onclick="clone_entry(this); return false;">New</a>
1054 [% IF pa_loo.class %]</fieldset>[% END %]
1057 [% END %][% END %][% END %]
1059 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1060 <fieldset class="rows" id="memberentry_messaging_prefs">
1061 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1063 <!-- handle changing prefs if creating new patron and changing
1066 <script type="text/javascript">//<![CDATA[
1067 $(document).ready(function(){
1068 var message_prefs_dirty = false;
1069 $('#memberentry_messaging_prefs > *').change(function() {
1070 message_prefs_dirty = true;
1072 $('#categorycode_entry').change(function() {
1073 var categorycode = $(this).val();
1074 if (message_prefs_dirty) {
1075 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1079 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1081 $.each(data.messaging_preferences, function(i, item) {
1082 var attrid = item.message_attribute_id;
1083 var transports = ['email', 'rss', 'sms'];
1084 $.each(transports, function(j, transport) {
1085 if (item['transports_' + transport] == 1) {
1086 $('#' + transport + attrid).attr('checked', 'checked');
1088 $('#' + transport + attrid).removeAttr('checked');
1091 if (item.digest && item.digest != ' ') {
1092 $('#digest' + attrid).attr('checked', item.digest);
1094 $('#digest' + attrid).removeAttr('checked');
1096 if (item.takes_days == '1') {
1097 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1100 message_prefs_dirty = false;
1108 <input type="hidden" name="setting_messaging_prefs" value="1" />
1109 [% INCLUDE 'messaging-preference-form.inc' %]
1110 [% IF ( SMSSendDriver ) %]
1111 <p><label for="SMSnumber">SMS number:</label>
1112 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1118 [% UNLESS ( check_member ) %]
1119 <fieldset class="action">
1120 <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1122 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1124 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1133 [% UNLESS ( opadd ) %]<div class="yui-b">
1134 [% INCLUDE 'members-menu.inc' %]
1138 [% INCLUDE 'intranet-bottom.inc' %]