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() {
12 update_category_code( "[% categorycode %]" );
14 if ( $("#categorycode_entry").length > 0 ){
15 var category_code = $("#categorycode_entry").find("option:selected").val();
16 update_category_code( category_code );
19 $("#dateofbirth").datepicker({ maxDate: "-1D", yearRange: "c-120:" });
20 dateformat = $("#dateofbirth").siblings(".hint").first().html();
22 $("#entryform").validate({
34 submitHandler: function(form) {
35 $("body, form input[type='submit'], form button[type='submit'], form a").addClass('waiting');
36 if (form.beenSubmitted)
39 form.beenSubmitted = true;
44 var mrform = $("#manual_restriction_form");
45 var mrlink = $("#add_manual_restriction");
47 mrlink.on("click",function(e){
52 $("#cancel_manual_restriction").on("click",function(e){
53 $('#debarred_expiration').val('');
54 $('#add_debarment').val(0);
55 $('#debarred_comment').val('');
62 function clear_entry(node) {
63 var original = $(node).parent();
64 $("textarea", original).attr('value', '');
65 $("select", original).attr('value', '');
68 function clone_entry(node) {
69 var original = $(node).parent();
70 var clone = original.clone();
72 var newId = 50 + parseInt(Math.random() * 100000);
73 $("input,select,textarea", clone).attr('id', function() {
74 return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
76 $("input,select,textarea", clone).attr('name', function() {
77 return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
79 $("label", clone).attr('for', function() {
80 return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId);
82 $("input#patron_attr_" + newId, clone).attr('value','');
83 $("select#patron_attr_" + newId, clone).attr('value','');
84 $(original).after(clone);
88 function update_category_code(category_code) {
89 if ( $(category_code).is("select") ) {
90 category_code = $("#categorycode_entry").find("option:selected").val();
92 var mytables = $(".attributes_table");
93 $(mytables).find("li").hide();
94 $(mytables).find(" li[data-category_code='"+category_code+"']").show();
95 $(mytables).find(" li[data-category_code='']").show();
98 function select_user(borrowernumber, borrower) {
99 var form = $('#entryform').get(0);
100 if (form.guarantorid.value) {
101 $("#contact-details").find('a').remove();
102 $("#contactname, #contactfirstname").parent().find('span').remove();
105 var id = borrower.borrowernumber;
106 form.guarantorid.value = id;
107 $('#contact-details')
110 .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
113 .val(borrower.surname)
114 .before('<span>' + borrower.surname + '</span>').get(0).type = 'hidden';
115 $(form.contactfirstname)
116 .val(borrower.firstname)
117 .before('<span>' + borrower.firstname + '</span>').get(0).type = 'hidden';
119 form.streetnumber.value = borrower.streetnumber;
120 form.address.value = borrower.address;
121 form.address2.value = borrower.address2;
122 form.city.value = borrower.city;
123 form.state.value = borrower.state;
124 form.zipcode.value = borrower.zipcode;
125 form.country.value = borrower.country;
126 form.branchcode.value = borrower.branchcode;
128 form.guarantorsearch.value = _("Change");
133 >>>>>>> Bug 15206 - Show patron's age under date of birth in memberentry.pl
134 var MSG_SEPARATOR = _("Separator must be / in field %s");
135 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
136 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
137 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
138 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
139 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
140 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
141 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
142 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
143 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
144 var LABEL_CHANGE = _("Change");
145 var LABEL_SET_TO_PATRON = _("Set to patron");
148 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
150 <body id="pat_memberentrygen" class="pat">
151 [% INCLUDE 'header.inc' %]
152 [% INCLUDE 'patron-search.inc' %]
154 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
155 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
156 <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>
158 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
164 [% IF ( error_alert == "no_email" ) %]
165 <div class="error">This member has no email</div>
167 <div class="error">[% error_alert %]</div>
171 <div class="dialog message">Email has been sent.</div>
174 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
175 [% 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 %]
176 [% IF ( no_categories ) %]<p><strong>There are no patron categories defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categories.pl">Please add a patron category.</a>[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
178 [% UNLESS ( no_add ) %]
179 <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>
181 [% IF ( check_member ) %]
182 <div class="dialog alert">
183 <h3>Duplicate patron record?</h3>
184 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');" >View existing record</a></p>
185 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
186 <input type="hidden" name="op" value="modify" />
187 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
188 <input class="edit" type="submit" value="It is a duplicate. Edit existing record" />
191 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
192 <input type="hidden" name="nodouble" value="1" />
193 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
198 <div class="dialog alert">
199 <p>The following fields are wrong. Please fix them.</p>
201 [% IF ( ERROR_login_exist ) %]
202 <li id="ERROR_login_exist">Username/password already exists.</li>
204 [% IF ERROR_cardnumber_already_exists %]
205 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
207 [% IF ERROR_cardnumber_length %]
208 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
210 [% IF ( ERROR_age_limitations ) %]
211 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
212 Ages allowed are [% age_low %]-[% age_high %].</li>
214 [% IF ( ERROR_branch ) %]
215 <li id="ERROR_branch">Library is invalid.</li>
217 [% IF ( ERROR_dateofbirth ) %]
218 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
220 [% IF ( ERROR_dateenrolled ) %]
221 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
223 [% IF ( ERROR_dateexpiry ) %]
224 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
226 [% IF ( ERROR_short_password ) %]
227 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
229 [% IF ( ERROR_password_mismatch ) %]
230 <li id="ERROR_password_mismatch">Passwords do not match.</li>
232 [% IF ( ERROR_extended_unique_id_failed ) %]
233 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]</strong> attribute value <i>[% ERROR_extended_unique_id_failed_value %]</i> is already in use by another patron record.</li>
235 [% IF ERROR_bad_email %]
236 <li id="ERROR_bad_email">The primary email is invalid.</li>
238 [% IF ERROR_bad_email_secondary %]
239 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
241 [% IF ERROR_bad_email_alternative %]
242 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
249 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
250 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
251 <!-- field always hidden in different form (1,2,3) -->
252 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
253 <input type="hidden" name="category_type" value="[% category_type %]" />
254 <input type="hidden" name="updtype" value="[% updtype %]" />
255 <input type="hidden" name="destination" value="[% destination %]" />
256 <input type="hidden" name="check_member" value="[% check_member %]" />
257 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
258 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
259 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
260 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
261 [% ELSIF ( opduplicate ) %]
262 <input type="hidden" name="op" value="insert" />
264 <input type="hidden" name="op" value="save" />
265 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
266 [%# Only put the cardnumber if we arent showing it in the form later %]
268 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
274 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
275 <fieldset class="rows" id="memberentry_identity">
276 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
280 [% IF ( title_cgipopup ) %]
282 [% IF ( mandatorytitle ) %]
283 <label for="btitle" class="required">
288 [% borrotitlepopup %]
289 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
294 [% UNLESS nosurname %]
296 [% IF ( mandatorysurname ) %]
297 <label for="surname" class="required">
299 <label for="surname">
302 [% IF ( uppercasesurnames ) %]
303 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
305 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
307 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
311 [% UNLESS nofirstname %]
313 [% IF ( mandatoryfirstname ) %]
314 <label for="firstname" class="required">
316 <label for="firstname">
319 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
320 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
323 [% UNLESS nodateofbirth %]
325 [% IF ( mandatorydateofbirth ) %]
326 <label for="dateofbirth" class="required">
328 <label for="dateofbirth">
330 Date of birth: </label>
332 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CalculateAge();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
334 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
335 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
336 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
339 [% UNLESS noinitials %]
341 [% IF ( mandatoryinitials ) %]
342 <label for="initials" class="required">
344 <label for="initials">
347 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
348 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
352 [% UNLESS noothernames %]
354 [% IF ( mandatoryothernames ) %]
355 <label for="othernames" class="required">
357 <label for="othernames">
360 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
361 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
362 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
369 [% UNLESS ( opduplicate ) %]
371 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
373 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
376 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
378 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
381 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
383 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
386 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
387 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
388 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
396 [% END # hide fieldset %]
398 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
399 <fieldset class="rows">
400 <legend>Guarantor information</legend>
403 [% IF ( guarantorid ) %]
404 <li id="contact-details">
406 <li id="contact-details" style="display: none">
408 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
411 <label for="contactname">Organization name: </label>
412 [% IF ( guarantorid ) %]
413 <span>[% contactname %]</span>
414 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
416 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
421 [% IF ( guarantorid ) %]
422 <li id="contact-details">
424 <li id="contact-details" style="display: none">
426 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
428 [% UNLESS nocontactname %]
430 <label for="contactname">Surname: </label>
431 [% IF ( guarantorid ) %]
432 <span>[% contactname %]</span>
433 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
435 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
439 [% UNLESS nocontactfirstname %]
441 <label for="contactfirstname">First name: </label>
442 [% IF ( guarantorid ) %]
443 <span>[% contactfirstname %]</span>
444 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
446 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
450 [% IF ( relshiploop ) %]
452 <label for="relationship">Relationship: </label>
453 <select name="relationship" id="relationship" >
454 [% FOREACH relshiploo IN relshiploop %]
455 [% IF ( relshiploo.selected ) %]
456 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
458 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
467 <span class="label"> </span>
468 [% IF ( guarantorid ) %]
469 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
471 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
473 <input id="guarantordelete" type="button" value="Delete" />
475 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
477 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
478 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
479 [% IF privacy_guarantor_checkouts %]
480 <option value="0">No</option>
481 <option value="1" selected>Yes</option>
483 <option value="0" selected>No</option>
484 <option value="1">Yes</option>
487 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
494 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
495 [% IF Koha.Preference( 'AddressFormat' ) %]
496 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
498 [% INCLUDE 'member-main-address-style-us.inc' %]
500 [% END # nostreet && nocity etc group%]
502 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
503 <fieldset class="rows" id="memberentry_contact">
504 <legend id="contact_lgd">Contact</legend><ol>
507 [% IF ( mandatoryphone ) %]
508 <label for="phone" class="required">
512 Primary phone: </label>
513 <input type="text" id="phone" name="phone" value="[% phone %]" />
514 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
518 [% UNLESS nophonepro %]
520 [% IF ( mandatoryphonepro ) %]
521 <label for="phonepro" class="required">
523 <label for="phonepro">
525 Secondary phone: </label>
526 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
527 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
530 [% UNLESS nomobile %]
532 [% IF ( mandatorymobile ) %]
533 <label for="mobile" class="required">
537 Other phone: </label>
538 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
539 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
544 [% IF ( mandatoryemail ) %]
545 <label for="email" class="required">
549 Primary email: </label>
550 <input type="text" id="email" name="email" size="45" value="[% email %]" />
551 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
555 [% UNLESS noemailpro %]
557 [% IF ( mandatoryemailpro ) %]
558 <label for="emailpro" class="required">
560 <label for="emailpro">
562 Secondary email: </label>
563 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
564 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
569 [% IF ( mandatoryfax ) %]
570 <label for="fax" class="required">
575 <input type="text" id="fax" name="fax" value="[% fax %]" />
576 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
581 [%END # hide fieldset %]
583 <!-- ************************ STEP_1 *********************** -->
587 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
588 [% IF Koha.Preference( 'AddressFormat' ) %]
589 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
591 [% INCLUDE 'member-alt-address-style-us.inc' %]
593 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
596 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
597 [% IF Koha.Preference( 'AddressFormat' ) %]
598 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
600 [% INCLUDE 'member-alt-contact-style-us.inc' %]
602 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
607 <fieldset class="rows" id="memberentry_library_management">
608 <legend id="library_management_lgd">Library management</legend><ol>
609 [% UNLESS nocardnumber %]
611 [% IF ( mandatorycardnumber ) %]
612 <label for="cardnumber" class="required">
614 <label for="cardnumber" class="validated">
616 Card number: </label>
617 [% IF minlength_cardnumber == maxlength_cardnumber %]
618 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
619 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
620 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
621 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
622 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
623 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
624 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
625 [% ELSIF maxlength_cardnumber %]
626 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
627 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
628 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
630 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
631 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
632 <div class="hint">There is no minimum or maximum character length.</div>
636 [% UNLESS nobranchcode %]
638 <label for="libraries" class="required">Library:</label>
639 <select name="branchcode" size="1" id="libraries">
640 [%- FOREACH branchloo IN branchloop %]
641 [% IF ( branchloo.selected ) -%]
642 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
644 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
648 <span class="required">Required</span>
652 <label for="categorycode_entry" class="required">Category: </label>
653 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
654 [% FOREACH typeloo IN typeloop %]
655 [% FOREACH categoryloo IN typeloo.categoryloop %]
656 [% IF ( loop.first ) %]
657 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
658 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
659 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
660 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
661 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
662 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
664 [% IF ( categoryloo.categorycodeselected ) %]
665 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
667 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
669 [% IF ( loop.last ) %]
675 <span class="required">Required</span>
679 [% IF ( mandatorysort1 ) %]
680 <label for="sort1" class="required">
685 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
686 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
691 [% IF ( mandatorysort2 ) %]
692 <label for="sort2" class="required">
697 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
698 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
701 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
703 <label for="sort2">Sync with the Norwegian national patron database:</label>
704 [% IF ( sync == 0 ) %]
705 <input type="radio" id="sync" name="sync" value="1"> Yes
706 <input type="radio" id="sync" name="sync" value="0" checked> No
708 <input type="radio" id="sync" name="sync" value="1" checked> Yes
709 <input type="radio" id="sync" name="sync" value="0"> No
715 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
716 <fieldset class="rows" id="memberentry_subscription">
717 <legend id="library_setup_lgd">Library set-up</legend><ol>
718 [% UNLESS nodateenrolled %]
720 [% IF ( mandatorydateenrolled ) %]
721 <label for="from" class="required">
725 Registration date: </label>
726 [% IF ( dateformat == "metric" ) %]
727 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
729 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
731 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
732 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
733 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
736 [% UNLESS nodateexpiry %]
739 <li style="display:none">
741 [% IF ( mandatorydateexpiry ) %]
742 <label for="to" class="required">
746 Expiry date (leave blank for auto calc) </label>
747 [% IF ( dateformat == "metric" ) %]
748 [% UNLESS ( opadd ) %]
749 <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" />
751 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
754 [% UNLESS ( opadd ) %]
755 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
757 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
760 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
761 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
762 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
764 [% UNLESS noopacnote %]
766 [% IF ( mandatoryopacnote ) %]
767 <label for="opacnote" class="required">
769 <label for="opacnote">
772 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
773 <div class="hint">This message appears on this patron's user page in the OPAC</div>
774 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
777 [% UNLESS noborrowernotes %]
779 [% IF ( mandatoryborrowernotes ) %]
780 <label for="borrowernotes" class="required">
782 <label for="borrowernotes">
784 Circulation note: </label>
785 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
786 <div class="hint">This message displays when checking out to this patron</div>
787 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
792 [% END # hide fieldset %]
794 [% UNLESS nouserid && nopassword %]
795 <fieldset class="rows" id="memberentry_userid">
796 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
797 [% UNLESS nouserid %]
799 [% IF ( mandatoryuserid ) %]
800 <label for="userid" class="required">
806 [% IF ( NoUpdateLogin ) %]
807 [% IF ( opduplicate ) %]
808 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
810 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
813 [% IF ( opduplicate ) %]
814 <input type="text" id="userid" name="userid" size="20" value="" />
816 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
820 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
821 <input type="text" disabled="disabled" style="display:none" />
823 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
826 [% UNLESS nopassword %]
828 [% IF ( mandatorypassword ) %]
829 <label for="password" class="required">
831 <label for="password">
835 [% IF ( NoUpdateLogin ) %]
836 [% IF ( opduplicate ) %]
837 <input type="password" id="password" name="password" size="20" disabled="disabled" />
839 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
842 [% IF ( opduplicate ) %]
843 <input type="password" id="password" name="password" size="20" />
845 <input type="password" id="password" name="password" size="20" value="[% password %]" />
849 [% IF ( password ) %]
850 [% IF ( NoUpdateLogin ) %]
851 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
853 [% IF ( opduplicate ) %]
854 <input type="password" id="password" name="password" size="20" />
856 <input type="password" id="password" name="password" size="20" value="****" />
860 [% IF ( NoUpdateLogin ) %]
861 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
863 <input type="password" id="password" name="password" size="20" value="" />
867 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
868 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
871 [% IF ( mandatorypassword ) %]
872 <label for="password2" class="required">
874 <label for="password2">
876 Confirm password: </label>
878 [% IF ( NoUpdateLogin ) %]
879 [% IF ( opduplicate ) %]
880 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
882 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
885 [% IF ( opduplicate ) %]
886 <input type="password" id="password2" name="password2" size="20" />
888 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
892 [% IF ( password ) %]
893 [% IF ( NoUpdateLogin ) %]
894 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
896 [% IF ( opduplicate ) %]
897 <input type="password" id="password2" name="password2" size="20" />
899 <input type="password" id="password2" name="password2" size="20" value="****" />
903 [% IF ( NoUpdateLogin ) %]
904 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
906 <input type="password" id="password2" name="password2" size="20" value="" />
910 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
914 [% END # hide fieldset %][% END %]
915 <!--this zones are not necessary in modif mode -->
916 [% UNLESS ( opadd || opduplicate ) %]
917 <fieldset class="rows">
918 <legend>Patron account flags</legend>
920 [% FOREACH flagloo IN flagloop %]
921 <li><label class="radio" for="yes[% flagloo.name %]">
922 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
923 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
925 [% IF CAN_user_circulate_manage_restrictions %]
926 <label for="yes[% flagloo.name %]">Yes </label>
927 [% IF ( flagloo.yes ) %]
928 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
930 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
932 <label for="no[% flagloo.name %]">No </label>
933 [% IF ( flagloo.no ) %]
934 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
936 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
939 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
948 <fieldset class="rows">
949 <legend>Patron restrictions</legend>
951 [% IF ( debarments ) %]
958 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
965 [% FOREACH d IN debarments %]
967 <td>[% d.type %]</td>
968 <td>[% d.comment %]</td>
969 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
970 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
972 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
980 <p>Patron is currently unrestricted.</p>
983 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
984 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
985 <fieldset id="manual_restriction_form">
986 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
987 <legend>Add manual restriction</legend>
989 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
990 <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);" />
991 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
995 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1004 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1005 <fieldset class="rows" id="memberentry_patron_attributes">
1006 <legend>Additional attributes and identifiers</legend>
1007 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1008 [% FOREACH pa_loo IN patron_attributes %]
1009 [% IF pa_loo.class %]
1010 <fieldset id="aai_[% pa_loo.class %]">
1011 <legend>[% pa_loo.lib %]</legend>
1013 <ol class="attributes_table">
1014 [% FOREACH patron_attribute IN pa_loo.items %]
1015 <li data-category_code="[% patron_attribute.category_code %]">
1016 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1017 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1018 [% IF ( patron_attribute.use_dropdown ) %]
1019 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1020 <option value=""></option>
1021 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1022 [% IF ( auth_val_loo.selected ) %]
1023 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1024 [% auth_val_loo.lib %]
1027 <option value="[% auth_val_loo.authorised_value %]" >
1028 [% auth_val_loo.lib %]
1034 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1036 [% IF ( patron_attribute.password_allowed ) %]
1037 (<label class="yesno" for="[% patron_attribute.form_id %]_password">Password:</label> <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1038 id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1040 <a href="#" class="clear-field" onclick="clear_entry(this); return false;">Clear</a>
1041 [% IF ( patron_attribute.repeatable ) %]
1042 <a href="#" class="clone-field" onclick="clone_entry(this); return false;">New</a>
1047 [% IF pa_loo.class %]</fieldset>[% END %]
1050 [% END %][% END %][% END %]
1052 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1053 <fieldset class="rows" id="memberentry_messaging_prefs">
1054 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1056 <!-- handle changing prefs if creating new patron and changing
1059 <script type="text/javascript">//<![CDATA[
1060 $(document).ready(function(){
1061 var message_prefs_dirty = false;
1062 $('#memberentry_messaging_prefs > *').change(function() {
1063 message_prefs_dirty = true;
1065 $('#categorycode_entry').change(function() {
1066 var categorycode = $(this).val();
1067 if (message_prefs_dirty) {
1068 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1072 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1074 $.each(data.messaging_preferences, function(i, item) {
1075 var attrid = item.message_attribute_id;
1076 var transports = ['email', 'rss', 'sms'];
1077 $.each(transports, function(j, transport) {
1078 if (item['transports_' + transport] == 1) {
1079 $('#' + transport + attrid).attr('checked', 'checked');
1081 $('#' + transport + attrid).removeAttr('checked');
1084 if (item.digest && item.digest != ' ') {
1085 $('#digest' + attrid).attr('checked', item.digest);
1087 $('#digest' + attrid).removeAttr('checked');
1089 if (item.takes_days == '1') {
1090 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1093 message_prefs_dirty = false;
1101 <input type="hidden" name="setting_messaging_prefs" value="1" />
1102 [% INCLUDE 'messaging-preference-form.inc' %]
1103 [% IF ( SMSSendDriver ) %]
1104 <p><label for="SMSnumber">SMS number:</label>
1105 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1108 <label for="sms_provider_id">SMS provider:</label>
1109 <select id="sms_provider_id" name="sms_provider_id"/>
1110 <option value="">Unknown</option>
1111 [% FOREACH s IN sms_providers %]
1112 [% IF s.id == sms_provider_id %]
1113 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1115 <option value="[% s.id %]">[% s.name %]</option>
1124 [% UNLESS ( check_member ) %]
1125 <fieldset class="action">
1126 <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1128 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1130 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1139 [% UNLESS ( opadd ) %]<div class="yui-b">
1140 [% INCLUDE 'members-menu.inc' %]
1144 [% INCLUDE 'intranet-bottom.inc' %]