1 [% IF ( opduplicate ) %][% SET focusAction = "clearDupe" %][% END %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons ›
5 [% 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>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'calendar.inc' %]
8 <script type="text/javascript">
10 $(document).ready(function() {
11 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
12 $("#guarantordelete").click(function() {
13 $("#contact-details").hide().find('a').remove();
14 $("#guarantorid, #contactname, #contactfirstname").each(function () { this.value = "" });
15 $("#contactname, #contactfirstname")
16 .each(function () { this.type = 'text' })
17 .parent().find('span').remove();
18 $("#guarantorsearch").val("Set to Patron");
20 $("#select_city").change(function(){
21 var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
22 document.form.select_city.value.match(myRegEx);
23 document.form.zipcode.value=RegExp.$1;
24 document.form.city.value=RegExp.$2;
25 document.form.state.value=RegExp.$3;
26 document.form.country.value=RegExp.$4;
28 $(".clearDupe").on("focus",function(){
33 update_category_code( "[% categorycode %]" );
35 if ( $("#categorycode").length > 0 ){
36 var category_code = $("#categorycode").find("option:selected").val();
37 update_category_code( category_code );
40 $("#dateofbirth").datepicker({ maxDate: "-1D" });
41 $("#entryform").validate({
42 submitHandler: function(form) {
43 $("body, form input[type='submit'], form button[type='submit'], form a").addClass('waiting');
44 if (form.beenSubmitted)
47 form.beenSubmitted = true;
52 var mrform = $("#manual_restriction_form");
53 var mrlink = $("#add_manual_restriction");
55 mrlink.on("click",function(e){
60 $("#cancel_manual_restriction").on("click",function(e){
61 $('#debarred_expiration').val('');
62 $('#add_debarment').val(0);
63 $('#debarred_comment').val('');
70 function clear_entry(node) {
71 var original = $(node).parent();
72 $("textarea", original).attr('value', '');
73 $("select", original).attr('value', '');
76 function clone_entry(node) {
77 var original = $(node).parent();
78 var clone = original.clone();
80 var newId = 50 + parseInt(Math.random() * 100000);
81 $("input,select,textarea", clone).attr('id', function() {
82 return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
84 $("input,select,textarea", clone).attr('name', function() {
85 return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
87 $("label", clone).attr('for', function() {
88 return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId);
90 $("input#patron_attr_" + newId, clone).attr('value','');
91 $("select#patron_attr_" + newId, clone).attr('value','');
92 $(original).after(clone);
96 function update_category_code(category_code) {
97 if ( $(category_code).is("select") ) {
98 category_code = $("#categorycode").find("option:selected").val();
100 var mytables = $(".attributes_table");
101 $(mytables).find("li").hide();
102 $(mytables).find(" li[data-category_code='"+category_code+"']").show();
103 $(mytables).find(" li[data-category_code='']").show();
106 var MSG_SEPARATOR = _("Separator must be / in field %s");
107 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
108 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
109 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
110 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
111 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
112 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
113 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
114 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
117 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
119 <body id="pat_memberentrygen" class="pat">
120 [% INCLUDE 'header.inc' %]
121 [% INCLUDE 'patron-search.inc' %]
123 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
125 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 %]
126 [% surname %] [% firstname %]
128 <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 %]
129 </strong>[% END %]</div>
130 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
136 [% IF ( error_alert == "no_email" ) %]
137 <div class="error">This member has no email</div>
139 <div class="error">[% error_alert %]</div>
143 <div class="dialog message">Email has been sent.</div>
146 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
147 [% 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 %]
148 [% 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 %]
150 [% UNLESS ( no_add ) %]
153 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 %]
157 [% 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 %]
158 [% firstname %] [% surname %]
162 [% IF ( check_member ) %]
163 <div class="dialog alert">
164 <h3>Duplicate patron record?</h3>
165 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');" >View existing record</a></p>
166 <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>
168 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
169 <input type="hidden" name="nodouble" value="1" />
170 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
175 <div class="dialog alert">
176 <p>The following fields are wrong. Please fix them.</p>
178 [% IF ( ERROR_login_exist ) %]
179 <li id="ERROR_login_exist">Username/password already exists.</li>
181 [% IF ERROR_cardnumber_already_exists %]
182 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
184 [% IF ERROR_cardnumber_length %]
185 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
187 [% IF ( ERROR_age_limitations ) %]
188 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
189 Ages allowed are [% age_low %]-[% age_high %].</li>
191 [% IF ( ERROR_branch ) %]
192 <li id="ERROR_branch">Library is invalid.</li>
194 [% IF ( ERROR_dateofbirth ) %]
195 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
197 [% IF ( ERROR_dateenrolled ) %]
198 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
200 [% IF ( ERROR_dateexpiry ) %]
201 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
203 [% IF ( ERROR_short_password ) %]
204 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
206 [% IF ( ERROR_password_mismatch ) %]
207 <li id="ERROR_password_mismatch">Passwords do not match.</li>
209 [% IF ( ERROR_extended_unique_id_failed ) %]
210 <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>
217 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
218 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
219 <!-- field always hidden in different form (1,2,3) -->
220 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
221 <input type="hidden" name="category_type" value="[% category_type %]" />
222 <input type="hidden" name="updtype" value="[% updtype %]" />
223 <input type="hidden" name="destination" value="[% destination %]" />
224 <input type="hidden" name="check_member" value="[% check_member %]" />
225 <input type="hidden" name="borrowernumber" value="[% IF ( opduplicate ) %][% ELSE %][% borrowernumber %][% END %]" />
226 <input type="hidden" name="nodouble" value="[% IF ( opduplicate ) %][% ELSE %][% nodouble %][% END %]" />
227 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
228 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
229 [% ELSIF ( opduplicate ) %]
230 <input type="hidden" name="op" value="insert" />
232 <input type="hidden" name="op" value="save" />
233 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
234 [%# Only put the cardnumber if we arent showing it in the form later %]
236 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
242 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
243 <fieldset class="rows" id="memberentry_identity">
244 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
248 [% IF ( title_cgipopup ) %]
250 [% IF ( mandatorytitle ) %]
251 <label for="btitle" class="required">
256 [% borrotitlepopup %]
257 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
262 [% UNLESS nosurname %]
264 [% IF ( mandatorysurname ) %]
265 <label for="surname" class="required">
267 <label for="surname">
270 [% IF ( uppercasesurnames ) %]
271 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" class="[% focusAction %]" />
273 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" class="[% focusAction %]" />
275 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
279 [% UNLESS nofirstname %]
281 [% IF ( mandatoryfirstname ) %]
282 <label for="firstname" class="required">
284 <label for="firstname">
287 <input type="text" id="firstname" name="firstname" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% firstname %][% END %]" />
288 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
291 [% UNLESS nodateofbirth %]
293 [% IF ( mandatorydateofbirth ) %]
294 <label for="dateofbirth" class="required">
296 <label for="dateofbirth">
298 Date of birth: </label>
300 [% IF ( dateformat == "metric" ) %]
301 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
303 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
306 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
307 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
308 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
311 [% UNLESS noinitials %]
313 [% IF ( mandatoryinitials ) %]
314 <label for="initials" class="required">
316 <label for="initials">
319 <input type="text" id="initials" name="initials" size="20" value="[% initials %]" class="[% focusAction %]" />
320 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
324 [% UNLESS noothernames %]
326 [% IF ( mandatoryothernames ) %]
327 <label for="othernames" class="required">
329 <label for="othernames">
332 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames %]" class="[% focusAction %]" />
333 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
334 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
342 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
344 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
347 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
349 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
352 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
354 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
361 [% END # hide fieldset %]
363 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
364 <fieldset class="rows">
365 <legend>Guarantor information</legend>
368 [% IF ( guarantorid ) %]
369 <li id="contact-details">
371 <li id="contact-details" style="display: none">
373 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
376 <label for="contactname">Organization name: </label>
377 [% IF ( guarantorid ) %]
378 <span>[% contactname %]</span>
379 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
381 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" class="[% focusAction %]" />
386 [% IF ( guarantorid ) %]
387 <li id="contact-details">
389 <li id="contact-details" style="display: none">
391 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
393 [% UNLESS nocontactname %]
395 <label for="contactname">Surname: </label>
396 [% IF ( guarantorid ) %]
397 <span>[% contactname %]</span>
398 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
400 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" class="[% focusAction %]" />
404 [% UNLESS nocontactfirstname %]
406 <label for="contactfirstname">First name: </label>
407 [% IF ( guarantorid ) %]
408 <span>[% contactfirstname %]</span>
409 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
411 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" class="[% focusAction %]" />
415 [% IF ( relshiploop ) %]
417 <label for="relationship">Relationship: </label>
418 <select name="relationship" id="relationship" >
419 [% FOREACH relshiploo IN relshiploop %]
420 [% IF ( relshiploo.selected ) %]
421 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
423 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
432 <span class="label"> </span>
433 [% IF ( guarantorid ) %]
434 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
436 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
438 <input id="guarantordelete" type="button" value="Delete" />
444 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
445 <fieldset class="rows" id="memberentry_mainaddress">
446 <legend id="main_address_lgd">Main address</legend><ol>
447 [% UNLESS nostreetnumber %]
449 [% IF ( mandatorystreetnumber ) %]
450 <label for="streetnumber" class="required">
452 <label for="streetnumber">
454 Street number: </label>
455 <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" class="[% focusAction %]" />
456 [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
459 [% UNLESS nostreettype %]
462 [% IF ( mandatorystreettype ) %]
463 <label for="streettype" class="required">
465 <label for="streettype">
467 Street type: </label>
468 <select name="streettype">
469 <option value=""></option>
470 [% FOR roadtype IN roadtypes %]
471 [% IF roadtype.selected %]
472 <option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option>
474 <option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option>
478 [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
482 [% UNLESS noaddress %]
484 [% IF ( mandatoryaddress ) %]
485 <label for="address" class="required">
487 <label for="address">
490 <input type="text" id="address" name="address" size="35" value="[% address %]" class="[% focusAction %]" />
491 [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
494 [% UNLESS noaddress2 %]
496 [% IF ( mandatoryaddress2 ) %]
497 <label for="address2" class="required">
499 <label for="address2">
502 <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" class="[% focusAction %]" />
503 [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
508 [% IF ( mandatorycity ) %]
509 <label for="city" class="required">
514 <input type="text" id="city" name="city" size="20" value="[% city %]" class="[% focusAction %]" />
515 [% IF ( city_cgipopup ) %]or <strong>choose</strong>
516 <select id="select_city" name="select_city">
517 [% FOREACH city_loo IN city_loop %]
518 [% IF ( city_loo.selected ) %]
519 <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected">
521 <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]">
523 [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %]
528 [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
533 [% IF ( mandatorystate ) %]
534 <label for="state" class="required">
539 <input type="text" name="state" id="state" size="20" value="[% state %]" class="[% focusAction %]" />
540 [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
543 [% UNLESS nozipcode %]
545 [% IF ( mandatoryzipcode ) %]
546 <label for="zipcode" class="required">
548 <label for="zipcode">
550 Zip/Postal code: </label>
551 <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" class="[% focusAction %]" />
552 [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
555 [% UNLESS nocountry %]
557 [% IF ( mandatorycountry ) %]
558 <label for="country" class="required">
560 <label for="country">
563 <input type="text" name="country" id="country" size="20" value="[% country %]" class="[% focusAction %]" />
564 [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
569 [% END # nostreet && nocity etc group%]
571 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
572 <fieldset class="rows" id="memberentry_contact">
573 <legend id="contact_lgd">Contact</legend><ol>
576 [% IF ( mandatoryphone ) %]
577 <label for="phone" class="required">
581 Primary phone: </label>
582 <input type="text" id="phone" name="phone" value="[% phone %]" class="[% focusAction %]" />
583 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
587 [% UNLESS nophonepro %]
589 [% IF ( mandatoryphonepro ) %]
590 <label for="phonepro" class="required">
592 <label for="phonepro">
594 Secondary phone: </label>
595 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" class="[% focusAction %]" />
596 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
599 [% UNLESS nomobile %]
601 [% IF ( mandatorymobile ) %]
602 <label for="mobile" class="required">
606 Mobile phone: </label>
607 <input type="text" id="mobile" name="mobile" value="[% mobile %]" class="[% focusAction %]" />
608 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
613 [% IF ( mandatoryemail ) %]
614 <label for="email" class="required">
618 Primary email: </label>
619 <input type="text" id="email" name="email" size="45" value="[% email %]" class="[% focusAction %]" />
620 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
624 [% UNLESS noemailpro %]
626 [% IF ( mandatoryemailpro ) %]
627 <label for="emailpro" class="required">
629 <label for="emailpro">
631 Secondary email: </label>
632 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" class="[% focusAction %]" />
633 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
638 [% IF ( mandatoryfax ) %]
639 <label for="fax" class="required">
644 <input type="text" id="fax" name="fax" value="[% fax %]" class="[% focusAction %]" />
645 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
650 [%END # hide fieldset %]
652 <!-- ************************ STEP_1 *********************** -->
656 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
657 <fieldset class="rows" id="memberentry_address">
658 <legend id="alt_address_lgd">Alternate address</legend><ol>
659 [% UNLESS noB_address %]
661 [% IF ( mandatoryB_address ) %]
662 <label for="B_address" class="required">
664 <label for="B_address">
667 <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" class="[% focusAction %]" />
668 [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
671 [% UNLESS noB_address2 %]
673 [% IF ( mandatoryB_address2 ) %]
674 <label for="B_address2" class="required">
676 <label for="B_address2">
679 <input type="text" id="B_address2" name="B_address2" size="40" value="[% B_address2 %]" class="[% focusAction %]" />
680 [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
683 [% UNLESS noB_city %]
685 [% IF ( mandatoryB_city ) %]
686 <label for="B_city" class="required" >
691 <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" class="[% focusAction %]" />
692 [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
695 [% UNLESS noB_state %]
697 [% IF ( mandatoryB_state ) %]
698 <label for="B_state" class="required" >
700 <label for="B_state">
703 <input type="text" id="B_state" name="B_state" size="20" value="[% B_state %]" class="[% focusAction %]" />
704 [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
707 [% UNLESS noB_zipcode %]
709 [% IF ( mandatoryB_zipcode ) %]
710 <label for="B_zipcode" class="required">
712 <label for="B_zipcode">
714 Zip/Postal code: </label>
715 <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" class="[% focusAction %]" />
716 [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
719 [% UNLESS noB_country %]
721 [% IF ( mandatoryB_country ) %]
722 <label for="B_country" class="required">
724 <label for="B_country">
727 <input type="text" id="B_country" name="B_country" size="20" value="[% B_country %]" class="[% focusAction %]" />
728 [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
731 [% UNLESS noB_phone %]
733 [% IF ( mandatoryB_phone ) %]
734 <label for="B_phone" class="required">
736 <label for="B_phone">
739 <input type="text" id="B_phone" name="B_phone" value="[% B_phone %]" class="[% focusAction %]" />
740 [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
743 [% UNLESS noB_email %]
745 [% IF ( mandatoryB_email ) %]
746 <label for="B_email" class="required">
748 <label for="B_email">
751 <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" class="[% focusAction %]" />
752 [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
754 [% UNLESS nocontactnote %]
756 [% IF ( mandatorycontactnote ) %]
757 <label for="contactnote" class="required">
759 <label for="contactnote">
761 Contact note: </label>
762 <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote %]</textarea>
763 [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
768 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
771 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
772 <fieldset class="rows" id="memberentry_altaddress">
773 <legend id="alt_contact_lgd">Alternate contact</legend><ol>
774 [% UNLESS noaltcontactsurname %]
776 [% IF ( mandatoryaltcontactsurname ) %]
777 <label for="altcontactsurname" class="required">
779 <label for="altcontactsurname">
782 <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" class="[% focusAction %]" />
783 [% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
786 [% UNLESS noaltcontactfirstname %]
788 [% IF ( mandatoryaltcontactfirstname ) %]
789 <label for="altcontactfirstname" class="required">
791 <label for="altcontactfirstname">
794 <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" class="[% focusAction %]" />
795 [% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
798 [% UNLESS noaltcontactaddress1 %]
800 [% IF ( mandatoryaltcontactaddress1 ) %]
801 <label for="altcontactaddress1" class="required">
803 <label for="altcontactaddress1">
806 <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" class="[% focusAction %]" />
807 [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
810 [% UNLESS noaltcontactaddress2 %]
812 [% IF ( mandatoryaltcontactaddress2 ) %]
813 <label for="altcontactaddress2" class="required">
815 <label for="altcontactaddress2">
818 <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" size="40" class="[% focusAction %]" />
819 [% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
822 [% UNLESS noaltcontactaddress3 %]
824 [% IF ( mandatoryaltcontactaddress3 ) %]
825 <label for="altcontactaddress3" class="required">
827 <label for="altcontactaddress3">
830 <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" class="[% focusAction %]" />
831 [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
834 [% UNLESS noaltcontactstate %]
836 [% IF ( mandatoryaltcontactstate ) %]
837 <label for="altcontactstate" class="required">
839 <label for="altcontactstate">
842 <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" class="[% focusAction %]" />
843 [% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
846 [% UNLESS noaltcontactzipcode %]
848 [% IF ( mandatoryaltcontactzipcode ) %]
849 <label for="altcontactzipcode" class="required">
851 <label for="altcontactzipcode">
853 Zip/Postal code:</label>
854 <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" class="[% focusAction %]" />
855 [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
858 [% UNLESS noaltcontactcountry %]
860 [% IF ( mandatoryaltcontactcountry ) %]
861 <label for="altcontactcountry" class="required">
863 <label for="altcontactcountry">
866 <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" size="20" class="[% focusAction %]" />
867 [% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
870 [% UNLESS noaltcontactphone %]
872 [% IF ( mandatoryaltcontactphone ) %]
873 <label for="altcontactphone" class="required">
875 <label for="altcontactphone">
878 <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" class="[% focusAction %]" />
879 [% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
884 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
889 <fieldset class="rows" id="memberentry_library_management">
890 <legend id="library_management_lgd">Library management</legend><ol>
891 [% UNLESS nocardnumber %]
893 [% IF ( mandatorycardnumber ) %]
894 <label for="cardnumber" class="required">
896 <label for="cardnumber" class="validated">
898 Card number: </label>
899 [% IF minlength_cardnumber == maxlength_cardnumber %]
900 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" title="exactly [% minlength_cardnumber %] characters" />
901 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
902 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" title="between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters" />
903 [% ELSIF maxlength_cardnumber %]
904 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" title="up to [% maxlength_cardnumber %] characters" />
906 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
908 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
911 [% UNLESS nobranchcode %]
913 <label for="libraries" class="required">Library:</label>
914 <select name="branchcode" size="1" id="libraries">
915 [%- FOREACH branchloo IN branchloop %]
916 [% IF ( branchloo.selected ) -%]
917 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
919 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
923 <span class="required">Required</span>
927 <label for="categorycode" class="required">Category: </label>
928 <select id="categorycode" name="categorycode" onchange="update_category_code(this);">
929 [% FOREACH typeloo IN typeloop %]
930 [% FOREACH categoryloo IN typeloo.categoryloop %]
931 [% IF ( loop.first ) %]
932 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
933 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
934 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
935 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
936 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
937 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
939 [% IF ( categoryloo.categorycodeselected ) %]
940 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
942 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
944 [% IF ( loop.last ) %]
950 <span class="required">Required</span>
954 [% IF ( mandatorysort1 ) %]
955 <label for="sort1" class="required">
960 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, class=focusAction, size = 20 %]
961 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
966 [% IF ( mandatorysort2 ) %]
967 <label for="sort2" class="required">
972 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, class=focusAction, size = 20 %]
973 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
978 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
979 <fieldset class="rows" id="memberentry_subscription">
980 <legend id="library_setup_lgd">Library set-up</legend><ol>
981 [% UNLESS nodateenrolled %]
983 [% IF ( mandatorydateenrolled ) %]
984 <label for="from" class="required">
988 Registration date: </label>
989 [% IF ( dateformat == "metric" ) %]
990 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
992 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
994 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
995 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
996 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
999 [% UNLESS nodateexpiry %]
1002 <li style="display:none">
1004 [% IF ( mandatorydateexpiry ) %]
1005 <label for="to" class="required">
1009 Expiry date (leave blank for auto calc) </label>
1010 [% IF ( dateformat == "metric" ) %]
1011 [% UNLESS ( opadd ) %]
1012 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" class="datepickerto" />
1014 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
1017 [% UNLESS ( opadd ) %]
1018 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
1020 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
1023 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
1024 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
1025 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1027 [% UNLESS noopacnote %]
1029 [% IF ( mandatoryopacnote ) %]
1030 <label for="opacnote" class="required">
1032 <label for="opacnote">
1035 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote %]</textarea>
1036 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1037 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
1040 [% UNLESS noborrowernotes %]
1042 [% IF ( mandatoryborrowernotes ) %]
1043 <label for="borrowernotes" class="required">
1045 <label for="borrowernotes">
1047 Circulation note: </label>
1048 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes %]</textarea>
1049 <div class="hint">This message displays when checking out to this patron</div>
1050 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
1055 [% END # hide fieldset %]
1057 [% UNLESS nouserid && nopassword %]
1058 <fieldset class="rows" id="memberentry_userid">
1059 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
1060 [% UNLESS nouserid %]
1062 [% IF ( mandatoryuserid ) %]
1063 <label for="userid" class="required">
1065 <label for="userid">
1069 [% IF ( NoUpdateLogin ) %]
1070 [% IF ( opduplicate ) %]
1071 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1073 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
1076 [% IF ( opduplicate ) %]
1077 <input type="text" id="userid" name="userid" size="20" value="" />
1079 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
1083 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
1086 [% UNLESS nopassword %]
1088 [% IF ( mandatorypassword ) %]
1089 <label for="password" class="required">
1091 <label for="password">
1095 [% IF ( NoUpdateLogin ) %]
1096 [% IF ( opduplicate ) %]
1097 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1099 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
1102 [% IF ( opduplicate ) %]
1103 <input type="password" id="password" name="password" size="20" />
1105 <input type="password" id="password" name="password" size="20" value="[% password %]" />
1109 [% IF ( password ) %]
1110 [% IF ( NoUpdateLogin ) %]
1111 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1113 [% IF ( opduplicate ) %]
1114 <input type="password" id="password" name="password" size="20" />
1116 <input type="password" id="password" name="password" size="20" value="****" />
1120 [% IF ( NoUpdateLogin ) %]
1121 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1123 <input type="password" id="password" name="password" size="20" value="" />
1127 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
1128 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
1131 [% IF ( mandatorypassword ) %]
1132 <label for="password2" class="required">
1134 <label for="password2">
1136 Confirm password: </label>
1138 [% IF ( NoUpdateLogin ) %]
1139 [% IF ( opduplicate ) %]
1140 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1142 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
1145 [% IF ( opduplicate ) %]
1146 <input type="password" id="password2" name="password2" size="20" />
1148 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
1152 [% IF ( password ) %]
1153 [% IF ( NoUpdateLogin ) %]
1154 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1156 [% IF ( opduplicate ) %]
1157 <input type="password" id="password2" name="password2" size="20" />
1159 <input type="password" id="password2" name="password2" size="20" value="****" />
1163 [% IF ( NoUpdateLogin ) %]
1164 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1166 <input type="password" id="password2" name="password2" size="20" value="" />
1170 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
1174 [% END # hide fieldset %][% END %]
1175 <!--this zones are not necessary in modif mode -->
1176 [% UNLESS ( opadd || opduplicate ) %]
1177 <fieldset class="rows">
1178 <legend>Patron account flags</legend>
1180 [% FOREACH flagloo IN flagloop %]
1181 <li><label class="radio" for="yes[% flagloo.name %]">
1182 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1183 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1185 [% IF CAN_user_circulate_manage_restrictions %]
1186 <label for="yes[% flagloo.name %]">Yes </label>
1187 [% IF ( flagloo.yes ) %]
1188 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
1190 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
1192 <label for="no[% flagloo.name %]">No </label>
1193 [% IF ( flagloo.no ) %]
1194 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
1196 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
1199 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1208 <fieldset class="rows">
1209 <legend>Patron restrictions</legend>
1211 [% IF ( debarments.size < 1 ) %]
1212 <p>Patron is currently unrestricted.</p>
1220 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1227 [% FOREACH d IN debarments %]
1229 <td>[% d.type %]</td>
1230 <td>[% d.comment %]</td>
1231 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
1232 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1234 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
1242 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1243 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1244 <fieldset id="manual_restriction_form">
1245 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1246 <legend>Add manual restriction</legend>
1248 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1249 <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);" />
1250 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1254 <a class="cancel" id="cancel_manual_restriction" href="#" onclick="">Cancel</a>
1263 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1264 <fieldset class="rows" id="memberentry_patron_attributes">
1265 <legend>Additional attributes and identifiers</legend>
1266 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1267 [% FOREACH pa_loo IN patron_attributes %]
1268 [% IF pa_loo.class %]
1269 <fieldset id="aai_[% pa_loo.class %]">
1270 <legend>[% pa_loo.lib %]</legend>
1272 <ol class="attributes_table">
1273 [% FOREACH patron_attribute IN pa_loo.items %]
1274 <li data-category_code="[% patron_attribute.category_code %]">
1275 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1276 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1277 [% IF ( patron_attribute.use_dropdown ) %]
1278 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1279 <option value=""></option>
1280 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1281 [% IF ( auth_val_loo.selected ) %]
1282 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1283 [% auth_val_loo.lib %]
1286 <option value="[% auth_val_loo.authorised_value %]" >
1287 [% auth_val_loo.lib %]
1293 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1295 [% IF ( patron_attribute.password_allowed ) %]
1296 (<label class="yesno" for="[% patron_attribute.form_id %]_password">Password:</label> <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1297 id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1299 <a href="#" class="clear-field" onclick="clear_entry(this); return false;">Clear</a>
1300 [% IF ( patron_attribute.repeatable ) %]
1301 <a href="#" class="clone-field" onclick="clone_entry(this); return false;">New</a>
1306 [% IF pa_loo.class %]</fieldset>[% END %]
1309 [% END %][% END %][% END %]
1311 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1312 <fieldset class="rows" id="memberentry_messaging_prefs">
1313 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1315 <!-- handle changing prefs if creating new patron and changing
1318 <script type="text/javascript">//<![CDATA[
1319 $(document).ready(function(){
1320 var message_prefs_dirty = false;
1321 $('#memberentry_messaging_prefs > *').change(function() {
1322 message_prefs_dirty = true;
1324 $('#categorycode').change(function() {
1325 var categorycode = $(this).val();
1326 if (message_prefs_dirty) {
1327 if (!confirm('Change messaging preferences to default for this category?')) {
1331 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1333 $.each(data.messaging_preferences, function(i, item) {
1334 var attrid = item.message_attribute_id;
1335 var transports = ['email', 'rss', 'sms'];
1336 $.each(transports, function(j, transport) {
1337 if (item['transports_' + transport] == 1) {
1338 $('#' + transport + attrid).attr('checked', 'checked');
1340 $('#' + transport + attrid).removeAttr('checked');
1343 if (item.digest && item.digest != ' ') {
1344 $('#digest' + attrid).attr('checked', item.digest);
1346 $('#digest' + attrid).removeAttr('checked');
1348 if (item.takes_days == '1') {
1349 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1352 message_prefs_dirty = false;
1360 <input type="hidden" name="setting_messaging_prefs" value="1" />
1362 <p>If no preferences are selected, the default preferences for the category chosen will be applied on save, otherwise your selection here is saved</p>
1364 [% INCLUDE 'messaging-preference-form.inc' %]
1365 [% IF ( SMSSendDriver ) %]
1366 <p><label for="SMSnumber">SMS number:</label>
1367 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" class="[% focusAction %]" />
1373 [% UNLESS ( check_member ) %]
1374 <fieldset class="action">
1375 <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1377 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1379 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1388 [% UNLESS ( opadd ) %]<div class="yui-b">
1389 [% INCLUDE 'members-menu.inc' %]
1393 [% INCLUDE 'intranet-bottom.inc' %]