1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Patrons ›
3 [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] [% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %][% UNLESS ( opadd ) %] [% surname %], [% firstname %][% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 <script type="text/JavaScript" language="JavaScript">
8 $(document).ready(function() {
9 $("fieldset.rows input").keydown(function(e){ return checkEnter(e); });
10 $("#guarantordelete").click(function() {
11 $("#contact-details").hide().find('a').remove();
12 $("#guarantorid, #contactname, #contactfirstname").each(function () { this.value = "" });
13 $("#contactname, #contactfirstname")
14 .each(function () { this.type = 'text' })
15 .parent().find('span').remove();
16 $("#guarantorsearch").val("Set to Patron");
18 $("#select_city").change(function(){
19 var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
20 document.form.select_city.value.match(myRegEx);
21 document.form.zipcode.value=RegExp.$1;
22 document.form.city.value=RegExp.$2;
23 document.form.state.value=RegExp.$3;
24 document.form.country.value=RegExp.$4;
28 function clear_entry(node) {
29 var original = node.parentNode.parentNode;
30 $("input[type=text]", original).attr('value', '');
31 $("select", original).attr('value', '');
34 function clone_entry(node) {
35 var original = node.parentNode.parentNode;
36 var clone = original.cloneNode(true);
37 var newId = 50 + parseInt(Math.random() * 100000);
38 $("input", clone).attr('id', function() {
39 return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
41 $("input", clone).attr('name', function() {
42 return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
44 $("select", clone).attr('id', function() {
45 return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
47 $("select", clone).attr('name', function() {
48 return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
50 $("input#patron_attr_" + newId, clone).attr('value','');
51 $("select#patron_attr_" + newId, clone).attr('value','');
52 original.parentNode.insertBefore(clone, original.nextSibling);
54 var MSG_SEPARATOR = _("Separator must be / in field ");
55 var MSG_INCORRECT_DAY = _("Invalid day entered in field ");
56 var MSG_INCORRECT_MONTH = _("Invalid month entered in field ");
57 var MSG_INCORRECT_YEAR = _("Invalid year entered in field ");
58 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
59 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
60 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
61 var MSG_MISSING_MANDATORY = _("The following fields are mandatory:");
62 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
65 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
68 [% INCLUDE 'header.inc' %]
69 [% INCLUDE 'patron-search.inc' %]
71 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
73 Add[% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %]
74 [% surname %] [% firstname %]
76 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% firstname %] [% surname %]</a> › <strong>[% IF ( opduplicate ) %]Duplicate[% ELSE %]Modify[% END %][% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %]
77 </strong>[% END %]</div>
78 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
84 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
85 [% IF ( no_branches ) %]<p>There are <strong>no libraries defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/branches.pl">add a library</a>.[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
86 [% IF ( no_categories ) %]<p>There are <strong>no patron categories defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/categorie.pl">add a patron category</a>.[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
88 [% UNLESS ( no_add ) %]
91 Add[% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %] [% firstname %] [% surname %]
95 [% IF ( opduplicate ) %]Duplicate[% ELSE %]Modify[% END %][% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %]
96 [% firstname %] [% surname %]
100 [% IF ( check_member ) %]
101 <div class="dialog alert">
102 <h3>Duplicate patron record?</h3>
103 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');" >View existing record</a></p>
104 <form action="/cgi-bin/koha/members/memberentry.pl" method="get"><input type="hidden" name="op" value="modify" /><input type="hidden" name="borrowernumber" value="[% check_member %]" /><input type="hidden" name="category_type" value="[% check_categorytype %]" /><input class="edit" type="submit" value="It is a duplicate. Edit existing record" /></form>
106 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post">
107 <input type="hidden" name="nodouble" value="1" />
108 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
114 <div>Debug is on (level [% debug %])</div>
118 <div class="dialog alert">
119 <p>The following fields are wrong. Please fix them.</p>
121 [% IF ( ERROR_login_exist ) %]
122 <li id="ERROR_login_exist">Username/password already exists.</li>
124 [% IF ( ERROR_cardnumber ) %]
125 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
127 [% IF ( ERROR_age_limitations ) %]
128 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
129 Ages allowed are [% ERROR_age_limitations %].</li>
131 [% IF ( ERROR_branch ) %]
132 <li id="ERROR_branch">Library is invalid.</li>
134 [% IF ( ERROR_dateofbirth ) %]
135 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
137 [% IF ( ERROR_dateenrolled ) %]
138 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
140 [% IF ( ERROR_dateexpiry ) %]
141 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
143 [% IF ( ERROR_short_password ) %]
144 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
146 [% IF ( ERROR_extended_unique_id_failed ) %]
147 <li id="ERROR_extended_unique_id_failed">The attribute value
148 [% ERROR_extended_unique_id_failed %] is already is use by another patron record.</li>
155 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post">
156 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
157 <!-- field always hidden in different form (1,2,3) -->
158 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
159 <input type="hidden" name="category_type" value="[% category_type %]" />
160 <input type="hidden" name="updtype" value="[% updtype %]" />
161 <input type="hidden" name="select_roadtype" value="[% select_roadtype %]" />
162 <input type="hidden" name="destination" value="[% destination %]" />
163 <input type="hidden" name="check_member" value="[% check_member %]" />
164 <input type="hidden" name="borrowernumber" value="[% IF ( opduplicate ) %][% ELSE %][% borrowernumber %][% END %]" />
165 <input type="hidden" name="nodouble" value="[% IF ( opduplicate ) %][% ELSE %][% nodouble %][% END %]" />
166 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
167 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
168 [% ELSIF ( opduplicate ) %]
169 <input type="hidden" name="op" value="insert" />
171 <input type="hidden" name="op" value="save" />
172 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
173 [%# Only put the cardnumber if we arent showing it in the form later %]
175 <input type="hidden" name="cardnumber" value="[% cardnumber %]">
181 <fieldset class="rows" id="memberentry_identity">
182 <legend>[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
185 [% IF ( title_cgipopup ) %]
187 [% IF ( mandatorytitle ) %]
188 <label for="btitle" class="required">
193 [% borrotitlepopup %]
194 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
199 [% IF ( mandatorysurname ) %]
200 <label for="surname" class="required">
202 <label for="surname">
205 [% IF ( uppercasesurnames ) %]
206 [% IF ( opduplicate ) %]
207 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" onclick="this.value=''" />
209 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
212 [% IF ( opduplicate ) %]
213 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" onclick="this.value=''" />
215 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
218 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
222 [% IF ( mandatoryfirstname ) %]
223 <label for="firstname" class="required">
225 <label for="firstname">
228 <input type="text" id="firstname" name="firstname" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% firstname %][% END %]" />
229 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
232 [% IF ( mandatorydateofbirth ) %]
233 <label for="dateofbirth" class="required">
235 <label for="dateofbirth">
237 Date of birth: </label>
240 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
242 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
245 <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofbirth_button" alt="Show Calendar" />
246 <script language="JavaScript" type="text/javascript">
249 inputField : "dateofbirth",
250 ifFormat : "[% DHTMLcalendar_dateformat %]",
251 button : "dateofbirth_button"
255 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
256 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
257 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
260 [% IF ( mandatoryinitials ) %]
261 <label for="initials" class="required">
263 <label for="initials">
266 [% IF ( opduplicate ) %]
267 <input type="text" id="initials" name="initials" size="20" value="[% initials %]" onclick="this.value=''" />
269 <input type="text" id="initials" name="initials" size="20" value="[% initials %]" />
271 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
275 [% IF ( mandatoryothernames ) %]
276 <label for="othernames" class="required">
278 <label for="othernames">
281 [% IF ( opduplicate ) %]
282 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames %]" onclick="this.value=''" />
284 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames %]" />
286 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
287 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
293 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
295 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
298 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
300 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
303 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
305 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
312 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
313 <fieldset class="rows">
314 <legend>Guarantor Information</legend>
317 [% IF ( guarantorid ) %]
318 <li id="contact-details">
320 <li id="contact-details" style="display: none">
322 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
325 <label for="contactname">Organization name: </label>
326 [% IF ( guarantorid ) %]
327 <span>[% contactname %]</span>
328 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
330 [% IF ( opduplicate ) %]
331 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" onclick="this.value=''" />
333 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
339 [% IF ( guarantorid ) %]
340 <li id="contact-details">
342 <li id="contact-details" style="display: none">
344 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
347 <label for="contactname">Surname: </label>
348 [% IF ( guarantorid ) %]
349 <span>[% contactname %]</span>
350 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
352 [% IF ( opduplicate ) %]
353 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" onclick="this.value=''" />
355 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
360 <label for="contactfirstname">First name: </label>
361 [% IF ( guarantorid ) %]
362 <span>[% contactfirstname %]</span>
363 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
365 [% IF ( opduplicate ) %]
366 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" onclick="this.value=''" />
368 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
372 [% IF ( relshiploop ) %]
374 <label for="relationship">Relationship: </label>
375 <select name="relationship" id="relationship" >
376 [% FOREACH relshiploo IN relshiploop %]
377 [% IF ( relshiploo.selected ) %]
378 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
380 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
389 <span class="label"> </span>
390 [% IF ( guarantorid ) %]
391 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
393 <input id="guarantorsearch" type="button" value="Set to Patron" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
395 <input id="guarantordelete" type="button" value="Delete" />
401 <fieldset class="rows">
402 <legend>Main address</legend><ol>
404 [% IF ( mandatorystreetnumber ) %]
405 <label for="streetnumber" class="required">
407 <label for="streetnumber">
409 Street number: </label>
410 [% IF ( opduplicate ) %]
411 <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" onclick="this.value=''" />
413 <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" />
415 [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
417 [% IF ( road_cgipopup ) %]
419 [% IF ( mandatorystreettype ) %]
420 <label for="streettype" class="required">
422 <label for="streettype">
424 Street type: </label>
426 [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
430 [% IF ( mandatoryaddress ) %]
431 <label for="address" class="required">
433 <label for="address">
436 [% IF ( opduplicate ) %]
437 <input type="text" id="address" name="address" size="35" value="[% address %]" onclick="this.value=''" />
439 <input type="text" id="address" name="address" size="35" value="[% address %]" />
441 [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
444 [% IF ( mandatoryaddress2 ) %]
445 <label for="address2" class="required">
447 <label for="address2">
450 [% IF ( opduplicate ) %]
451 <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" onclick="this.value=''" />
453 <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" />
455 [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
458 [% IF ( mandatorycity ) %]
459 <label for="city" class="required">
464 [% IF ( opduplicate ) %]
465 <input type="text" id="city" name="city" size="20" value="[% city %]" onclick="this.value=''" />
467 <input type="text" id="city" name="city" size="20" value="[% city %]" />
469 [% IF ( city_cgipopup ) %]or <strong>choose</strong>
470 <select id="select_city" name="select_city">
471 [% FOREACH city_loo IN city_loop %]
472 [% IF ( city_loo.selected ) %]
473 <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected">
475 <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]">
477 [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %]
482 [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
485 [% IF ( mandatorystate ) %]
486 <label for="state" class="required">
491 <input type="text" name="state" id="state" size="20" value="[% state %]" />
492 [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
495 [% IF ( mandatoryzipcode ) %]
496 <label for="zipcode" class="required">
498 <label for="zipcode">
500 Zip/Postal code: </label>
501 [% IF ( opduplicate ) %]
502 <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" onclick="this.value=''" />
504 <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" />
506 [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
510 [% IF ( mandatorycountry ) %]
511 <label for="country" class="required">
513 <label for="country">
516 [% IF ( opduplicate ) %]
517 <input type="text" name="country" id="country" size="20" value="[% country %]" onclick="this.value=''" />
519 <input type="text" name="country" id="country" size="20" value="[% country %]" />
521 [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
526 <fieldset class="rows" id="memberentry_contact">
527 <legend>Contact</legend><ol>
529 [% IF ( mandatoryphone ) %]
530 <label for="phone" class="required">
534 Primary Phone: </label>
535 [% IF ( opduplicate ) %]
536 <input type="text" id="phone" name="phone" value="[% phone %]" onclick="this.value=''" />
538 <input type="text" id="phone" name="phone" value="[% phone %]" />
540 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
544 [% IF ( mandatoryphonepro ) %]
545 <label for="phonepro" class="required">
547 <label for="phonepro">
549 Secondary Phone: </label>
550 [% IF ( opduplicate ) %]
551 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" onclick="this.value=''" />
553 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
555 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
558 [% IF ( mandatorymobile ) %]
559 <label for="mobile" class="required">
563 Other Phone: </label>
564 [% IF ( opduplicate ) %]
565 <input type="text" id="mobile" name="mobile" value="[% mobile %]" onclick="this.value=''" />
567 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
569 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
572 [% IF ( mandatoryemail ) %]
573 <label for="email" class="required">
577 Primary Email: </label>
578 [% IF ( opduplicate ) %]
579 <input type="text" id="email" name="email" size="45" value="[% email %]" onclick="this.value=''" />
581 <input type="text" id="email" name="email" size="45" value="[% email %]" />
583 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
587 [% IF ( mandatoryemailpro ) %]
588 <label for="emailpro" class="required">
590 <label for="emailpro">
592 Secondary Email: </label>
593 [% IF ( opduplicate ) %]
594 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" onclick="this.value=''" />
596 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
598 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
601 [% IF ( mandatoryfax ) %]
602 <label for="fax" class="required">
607 [% IF ( opduplicate ) %]
608 <input type="text" id="fax" name="fax" value="[% fax %]" onclick="this.value=''" />
610 <input type="text" id="fax" name="fax" value="[% fax %]" />
612 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
618 <!-- ************************ STEP_1 *********************** -->
622 <fieldset class="rows" id="memberentry_address">
623 <legend>Alternate address</legend><ol>
625 [% IF ( mandatoryB_address ) %]
626 <label for="B_address" class="required">
628 <label for="B_address">
631 [% IF ( opduplicate ) %]
632 <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" onclick="this.value=''" />
634 <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" />
636 [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
639 [% IF ( mandatoryB_address2 ) %]
640 <label for="B_address2" class="required">
642 <label for="B_address2">
645 [% IF ( opduplicate ) %]
646 <input type="text" id="B_address2" name="B_address2" size="40" value="[% B_address2 %]" onclick="this.value=''" />
648 <input type="text" id="B_address2" name="B_address2" size="40" value="[% B_address2 %]" />
650 [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
653 [% IF ( mandatoryB_city ) %]
654 <label for="B_city" class="required" >
659 <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
660 [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
663 [% IF ( mandatoryB_state ) %]
664 <label for="B_state" class="required" >
666 <label for="B_state">
669 <input type="text" id="B_state" name="B_state" size="20" value="[% B_state %]" />
670 [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
673 [% IF ( mandatoryB_zipcode ) %]
674 <label for="B_zipcode" class="required">
676 <label for="B_zipcode">
678 Zip/Postal code: </label>
679 [% IF ( opduplicate ) %]
680 <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" onclick="this.value=''" />
682 <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" />
684 [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
687 [% IF ( mandatoryB_country ) %]
688 <label for="B_country" class="required">
690 <label for="B_country">
693 [% IF ( opduplicate ) %]
694 <input type="text" id="B_country" name="B_country" size="20" value="[% B_country %]" onclick="this.value=''" />
696 <input type="text" id="B_country" name="B_country" size="20" value="[% B_country %]" />
698 [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
701 [% IF ( mandatoryB_phone ) %]
702 <label for="B_phone" class="required">
704 <label for="B_phone">
707 [% IF ( opduplicate ) %]
708 <input type="text" id="B_phone" name="B_phone" value="[% B_phone %]" onclick="this.value=''" />
710 <input type="text" id="B_phone" name="B_phone" value="[% B_phone %]" />
712 [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
715 [% IF ( mandatoryB_email ) %]
716 <label for="B_email" class="required">
718 <label for="B_email">
721 [% IF ( opduplicate ) %]
722 <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" onclick="this.value=''" />
724 <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" />
726 [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
728 [% IF ( mandatorycontactnote ) %]
729 <label for="contactnote" class="required">
731 <label for="contactnote">
733 Contact note: </label>
734 <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote %]</textarea>
735 [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
741 <fieldset class="rows" id="memberentry_altaddress">
742 <legend>Alternate Contact</legend><ol>
744 [% IF ( mandatoryaltcontactsurname ) %]
745 <label for="altcontactsurname" class="required">
747 <label for="altcontactsurname">
750 [% IF ( opduplicate ) %]
751 <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" onclick="this.value=''" />
753 <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" />
755 [% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
758 [% IF ( mandatoryaltcontactfirstname ) %]
759 <label for="altcontactfirstname" class="required">
761 <label for="altcontactfirstname">
764 [% IF ( opduplicate ) %]
765 <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" onclick="this.value=''" />
767 <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" />
769 [% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
772 [% IF ( mandatoryaltcontactaddress1 ) %]
773 <label for="altcontactaddress1" class="required">
775 <label for="altcontactaddress1">
778 [% IF ( opduplicate ) %]
779 <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" onclick="this.value=''" size="40" />
781 <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" />
783 [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
786 [% IF ( mandatoryaltcontactaddress2 ) %]
787 <label for="altcontactaddress2" class="required">
789 <label for="altcontactaddress2">
792 [% IF ( opduplicate ) %]
793 <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" onclick="this.value=''" size="40" />
795 <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" size="40" />
797 [% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
800 [% IF ( mandatoryaltcontactaddress3 ) %]
801 <label for="altcontactaddress3" class="required">
803 <label for="altcontactaddress3">
806 <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
807 [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
810 [% IF ( mandatoryaltcontactstate ) %]
811 <label for="altcontactstate" class="required">
813 <label for="altcontactstate">
816 <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" />
817 [% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
820 [% IF ( mandatoryaltcontactzipcode ) %]
821 <label for="altcontactzipcode" class="required">
823 <label for="altcontactzipcode">
825 Zip/Postal code:</label>
826 [% IF ( opduplicate ) %]
827 <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" onclick="this.value=''" size="5" />
829 <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" />
831 [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
834 [% IF ( mandatoryaltcontactcountry ) %]
835 <label for="altcontactcountry" class="required">
837 <label for="altcontactcountry">
840 [% IF ( opduplicate ) %]
841 <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" onclick="this.value=''" size="20" />
843 <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" size="20" />
845 [% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
848 [% IF ( mandatoryaltcontactphone ) %]
849 <label for="altcontactphone" class="required">
851 <label for="altcontactphone">
854 [% IF ( opduplicate ) %]
855 <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" onclick="this.value=''" />
857 <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" />
859 [% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
867 <fieldset class="rows" id="memberentry_library_management">
868 <legend>Library Management</legend><ol>
869 <li> [% IF ( mandatorycardnumber ) %]
870 <label for="cardnumber" class="required">
872 <label for="cardnumber">
874 Card number: </label>
875 [% IF ( opduplicate ) %]
876 <input type="text" id="cardnumber" name="cardnumber" size="20" />
878 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
880 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]</li>
882 [% IF ( mandatorybranchcode ) %]
883 <label for="branchcode" class="required">
885 <label for="branchcode">
889 [% IF ( mandatorybranchcode ) %]<span class="required">Required</span>[% END %]
892 <label for="categorycode">Category: </label>
893 <select id="categorycode" name="categorycode">
894 [% FOREACH typeloo IN typeloop %]
895 [% FOREACH categoryloo IN typeloo.categoryloop %]
896 [% IF ( loop.first ) %]
897 [% IF ( categoryloo.typename_C ) %]<optgroup label="Child">[% END %]
898 [% IF ( categoryloo.typename_A ) %]<optgroup label="Adult">[% END %]
899 [% IF ( categoryloo.typename_S ) %]<optgroup label="Staff">[% END %]
900 [% IF ( categoryloo.typename_I ) %]<optgroup label="Organization">[% END %]
901 [% IF ( categoryloo.typename_P ) %]<optgroup label="Professional">[% END %]
902 [% IF ( categoryloo.typename_X ) %]<optgroup label="Statistical">[% END %]
904 [% IF ( categoryloo.categorycodeselected ) %]
905 <option value="[% categoryloo.categorycode %]" selected="selected">[% categoryloo.categoryname %]</option>
907 <option value="[% categoryloo.categorycode %]">[% categoryloo.categoryname %]</option>
909 [% IF ( loop.last ) %]
917 [% IF ( mandatorysort1 ) %]
918 <label for="sort1" class="required">
923 [% IF ( CGIsort1 ) %]
926 <input type="text" id="sort1" name="sort1" size="20" value="[% sort1 %]" />
927 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
931 [% IF ( mandatorysort2 ) %]
932 <label for="sort2" class="required">
937 [% IF ( CGIsort2 ) %]
940 [% IF ( opduplicate ) %]
941 <input type="text" id="sort2" name="sort2" size="20" value="[% sort2 %]" onclick="this.value=''" />
943 <input type="text" id="sort2" name="sort2" size="20" value="[% sort2 %]" />
945 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
950 <fieldset class="rows" id="memberentry_subscription">
951 <legend>Library set-up</legend><ol>
953 [% IF ( mandatorydateenrolled ) %]
954 <label for="dateenrolled" class="required">
956 <label for="dateenrolled">
958 Registration date: </label>
960 <input type="text" id="dateenrolled" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" />
962 <input type="text" id="dateenrolled" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" />
964 <img src="[% themelang %]/lib/calendar/cal.gif" id="dateenrolled_button" alt="Show Calendar" />
965 <script language="JavaScript" type="text/javascript">
968 inputField : "dateenrolled",
969 ifFormat : "[% DHTMLcalendar_dateformat %]",
970 button : "dateenrolled_button"
974 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
975 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
976 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
979 [% IF ( mandatorydateexpiry ) %]
980 <label for="dateexpiry" class="required">
982 <label for="dateexpiry">
984 Expiry date (leave blank for auto calc) </label>
986 [% UNLESS ( opadd ) %]
987 <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" />
989 <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" />
992 [% UNLESS ( opadd ) %]
993 <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" />
995 <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10" size="10" />
998 <img src="[% themelang %]/lib/calendar/cal.gif" id="dateexpiry_button" alt="Show Calendar" />
999 <script language="JavaScript" type="text/javascript">
1002 inputField : "dateexpiry",
1003 ifFormat : "[% DHTMLcalendar_dateformat %]",
1004 button : "dateexpiry_button"
1008 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
1009 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
1010 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1013 [% IF ( mandatoryopacnote ) %]
1014 <label for="opacnote" class="required">
1016 <label for="opacnote">
1019 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote %]</textarea>
1020 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1021 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
1024 [% IF ( mandatoryborrowernotes ) %]
1025 <label for="borrowernotes" class="required">
1027 <label for="borrowernotes">
1029 Circulation note: </label>
1030 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes %]</textarea>
1031 <div class="hint">This message displays when checking out to this patron</div>
1032 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
1036 <fieldset class="rows" id="memberentry_userid">
1037 <legend>OPAC/Staff Login</legend><ol>
1039 [% IF ( mandatoryuserid ) %]
1040 <label for="userid" class="required">
1042 <label for="userid">
1046 [% IF ( NoUpdateLogin ) %]
1047 [% IF ( opduplicate ) %]
1048 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1050 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
1053 [% IF ( opduplicate ) %]
1054 <input type="text" id="userid" name="userid" size="20" value="" />
1056 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
1060 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
1063 [% IF ( mandatorypassword ) %]
1064 <label for="password" class="required">
1066 <label for="password">
1070 [% IF ( NoUpdateLogin ) %]
1071 [% IF ( opduplicate ) %]
1072 <input type="text" id="password" name="password" size="20" disabled="disabled" />
1074 <input type="text" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
1077 [% IF ( opduplicate ) %]
1078 <input type="text" id="password" name="password" size="20" />
1080 <input type="text" id="password" name="password" size="20" value="[% password %]" />
1084 [% IF ( password ) %]
1085 [% IF ( NoUpdateLogin ) %]
1086 <input type="text" id="password" name="password" size="20" disabled="disabled" value="****" />
1088 [% IF ( opduplicate ) %]
1089 <input type="text" id="password" name="password" size="20" />
1091 <input type="text" id="password" name="password" size="20" value="****" />
1095 [% IF ( NoUpdateLogin ) %]
1096 <input type="text" id="password" name="password" size="20" disabled="disabled" value="" />
1098 <input type="text" id="password" name="password" size="20" value="" />
1102 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
1103 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
1106 <!--this zones are not necessary in modif mode -->
1107 [% UNLESS ( opadd ) %]
1108 <fieldset class="rows">
1109 <legend>Patron Account Flags</legend>
1111 [% FOREACH flagloo IN flagloop %]
1112 <li><label class="radio" for="yes[% flagloo.name %]">
1113 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no Address:[% END %]
1114 [% IF ( flagloo.key == 'debarred' ) %]Restricted:[% END %]
1115 [% IF ( flagloo.key == 'lost' ) %]Lost Card:[% END %]
1117 <label for="yes[% flagloo.name %]">Yes </label>
1118 [% IF ( flagloo.yes ) %]
1119 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
1121 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
1123 <label for="no[% flagloo.name %]">No </label>
1124 [% IF ( flagloo.no ) %]
1125 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
1127 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
1133 <label for="yesdebarred" class="radio">Debarred: </label>
1134 [% IF ( debarred ) %]
1135 <label for="yesdebarred">Yes </label>
1136 <input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/>
1137 <label for="nodebarred">No </label>
1138 <input type="radio" id="nodebarred" name="debarred" value="0"/>
1140 <label for="yesdebarred">Yes </label>
1141 <input type="radio" id="yesdebarred" name="debarred" value="1" />
1142 <label for="nodebarred">No </label>
1143 <input type="radio" id="nodebarred" name="debarred" value="0" checked="checked"/>
1147 <label for="datedebarred" class="radio">until:</label>
1148 <input type="text" name="datedebarred" id="debarred" class="debarred" value="[% datedebarred %]"[% IF ( opduplicate ) %] onclick="this.value=''"[% END %] />
1149 <img src="[% themelang %]/lib/calendar/cal.gif" id="debarred_button" alt="Show Calendar" />
1150 <script language="JavaScript" type="text/javascript">
1153 inputField : "debarred",
1154 ifFormat : "[% DHTMLcalendar_dateformat %]",
1155 button : "debarred_button"
1160 <label for="debarredcomment" class="radio">Comment:</label>
1161 <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" [% IF ( opduplicate ) %] onclick="this.value=''"[% END %]>[% debarredcomment %]</textarea>
1171 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1172 <fieldset class="rows" id="memberentry_patron_attributes">
1173 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1174 <legend>Additional attributes and identifiers</legend>
1178 <th colspan="2">Value</th>
1180 [% FOREACH patron_attribute IN patron_attributes %]
1182 <td>[% patron_attribute.code %] ([% patron_attribute.description %])
1185 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1186 [% IF ( patron_attribute.use_dropdown ) %]
1187 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1189 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1190 [% IF ( auth_val_loo.selected ) %]
1191 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1192 [% auth_val_loo.lib %]
1195 <option value="[% auth_val_loo.authorised_value %]" >
1196 [% auth_val_loo.lib %]
1202 [% IF ( opduplicate ) %]
1203 <input type="text" maxlength="64" value="[% patron_attribute.value %]"
1204 id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" />
1206 <input type="text" maxlength="64" value="[% patron_attribute.value %]"
1207 id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" />
1210 [% IF ( patron_attribute.password_allowed ) %]
1211 (Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1212 id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1216 <a href="#" onclick="clear_entry(this); return false;">Clear</a>
1217 [% IF ( patron_attribute.repeatable ) %]
1218 <a href="#" onclick="clone_entry(this); return false;">New</a>
1225 [% END %][% END %][% END %]
1227 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1228 <fieldset class="rows" id="memberentry_messaging_prefs">
1230 <!-- handle changing prefs if creating new patron and changing
1233 <script language="javascript" type="text/javascript">//<![CDATA[
1234 $(document).ready(function(){
1235 var message_prefs_dirty = false;
1236 $('#memberentry_messaging_prefs > *').change(function() {
1237 message_prefs_dirty = true;
1239 $('#categorycode').change(function() {
1240 var categorycode = $(this).val();
1241 if (message_prefs_dirty) {
1242 if (!confirm('Change messaging preferences to default for this category?')) {
1246 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1248 $.each(data.messaging_preferences, function(i, item) {
1249 var attrid = item.message_attribute_id;
1250 var transports = ['email', 'rss', 'sms'];
1251 $.each(transports, function(j, transport) {
1252 if (item['transport-' + transport] != ' ') {
1253 $('#' + transport + attrid).attr('checked', item['transport-' + transport]);
1255 $('#' + transport + attrid).removeAttr('checked');
1258 if (item.digest && item.digest != ' ') {
1259 $('#digest' + attrid).attr('checked', item.digest);
1261 $('#digest' + attrid).removeAttr('checked');
1263 if (item.takes_days == '1') {
1264 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1267 message_prefs_dirty = false;
1275 <input type="hidden" name="setting_messaging_prefs" value="1" />
1276 <legend>Patron messaging preferences</legend>
1278 <i>If no preferences are selected, the default preferences for the category chosen will be applied on save, otherwise your selection here is saved</i>
1280 [% INCLUDE 'messaging-preference-form.inc' %]
1281 [% IF ( SMSSendDriver ) %]
1282 <p><label for="SMSnumber">SMS number:</label>
1283 [% IF ( opduplicate ) %]
1284 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" onclick="this.value=''" />
1286 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1293 <fieldset class="action">
1294 <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1296 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1298 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1306 [% UNLESS ( opadd ) %]<div class="yui-b">
1307 [% INCLUDE 'members-menu.inc' %]
1311 [% INCLUDE 'intranet-bottom.inc' %]