3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <script type="text/javascript">
9 $(document).ready(function() {
10 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
11 $("#guarantordelete").click(function() {
12 $("#contact-details").hide().find('a').remove();
13 $("#guarantorid, #contactname, #contactfirstname").each(function () { this.value = "" });
14 $("#contactname, #contactfirstname")
15 .each(function () { this.type = 'text' })
16 .parent().find('span').remove();
17 $("#guarantorsearch").val("Set to Patron");
19 $("#select_city").change(function(){
20 var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
21 document.form.select_city.value.match(myRegEx);
22 document.form.zipcode.value=RegExp.$1;
23 document.form.city.value=RegExp.$2;
24 document.form.state.value=RegExp.$3;
25 document.form.country.value=RegExp.$4;
29 update_category_code( "[% categorycode %]" );
31 if ( $("#categorycode_entry").length > 0 ){
32 var category_code = $("#categorycode_entry").find("option:selected").val();
33 update_category_code( category_code );
36 $("#dateofbirth").datepicker({ maxDate: "-1D" });
37 $("#entryform").validate({
38 submitHandler: function(form) {
39 $("body, form input[type='submit'], form button[type='submit'], form a").addClass('waiting');
40 if (form.beenSubmitted)
43 form.beenSubmitted = true;
48 var mrform = $("#manual_restriction_form");
49 var mrlink = $("#add_manual_restriction");
51 mrlink.on("click",function(e){
56 $("#cancel_manual_restriction").on("click",function(e){
57 $('#debarred_expiration').val('');
58 $('#add_debarment').val(0);
59 $('#debarred_comment').val('');
66 function clear_entry(node) {
67 var original = $(node).parent();
68 $("textarea", original).attr('value', '');
69 $("select", original).attr('value', '');
72 function clone_entry(node) {
73 var original = $(node).parent();
74 var clone = original.clone();
76 var newId = 50 + parseInt(Math.random() * 100000);
77 $("input,select,textarea", clone).attr('id', function() {
78 return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
80 $("input,select,textarea", clone).attr('name', function() {
81 return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
83 $("label", clone).attr('for', function() {
84 return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId);
86 $("input#patron_attr_" + newId, clone).attr('value','');
87 $("select#patron_attr_" + newId, clone).attr('value','');
88 $(original).after(clone);
92 function update_category_code(category_code) {
93 if ( $(category_code).is("select") ) {
94 category_code = $("#categorycode_entry").find("option:selected").val();
96 var mytables = $(".attributes_table");
97 $(mytables).find("li").hide();
98 $(mytables).find(" li[data-category_code='"+category_code+"']").show();
99 $(mytables).find(" li[data-category_code='']").show();
102 function select_user(borrowernumber, borrower) {
103 var form = $('#entryform').get(0);
104 if (form.guarantorid.value) {
105 $("#contact-details").find('a').remove();
106 $("#contactname, #contactfirstname").parent().find('span').remove();
109 var id = borrower.borrowernumber;
110 form.guarantorid.value = id;
111 $('#contact-details')
114 .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
117 .val(borrower.surname)
118 .before('<span>' + borrower.surname + '</span>').get(0).type = 'hidden';
119 $(form.contactfirstname)
120 .val(borrower.firstname)
121 .before('<span>' + borrower.firstname + '</span>').get(0).type = 'hidden';
123 form.streetnumber.value = borrower.streetnumber;
124 form.address.value = borrower.address;
125 form.address2.value = borrower.address2;
126 form.city.value = borrower.city;
127 form.state.value = borrower.state;
128 form.zipcode.value = borrower.zipcode;
129 form.country.value = borrower.country;
130 form.branchcode.value = borrower.branchcode;
132 form.guarantorsearch.value = 'Change';
139 var MSG_SEPARATOR = _("Separator must be / in field %s");
140 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
141 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
142 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
143 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
144 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
145 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
146 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
147 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
150 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
152 <body id="pat_memberentrygen" class="pat">
153 [% INCLUDE 'header.inc' %]
154 [% INCLUDE 'patron-search.inc' %]
156 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
157 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
158 <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>
160 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
166 [% IF ( error_alert == "no_email" ) %]
167 <div class="error">This member has no email</div>
169 <div class="error">[% error_alert %]</div>
173 <div class="dialog message">Email has been sent.</div>
176 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
177 [% 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 %]
178 [% 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 %]
180 [% UNLESS ( no_add ) %]
181 <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>
183 [% IF ( check_member ) %]
184 <div class="dialog alert">
185 <h3>Duplicate patron record?</h3>
186 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');" >View existing record</a></p>
187 <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>
189 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
190 <input type="hidden" name="nodouble" value="1" />
191 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
196 <div class="dialog alert">
197 <p>The following fields are wrong. Please fix them.</p>
199 [% IF ( ERROR_login_exist ) %]
200 <li id="ERROR_login_exist">Username/password already exists.</li>
202 [% IF ERROR_cardnumber_already_exists %]
203 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
205 [% IF ERROR_cardnumber_length %]
206 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
208 [% IF ( ERROR_age_limitations ) %]
209 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
210 Ages allowed are [% age_low %]-[% age_high %].</li>
212 [% IF ( ERROR_branch ) %]
213 <li id="ERROR_branch">Library is invalid.</li>
215 [% IF ( ERROR_dateofbirth ) %]
216 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
218 [% IF ( ERROR_dateenrolled ) %]
219 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
221 [% IF ( ERROR_dateexpiry ) %]
222 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
224 [% IF ( ERROR_short_password ) %]
225 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
227 [% IF ( ERROR_password_mismatch ) %]
228 <li id="ERROR_password_mismatch">Passwords do not match.</li>
230 [% IF ( ERROR_extended_unique_id_failed ) %]
231 <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>
238 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
239 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
240 <!-- field always hidden in different form (1,2,3) -->
241 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
242 <input type="hidden" name="category_type" value="[% category_type %]" />
243 <input type="hidden" name="updtype" value="[% updtype %]" />
244 <input type="hidden" name="destination" value="[% destination %]" />
245 <input type="hidden" name="check_member" value="[% check_member %]" />
246 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
247 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
248 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
249 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
250 [% ELSIF ( opduplicate ) %]
251 <input type="hidden" name="op" value="insert" />
253 <input type="hidden" name="op" value="save" />
254 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
255 [%# Only put the cardnumber if we arent showing it in the form later %]
257 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
263 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
264 <fieldset class="rows" id="memberentry_identity">
265 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
269 [% IF ( title_cgipopup ) %]
271 [% IF ( mandatorytitle ) %]
272 <label for="btitle" class="required">
277 [% borrotitlepopup %]
278 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
283 [% UNLESS nosurname %]
285 [% IF ( mandatorysurname ) %]
286 <label for="surname" class="required">
288 <label for="surname">
291 [% IF ( uppercasesurnames ) %]
292 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
294 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
296 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
300 [% UNLESS nofirstname %]
302 [% IF ( mandatoryfirstname ) %]
303 <label for="firstname" class="required">
305 <label for="firstname">
308 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
309 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
312 [% UNLESS nodateofbirth %]
314 [% IF ( mandatorydateofbirth ) %]
315 <label for="dateofbirth" class="required">
317 <label for="dateofbirth">
319 Date of birth: </label>
321 [% IF ( dateformat == "metric" ) %]
322 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
324 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
327 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
328 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
329 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
332 [% UNLESS noinitials %]
334 [% IF ( mandatoryinitials ) %]
335 <label for="initials" class="required">
337 <label for="initials">
340 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
341 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
345 [% UNLESS noothernames %]
347 [% IF ( mandatoryothernames ) %]
348 <label for="othernames" class="required">
350 <label for="othernames">
353 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
354 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
355 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
362 [% UNLESS ( opduplicate ) %]
364 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
366 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
369 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
371 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
374 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
376 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
379 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
380 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
381 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
389 [% END # hide fieldset %]
391 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
392 <fieldset class="rows">
393 <legend>Guarantor information</legend>
396 [% IF ( guarantorid ) %]
397 <li id="contact-details">
399 <li id="contact-details" style="display: none">
401 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
404 <label for="contactname">Organization name: </label>
405 [% IF ( guarantorid ) %]
406 <span>[% contactname %]</span>
407 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
409 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
414 [% IF ( guarantorid ) %]
415 <li id="contact-details">
417 <li id="contact-details" style="display: none">
419 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
421 [% UNLESS nocontactname %]
423 <label for="contactname">Surname: </label>
424 [% IF ( guarantorid ) %]
425 <span>[% contactname %]</span>
426 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
428 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
432 [% UNLESS nocontactfirstname %]
434 <label for="contactfirstname">First name: </label>
435 [% IF ( guarantorid ) %]
436 <span>[% contactfirstname %]</span>
437 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
439 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
443 [% IF ( relshiploop ) %]
445 <label for="relationship">Relationship: </label>
446 <select name="relationship" id="relationship" >
447 [% FOREACH relshiploo IN relshiploop %]
448 [% IF ( relshiploo.selected ) %]
449 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
451 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
460 <span class="label"> </span>
461 [% IF ( guarantorid ) %]
462 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
464 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
466 <input id="guarantordelete" type="button" value="Delete" />
472 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
473 [% IF Koha.Preference( 'addressformat' ) %]
474 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
476 [% INCLUDE 'member-main-address-style-us.inc' %]
478 [% END # nostreet && nocity etc group%]
480 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
481 <fieldset class="rows" id="memberentry_contact">
482 <legend id="contact_lgd">Contact</legend><ol>
485 [% IF ( mandatoryphone ) %]
486 <label for="phone" class="required">
490 Primary phone: </label>
491 <input type="text" id="phone" name="phone" value="[% phone %]" />
492 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
496 [% UNLESS nophonepro %]
498 [% IF ( mandatoryphonepro ) %]
499 <label for="phonepro" class="required">
501 <label for="phonepro">
503 Secondary phone: </label>
504 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
505 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
508 [% UNLESS nomobile %]
510 [% IF ( mandatorymobile ) %]
511 <label for="mobile" class="required">
515 Other phone: </label>
516 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
517 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
522 [% IF ( mandatoryemail ) %]
523 <label for="email" class="required">
527 Primary email: </label>
528 <input type="text" id="email" name="email" size="45" value="[% email %]" />
529 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
533 [% UNLESS noemailpro %]
535 [% IF ( mandatoryemailpro ) %]
536 <label for="emailpro" class="required">
538 <label for="emailpro">
540 Secondary email: </label>
541 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
542 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
547 [% IF ( mandatoryfax ) %]
548 <label for="fax" class="required">
553 <input type="text" id="fax" name="fax" value="[% fax %]" />
554 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
559 [%END # hide fieldset %]
561 <!-- ************************ STEP_1 *********************** -->
565 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
566 [% IF Koha.Preference( 'addressformat' ) %]
567 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
569 [% INCLUDE 'member-alt-address-style-us.inc' %]
571 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
574 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
575 [% IF Koha.Preference( 'addressformat' ) %]
576 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
578 [% INCLUDE 'member-alt-contact-style-us.inc' %]
580 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
585 <fieldset class="rows" id="memberentry_library_management">
586 <legend id="library_management_lgd">Library management</legend><ol>
587 [% UNLESS nocardnumber %]
589 [% IF ( mandatorycardnumber ) %]
590 <label for="cardnumber" class="required">
592 <label for="cardnumber" class="validated">
594 Card number: </label>
595 [% IF minlength_cardnumber == maxlength_cardnumber %]
596 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" title="exactly [% minlength_cardnumber %] characters" />
597 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
598 <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" />
599 [% ELSIF maxlength_cardnumber %]
600 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" title="up to [% maxlength_cardnumber %] characters" />
602 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
604 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
607 [% UNLESS nobranchcode %]
609 <label for="libraries" class="required">Library:</label>
610 <select name="branchcode" size="1" id="libraries">
611 [%- FOREACH branchloo IN branchloop %]
612 [% IF ( branchloo.selected ) -%]
613 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
615 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
619 <span class="required">Required</span>
623 <label for="categorycode_entry" class="required">Category: </label>
624 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
625 [% FOREACH typeloo IN typeloop %]
626 [% FOREACH categoryloo IN typeloo.categoryloop %]
627 [% IF ( loop.first ) %]
628 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
629 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
630 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
631 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
632 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
633 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
635 [% IF ( categoryloo.categorycodeselected ) %]
636 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
638 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
640 [% IF ( loop.last ) %]
646 <span class="required">Required</span>
650 [% IF ( mandatorysort1 ) %]
651 <label for="sort1" class="required">
656 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
657 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
662 [% IF ( mandatorysort2 ) %]
663 <label for="sort2" class="required">
668 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
669 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
672 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
674 <label for="sort2">Sync with the Norwegian national patron database:</label>
675 [% IF ( sync == 0 ) %]
676 <input type="radio" id="sync" name="sync" value="1"> Yes
677 <input type="radio" id="sync" name="sync" value="0" checked> No
679 <input type="radio" id="sync" name="sync" value="1" checked> Yes
680 <input type="radio" id="sync" name="sync" value="0"> No
686 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
687 <fieldset class="rows" id="memberentry_subscription">
688 <legend id="library_setup_lgd">Library set-up</legend><ol>
689 [% UNLESS nodateenrolled %]
691 [% IF ( mandatorydateenrolled ) %]
692 <label for="from" class="required">
696 Registration date: </label>
697 [% IF ( dateformat == "metric" ) %]
698 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
700 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
702 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
703 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
704 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
707 [% UNLESS nodateexpiry %]
710 <li style="display:none">
712 [% IF ( mandatorydateexpiry ) %]
713 <label for="to" class="required">
717 Expiry date (leave blank for auto calc) </label>
718 [% IF ( dateformat == "metric" ) %]
719 [% UNLESS ( opadd ) %]
720 <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" />
722 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
725 [% UNLESS ( opadd ) %]
726 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
728 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
731 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
732 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
733 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
735 [% UNLESS noopacnote %]
737 [% IF ( mandatoryopacnote ) %]
738 <label for="opacnote" class="required">
740 <label for="opacnote">
743 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
744 <div class="hint">This message appears on this patron's user page in the OPAC</div>
745 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
748 [% UNLESS noborrowernotes %]
750 [% IF ( mandatoryborrowernotes ) %]
751 <label for="borrowernotes" class="required">
753 <label for="borrowernotes">
755 Circulation note: </label>
756 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
757 <div class="hint">This message displays when checking out to this patron</div>
758 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
763 [% END # hide fieldset %]
765 [% UNLESS nouserid && nopassword %]
766 <fieldset class="rows" id="memberentry_userid">
767 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
768 [% UNLESS nouserid %]
770 [% IF ( mandatoryuserid ) %]
771 <label for="userid" class="required">
777 [% IF ( NoUpdateLogin ) %]
778 [% IF ( opduplicate ) %]
779 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
781 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
784 [% IF ( opduplicate ) %]
785 <input type="text" id="userid" name="userid" size="20" value="" />
787 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
791 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
794 [% UNLESS nopassword %]
796 [% IF ( mandatorypassword ) %]
797 <label for="password" class="required">
799 <label for="password">
803 [% IF ( NoUpdateLogin ) %]
804 [% IF ( opduplicate ) %]
805 <input type="password" id="password" name="password" size="20" disabled="disabled" />
807 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
810 [% IF ( opduplicate ) %]
811 <input type="password" id="password" name="password" size="20" />
813 <input type="password" id="password" name="password" size="20" value="[% password %]" />
817 [% IF ( password ) %]
818 [% IF ( NoUpdateLogin ) %]
819 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
821 [% IF ( opduplicate ) %]
822 <input type="password" id="password" name="password" size="20" />
824 <input type="password" id="password" name="password" size="20" value="****" />
828 [% IF ( NoUpdateLogin ) %]
829 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
831 <input type="password" id="password" name="password" size="20" value="" />
835 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
836 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
839 [% IF ( mandatorypassword ) %]
840 <label for="password2" class="required">
842 <label for="password2">
844 Confirm password: </label>
846 [% IF ( NoUpdateLogin ) %]
847 [% IF ( opduplicate ) %]
848 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
850 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
853 [% IF ( opduplicate ) %]
854 <input type="password" id="password2" name="password2" size="20" />
856 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
860 [% IF ( password ) %]
861 [% IF ( NoUpdateLogin ) %]
862 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
864 [% IF ( opduplicate ) %]
865 <input type="password" id="password2" name="password2" size="20" />
867 <input type="password" id="password2" name="password2" size="20" value="****" />
871 [% IF ( NoUpdateLogin ) %]
872 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
874 <input type="password" id="password2" name="password2" size="20" value="" />
878 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
882 [% END # hide fieldset %][% END %]
883 <!--this zones are not necessary in modif mode -->
884 [% UNLESS ( opadd || opduplicate ) %]
885 <fieldset class="rows">
886 <legend>Patron account flags</legend>
888 [% FOREACH flagloo IN flagloop %]
889 <li><label class="radio" for="yes[% flagloo.name %]">
890 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
891 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
893 [% IF CAN_user_circulate_manage_restrictions %]
894 <label for="yes[% flagloo.name %]">Yes </label>
895 [% IF ( flagloo.yes ) %]
896 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
898 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
900 <label for="no[% flagloo.name %]">No </label>
901 [% IF ( flagloo.no ) %]
902 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
904 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
907 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
916 <fieldset class="rows">
917 <legend>Patron restrictions</legend>
919 [% IF ( debarments.size < 1 ) %]
920 <p>Patron is currently unrestricted.</p>
928 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
935 [% FOREACH d IN debarments %]
937 <td>[% d.type %]</td>
938 <td>[% d.comment %]</td>
939 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
940 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
942 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
950 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
951 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
952 <fieldset id="manual_restriction_form">
953 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
954 <legend>Add manual restriction</legend>
956 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
957 <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);" />
958 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
962 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
971 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
972 <fieldset class="rows" id="memberentry_patron_attributes">
973 <legend>Additional attributes and identifiers</legend>
974 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
975 [% FOREACH pa_loo IN patron_attributes %]
976 [% IF pa_loo.class %]
977 <fieldset id="aai_[% pa_loo.class %]">
978 <legend>[% pa_loo.lib %]</legend>
980 <ol class="attributes_table">
981 [% FOREACH patron_attribute IN pa_loo.items %]
982 <li data-category_code="[% patron_attribute.category_code %]">
983 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
984 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
985 [% IF ( patron_attribute.use_dropdown ) %]
986 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
987 <option value=""></option>
988 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
989 [% IF ( auth_val_loo.selected ) %]
990 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
991 [% auth_val_loo.lib %]
994 <option value="[% auth_val_loo.authorised_value %]" >
995 [% auth_val_loo.lib %]
1001 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1003 [% IF ( patron_attribute.password_allowed ) %]
1004 (<label class="yesno" for="[% patron_attribute.form_id %]_password">Password:</label> <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1005 id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1007 <a href="#" class="clear-field" onclick="clear_entry(this); return false;">Clear</a>
1008 [% IF ( patron_attribute.repeatable ) %]
1009 <a href="#" class="clone-field" onclick="clone_entry(this); return false;">New</a>
1014 [% IF pa_loo.class %]</fieldset>[% END %]
1017 [% END %][% END %][% END %]
1019 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1020 <fieldset class="rows" id="memberentry_messaging_prefs">
1021 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1023 <!-- handle changing prefs if creating new patron and changing
1026 <script type="text/javascript">//<![CDATA[
1027 $(document).ready(function(){
1028 var message_prefs_dirty = false;
1029 $('#memberentry_messaging_prefs > *').change(function() {
1030 message_prefs_dirty = true;
1032 $('#categorycode_entry').change(function() {
1033 var categorycode = $(this).val();
1034 if (message_prefs_dirty) {
1035 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1039 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1041 $.each(data.messaging_preferences, function(i, item) {
1042 var attrid = item.message_attribute_id;
1043 var transports = ['email', 'rss', 'sms'];
1044 $.each(transports, function(j, transport) {
1045 if (item['transports_' + transport] == 1) {
1046 $('#' + transport + attrid).attr('checked', 'checked');
1048 $('#' + transport + attrid).removeAttr('checked');
1051 if (item.digest && item.digest != ' ') {
1052 $('#digest' + attrid).attr('checked', item.digest);
1054 $('#digest' + attrid).removeAttr('checked');
1056 if (item.takes_days == '1') {
1057 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1060 message_prefs_dirty = false;
1068 <input type="hidden" name="setting_messaging_prefs" value="1" />
1070 <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>
1072 [% INCLUDE 'messaging-preference-form.inc' %]
1073 [% IF ( SMSSendDriver ) %]
1074 <p><label for="SMSnumber">SMS number:</label>
1075 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1081 [% UNLESS ( check_member ) %]
1082 <fieldset class="action">
1083 <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1085 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1087 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1096 [% UNLESS ( opadd ) %]<div class="yui-b">
1097 [% INCLUDE 'members-menu.inc' %]
1101 [% INCLUDE 'intranet-bottom.inc' %]