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 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
7 [% INCLUDE 'calendar.inc' %]
8 <script type="text/javascript">
10 $(document).ready(function() {
12 var original_offset = $("#toolbar").position().top;
13 var additional_height = $("#filters").height();
14 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
15 $("#filteraction_on").on("click", function(){
16 $(window).off('scroll');
17 $("#toolbar").css({ top: original_offset });
18 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
20 $("#filteraction_off").on("click", function(){
21 $(window).off('scroll');
22 $("#toolbar").css({ top: original_offset - additional_height});
23 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
27 update_category_code( "[% categorycode %]" );
29 if ( $("#categorycode_entry").length > 0 ){
30 var category_code = $("#categorycode_entry").find("option:selected").val();
31 update_category_code( category_code );
36 $(document).ready(function() {
38 var toggle_quick_add = $(".toggle_quick_add");
39 $(toggle_quick_add).click(function(e){
40 toggle_quick_add.toggle();
44 if( $("#entryform:visible").length ) {
45 toggle_to = "#quick_add_form label";
46 toggle_from = "#entryform label";
48 toggle_to="#entryform label";
49 toggle_from = "#quick_add_form label";
51 $(toggle_from).each(function() {
52 var input_label = $(this).attr('for');
53 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
54 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
57 if( $(this).next().val() != '' ) { $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );}
60 $(".toggler").toggle();
63 $(".save_quick_add").click(function(){
64 $("#quick_add_form").validate();
65 if( $("#quick_add_form").valid()){
66 $('.toggle_quick_add').click();
67 $('#entryform button[name="save"]').click();
74 var MSG_SEPARATOR = _("Separator must be / in field %s");
75 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
76 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
77 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
78 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
79 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
80 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
81 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
82 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
83 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
84 var MSG_MONTH = _("%s month")
85 var MSG_MONTHS = _("%s months")
86 var MSG_YEAR = _("%s year")
87 var MSG_YEARS = _("%s years")
88 var LABEL_CHANGE = _("Change");
89 var LABEL_SET_TO_PATRON = _("Set to patron");
90 var LABEL_AGE = _("Age");
94 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
96 <body id="pat_memberentrygen" class="pat">
97 [% INCLUDE 'header.inc' %]
98 [% INCLUDE 'patron-search.inc' %]
100 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
101 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
102 <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>
104 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
110 [% IF ( error_alert == "no_email" ) %]
111 <div class="error">This member has no email</div>
113 <div class="error">[% error_alert %]</div>
117 <div class="dialog message">Email has been sent.</div>
120 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
121 [% IF ( no_branches ) %]<p><strong>There are no libraries defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/branches.pl">Please add a library.</a>[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
122 [% IF ( no_categories ) %]<p><strong>There are no patron categories defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categories.pl">Please add a patron category.</a>[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
124 [% UNLESS ( no_add ) %]
125 <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>
127 [% IF quickadd && opadd && !check_member %]
128 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
129 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
132 [% IF ( check_member ) %]
133 <div class="dialog alert">
134 <h3>Duplicate patron record?</h3>
135 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
136 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
137 <input type="hidden" name="op" value="modify" />
138 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
139 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
140 Edit existing record</button>
143 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
144 <input type="hidden" name="nodouble" value="1" />
145 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
146 Save as new record</button>
151 <div class="dialog alert">
152 <p>The following fields are wrong. Please fix them.</p>
154 [% IF ( ERROR_login_exist ) %]
155 <li id="ERROR_login_exist">Username/password already exists.</li>
157 [% IF ERROR_cardnumber_already_exists %]
158 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
160 [% IF ERROR_cardnumber_length %]
161 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
163 [% IF ( ERROR_age_limitations ) %]
164 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
165 Ages allowed are [% age_low %]-[% age_high %].</li>
167 [% IF ( ERROR_branch ) %]
168 <li id="ERROR_branch">Library is invalid.</li>
170 [% IF ( ERROR_dateofbirth ) %]
171 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
173 [% IF ( ERROR_dateenrolled ) %]
174 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
176 [% IF ( ERROR_dateexpiry ) %]
177 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
179 [% IF ( ERROR_short_password ) %]
180 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
182 [% IF ( ERROR_password_mismatch ) %]
183 <li id="ERROR_password_mismatch">Passwords do not match.</li>
185 [% IF ( ERROR_extended_unique_id_failed ) %]
186 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value %]" is already in use by another patron record.</li>
188 [% IF ERROR_bad_email %]
189 <li id="ERROR_bad_email">The primary email is invalid.</li>
191 [% IF ERROR_bad_email_secondary %]
192 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
194 [% IF ERROR_bad_email_alternative %]
195 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
202 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
203 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
204 <!-- field always hidden in different form (1,2,3) -->
205 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
206 <input type="hidden" name="category_type" value="[% category_type %]" />
207 <input type="hidden" name="updtype" value="[% updtype %]" />
208 <input type="hidden" name="destination" value="[% destination %]" />
209 <input type="hidden" name="check_member" value="[% check_member %]" />
210 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
211 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
212 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
213 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
214 [% ELSIF ( opduplicate ) %]
215 <input type="hidden" name="op" value="insert" />
217 <input type="hidden" name="op" value="save" />
218 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
219 [%# Only put the cardnumber if we arent showing it in the form later %]
221 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
225 <div id="toolbar" class="btn-toolbar">
226 [% UNLESS ( check_member ) %]
227 <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();"><i class="fa fa-save"></i> Save</button>
229 <a class="btn btn-small" href="/cgi-bin/koha/members/member.pl">
231 <a class="btn btn-small" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
233 <i class="fa fa-times"></i> Cancel
239 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
240 <fieldset class="rows" id="memberentry_identity">
241 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
245 [% IF ( title_cgipopup ) %]
247 [% IF ( mandatorytitle ) %]
248 <label for="btitle" class="required">
253 [% borrotitlepopup %]
254 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
259 [% UNLESS nosurname %]
261 [% IF ( mandatorysurname ) %]
262 <label for="surname" class="required">
264 <label for="surname">
267 [% IF ( uppercasesurnames ) %]
268 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
270 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
272 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
276 [% UNLESS nofirstname %]
278 [% IF ( mandatoryfirstname ) %]
279 <label for="firstname" class="required">
281 <label for="firstname">
284 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
285 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
288 [% UNLESS nodateofbirth %]
290 [% IF ( mandatorydateofbirth ) %]
291 <label for="dateofbirth" class="required">
293 <label for="dateofbirth">
295 Date of birth: </label>
297 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
299 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
300 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
301 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
304 [% UNLESS noinitials %]
306 [% IF ( mandatoryinitials ) %]
307 <label for="initials" class="required">
309 <label for="initials">
312 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
313 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
317 [% UNLESS noothernames %]
319 [% IF ( mandatoryothernames ) %]
320 <label for="othernames" class="required">
322 <label for="othernames">
325 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
326 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
327 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
334 [% UNLESS ( opduplicate ) %]
336 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
338 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
341 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
343 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
346 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
348 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
351 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
352 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
353 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
361 [% END # hide fieldset %]
363 [% IF ( showguarantor ) %]
364 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
366 <input type="hidden" name="branchcode" value="[% branchcode %]" />
368 <fieldset id="memberentry_guarantor" class="rows">
369 <legend id="guarantor_lgd">Guarantor information</legend>
372 [% IF ( guarantorid ) %]
373 <li id="contact-details">
375 <li id="contact-details" style="display: none">
377 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
380 <label for="contactname">Organization name: </label>
381 [% IF ( guarantorid ) %]
382 <span>[% contactname %]</span>
383 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
385 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
390 [% IF ( guarantorid ) %]
391 <li id="contact-details">
393 <li id="contact-details" style="display: none">
395 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
397 [% UNLESS nocontactname %]
399 <label for="contactname">Surname: </label>
400 [% IF ( guarantorid ) %]
401 <span>[% contactname %]</span>
402 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
404 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
408 [% UNLESS nocontactfirstname %]
410 <label for="contactfirstname">First name: </label>
411 [% IF ( guarantorid ) %]
412 <span>[% contactfirstname %]</span>
413 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
415 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
419 [% IF ( relshiploop ) %]
421 <label for="relationship">Relationship: </label>
422 <select name="relationship" id="relationship" >
423 [% FOREACH relshiploo IN relshiploop %]
424 [% IF ( relshiploo.selected ) %]
425 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
427 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
436 <span class="label"> </span>
437 [% IF ( guarantorid ) %]
438 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
440 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
442 <input id="guarantordelete" type="button" value="Delete" />
444 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
446 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
447 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
448 [% IF privacy_guarantor_checkouts %]
449 <option value="0">No</option>
450 <option value="1" selected>Yes</option>
452 <option value="0" selected>No</option>
453 <option value="1">Yes</option>
456 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
463 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
464 [% IF Koha.Preference( 'AddressFormat' ) %]
465 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
467 [% INCLUDE 'member-main-address-style-us.inc' %]
469 [% END # nostreet && nocity etc group%]
471 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
472 <fieldset class="rows" id="memberentry_contact">
473 <legend id="contact_lgd">Contact</legend><ol>
476 [% IF ( mandatoryphone ) %]
477 <label for="phone" class="required">
481 Primary phone: </label>
482 <input type="text" id="phone" name="phone" value="[% phone %]" />
483 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
487 [% UNLESS nophonepro %]
489 [% IF ( mandatoryphonepro ) %]
490 <label for="phonepro" class="required">
492 <label for="phonepro">
494 Secondary phone: </label>
495 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
496 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
499 [% UNLESS nomobile %]
501 [% IF ( mandatorymobile ) %]
502 <label for="mobile" class="required">
506 Other phone: </label>
507 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
508 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
513 [% IF ( mandatoryemail ) %]
514 <label for="email" class="required">
518 Primary email: </label>
519 <input type="text" id="email" name="email" size="45" value="[% email %]" />
520 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
524 [% UNLESS noemailpro %]
526 [% IF ( mandatoryemailpro ) %]
527 <label for="emailpro" class="required">
529 <label for="emailpro">
531 Secondary email: </label>
532 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
533 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
538 [% IF ( mandatoryfax ) %]
539 <label for="fax" class="required">
544 <input type="text" id="fax" name="fax" value="[% fax %]" />
545 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
550 [%END # hide fieldset %]
552 <!-- ************************ STEP_1 *********************** -->
556 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
557 [% IF Koha.Preference( 'AddressFormat' ) %]
558 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
560 [% INCLUDE 'member-alt-address-style-us.inc' %]
562 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
565 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
566 [% IF Koha.Preference( 'AddressFormat' ) %]
567 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
569 [% INCLUDE 'member-alt-contact-style-us.inc' %]
571 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
576 <fieldset class="rows" id="memberentry_library_management">
577 <legend id="library_management_lgd">Library management</legend><ol>
578 [% UNLESS nocardnumber %]
580 [% IF ( mandatorycardnumber ) %]
581 <label for="cardnumber" class="required">
583 <label for="cardnumber" class="validated">
585 Card number: </label>
586 [% IF minlength_cardnumber == maxlength_cardnumber %]
587 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
588 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
589 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
590 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
591 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
592 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
593 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
594 [% ELSIF maxlength_cardnumber %]
595 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
596 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
597 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
599 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
600 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
601 <div class="hint">There is no minimum or maximum character length.</div>
605 [% UNLESS nobranchcode %]
607 <label for="libraries" class="required">Library:</label>
608 <select name="branchcode" size="1" id="libraries">
609 [%- FOREACH branchloo IN branchloop %]
610 [% IF ( branchloo.selected ) -%]
611 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
613 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
617 <span class="required">Required</span>
621 <label for="categorycode_entry" class="required">Category: </label>
622 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
623 [% FOREACH typeloo IN typeloop %]
624 [% FOREACH categoryloo IN typeloo.categoryloop %]
625 [% IF ( loop.first ) %]
626 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
627 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
628 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
629 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
630 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
631 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
633 [% IF ( categoryloo.categorycodeselected ) %]
634 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
636 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
638 [% IF ( loop.last ) %]
644 <span class="required">Required</span>
648 [% IF ( mandatorysort1 ) %]
649 <label for="sort1" class="required">
654 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
655 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
660 [% IF ( mandatorysort2 ) %]
661 <label for="sort2" class="required">
666 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
667 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
670 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
672 <label for="sort2">Sync with the Norwegian national patron database:</label>
673 [% IF ( sync == 0 ) %]
674 <input type="radio" id="sync" name="sync" value="1"> Yes
675 <input type="radio" id="sync" name="sync" value="0" checked> No
677 <input type="radio" id="sync" name="sync" value="1" checked> Yes
678 <input type="radio" id="sync" name="sync" value="0"> No
684 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
685 <fieldset class="rows" id="memberentry_subscription">
686 <legend id="library_setup_lgd">Library set-up</legend><ol>
687 [% UNLESS nodateenrolled %]
689 [% IF ( mandatorydateenrolled ) %]
690 <label for="from" class="required">
694 Registration date: </label>
695 [% IF ( dateformat == "metric" ) %]
696 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
698 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
700 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
701 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
702 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
705 [% UNLESS nodateexpiry %]
708 <li style="display:none">
710 [% IF ( mandatorydateexpiry ) %]
711 <label for="to" class="required">
715 Expiry date (leave blank for auto calc): </label>
716 [% IF ( dateformat == "metric" ) %]
717 [% UNLESS ( opadd ) %]
718 <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" />
720 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
723 [% UNLESS ( opadd ) %]
724 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
726 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
729 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
730 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
731 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
733 [% UNLESS noopacnote %]
735 [% IF ( mandatoryopacnote ) %]
736 <label for="opacnote" class="required">
738 <label for="opacnote">
741 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
742 <div class="hint">This message appears on this patron's user page in the OPAC</div>
743 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
746 [% UNLESS noborrowernotes %]
748 [% IF ( mandatoryborrowernotes ) %]
749 <label for="borrowernotes" class="required">
751 <label for="borrowernotes">
753 Circulation note: </label>
754 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
755 <div class="hint">This message displays when checking out to this patron</div>
756 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
761 [% END # hide fieldset %]
763 [% UNLESS nouserid && nopassword %]
764 <fieldset class="rows" id="memberentry_userid">
765 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
766 [% UNLESS nouserid %]
768 [% IF ( mandatoryuserid ) %]
769 <label for="userid" class="required">
775 [% IF ( NoUpdateLogin ) %]
776 [% IF ( opduplicate ) %]
777 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
779 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
782 [% IF ( opduplicate ) %]
783 <input type="text" id="userid" name="userid" size="20" value="" />
785 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
789 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
790 <input type="text" disabled="disabled" style="display:none" />
792 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
795 [% UNLESS nopassword %]
797 [% IF ( mandatorypassword ) %]
798 <label for="password" class="required">
800 <label for="password">
804 [% IF ( NoUpdateLogin ) %]
805 [% IF ( opduplicate ) %]
806 <input type="password" id="password" name="password" size="20" disabled="disabled" />
808 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
811 [% IF ( opduplicate ) %]
812 <input type="password" id="password" name="password" size="20" />
814 <input type="password" id="password" name="password" size="20" value="[% password %]" />
818 [% IF ( password ) %]
819 [% IF ( NoUpdateLogin ) %]
820 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
822 [% IF ( opduplicate ) %]
823 <input type="password" id="password" name="password" size="20" />
825 <input type="password" id="password" name="password" size="20" value="****" />
829 [% IF ( NoUpdateLogin ) %]
830 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
832 <input type="password" id="password" name="password" size="20" value="" />
836 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
837 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
840 [% IF ( mandatorypassword ) %]
841 <label for="password2" class="required">
843 <label for="password2">
845 Confirm password: </label>
847 [% IF ( NoUpdateLogin ) %]
848 [% IF ( opduplicate ) %]
849 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
851 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
854 [% IF ( opduplicate ) %]
855 <input type="password" id="password2" name="password2" size="20" />
857 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
861 [% IF ( password ) %]
862 [% IF ( NoUpdateLogin ) %]
863 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
865 [% IF ( opduplicate ) %]
866 <input type="password" id="password2" name="password2" size="20" />
868 <input type="password" id="password2" name="password2" size="20" value="****" />
872 [% IF ( NoUpdateLogin ) %]
873 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
875 <input type="password" id="password2" name="password2" size="20" value="" />
879 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
883 [% END # hide fieldset %][% END %]
884 <!--this zones are not necessary in modif mode -->
885 [% UNLESS ( opadd || opduplicate ) %]
886 <fieldset class="rows" id="memberentry_account_flags">
887 <legend id="account_flags_lgd">Patron account flags</legend>
889 [% FOREACH flagloo IN flagloop %]
890 <li><label class="radio" for="yes[% flagloo.name %]">
891 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
892 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
894 [% IF CAN_user_circulate_manage_restrictions %]
895 <label for="yes[% flagloo.name %]">Yes </label>
896 [% IF ( flagloo.yes ) %]
897 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
899 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
901 <label for="no[% flagloo.name %]">No </label>
902 [% IF ( flagloo.no ) %]
903 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
905 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
908 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
917 <fieldset class="rows" id="memberentry_restrictions">
918 <legend id="restrictions_lgd">Patron restrictions</legend>
920 [% IF ( debarments ) %]
927 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
934 [% FOREACH d IN debarments %]
936 <td>[% d.type %]</td>
937 <td>[% d.comment %]</td>
938 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
939 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
941 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
949 <p>Patron is currently unrestricted.</p>
952 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
953 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
954 <fieldset id="manual_restriction_form">
955 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
956 <legend id="manual_restriction_lgd">Add manual restriction</legend>
958 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
959 <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);" />
960 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
964 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
973 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
974 <fieldset class="rows" id="memberentry_patron_attributes">
975 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
976 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
977 [% FOREACH pa_loo IN patron_attributes %]
978 [% IF pa_loo.class %]
979 <fieldset id="aai_[% pa_loo.class %]">
980 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
982 <ol class="attributes_table">
983 [% FOREACH patron_attribute IN pa_loo.items %]
984 <li data-category_code="[% patron_attribute.category_code %]">
985 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
986 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
987 [% IF ( patron_attribute.use_dropdown ) %]
988 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
989 <option value=""></option>
990 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
991 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
992 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
993 [% auth_val_loo.lib %]
996 <option value="[% auth_val_loo.authorised_value %]" >
997 [% auth_val_loo.lib %]
1003 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1005 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1006 [% IF ( patron_attribute.repeatable ) %]
1007 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1012 [% IF pa_loo.class %]</fieldset>[% END %]
1015 [% END %][% END %][% END %]
1017 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1018 <fieldset class="rows" id="memberentry_messaging_prefs">
1019 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1021 <!-- handle changing prefs if creating new patron and changing
1024 <script type="text/javascript">//<![CDATA[
1025 $(document).ready(function(){
1026 var message_prefs_dirty = false;
1027 $('#memberentry_messaging_prefs > *').change(function() {
1028 message_prefs_dirty = true;
1030 $('#categorycode_entry').change(function() {
1031 var categorycode = $(this).val();
1032 if (message_prefs_dirty) {
1033 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1037 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1039 $.each(data.messaging_preferences, function(i, item) {
1040 var attrid = item.message_attribute_id;
1041 var transports = ['email', 'rss', 'sms'];
1042 $.each(transports, function(j, transport) {
1043 if (item['transports_' + transport] == 1) {
1044 $('#' + transport + attrid).prop('checked', true);
1046 $('#' + transport + attrid).prop('checked', false);
1049 if (item.digest && item.digest != ' ') {
1050 $('#digest' + attrid).prop('checked', true);
1052 $('#digest' + attrid).prop('checked', false);
1054 if (item.takes_days == '1') {
1055 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1058 message_prefs_dirty = false;
1066 <input type="hidden" name="setting_messaging_prefs" value="1" />
1067 [% INCLUDE 'messaging-preference-form.inc' %]
1068 [% IF ( SMSSendDriver ) %]
1069 <p><label for="SMSnumber">SMS number:</label>
1070 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1073 <label for="sms_provider_id">SMS provider:</label>
1074 <select id="sms_provider_id" name="sms_provider_id"/>
1075 <option value="">Unknown</option>
1076 [% FOREACH s IN sms_providers %]
1077 [% IF s.id == sms_provider_id %]
1078 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1080 <option value="[% s.id %]">[% s.name %]</option>
1091 [% IF quickadd && opadd && !check_member %]
1092 <form id="quick_add_form" class="toggler">
1093 <fieldset class="rows quick_add"><legend>Quick add</legend>
1094 <ol id="quick_add_list">
1097 <fieldset class="rows" id="qa-save">
1098 <fieldset class="action">
1099 <button type="button" class="save_quick_add" name="QA-Save">
1100 <i class="fa fa-save"></i> Save
1102 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1108 $(document).ready(function () {
1109 $("#entryform").hide();
1110 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1111 var qaddfields = "[% FOREACH field IN q_add_f.unique %][% field %] [% END %]";
1112 $("#entryform label").each(function () {
1113 var input_label = $(this).attr('for');
1114 if ( input_label == 'sex-female' ) { input_label='sex'; }
1115 else if ( input_label == 'btitle' ) { input_label='title'; }
1116 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1117 $(this).parent().clone().appendTo("#quick_add_list");
1118 if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1121 $("#quick_add_form").show();
1128 [% UNLESS ( opadd ) %]<div class="yui-b">
1129 [% INCLUDE 'members-menu.inc' %]
1133 [% INCLUDE 'intranet-bottom.inc' %]