4 [% INCLUDE 'doc-head-open.inc' %]
5 <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>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
8 [% INCLUDE 'calendar.inc' %]
9 <script type="text/javascript">
11 $(document).ready(function() {
13 $("#saverecord").css({ 'margin-left': 0 });
14 var original_offset = $("#toolbar").position().top;
15 var additional_height = $("#filters").height();
16 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
17 $("#filteraction_on").on("click", function(){
18 $(window).off('scroll');
19 $("#toolbar").css({ top: original_offset });
20 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
22 $("#filteraction_off").on("click", function(){
23 $(window).off('scroll');
24 $("#toolbar").css({ top: original_offset - additional_height});
25 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
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 );
38 $(document).ready(function() {
40 var toggle_quick_add = $(".toggle_quick_add");
41 $(toggle_quick_add).click(function(e){
42 toggle_quick_add.toggle();
46 if( $("#entryform:visible").length ) {
47 toggle_to = "#quick_add_form label";
48 toggle_from = "#entryform label";
50 toggle_to="#entryform label";
51 toggle_from = "#quick_add_form label";
53 $(toggle_from).each(function() {
54 var input_label = $(this).attr('for');
55 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
56 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
59 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
62 $(".toggler").toggle();
65 $("#save_quick_add").click(function(){
66 $("#quick_add_form").validate();
67 if( $("#quick_add_form").valid()){
68 $('.toggle_quick_add').click();
69 $('#saverecord').click();
73 $("#saverecord").click(function(){
74 if( check_form_borrowers() ){
75 $("#entryform").submit();
81 var MSG_SEPARATOR = _("Separator must be / in field %s");
82 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
83 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
84 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
85 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
86 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
87 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
88 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
89 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
90 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
91 var MSG_MONTH = _("%s month")
92 var MSG_MONTHS = _("%s months")
93 var MSG_YEAR = _("%s year")
94 var MSG_YEARS = _("%s years")
95 var LABEL_CHANGE = _("Change");
96 var LABEL_SET_TO_PATRON = _("Set to patron");
97 var LABEL_AGE = _("Age");
101 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
103 <body id="pat_memberentrygen" class="pat">
104 [% INCLUDE 'header.inc' %]
105 [% INCLUDE 'patron-search.inc' %]
107 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
108 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% END %]</a> ›[% END %]
109 <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>
111 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
117 [% IF ( error_alert == "no_email" ) %]
118 <div class="error">This member has no email</div>
120 <div class="error">[% error_alert %]</div>
124 <div class="dialog message">Email has been sent.</div>
127 [% INCLUDE 'noadd-warnings.inc' %]
129 [% UNLESS ( no_add ) %]
130 <h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% 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>
132 [% IF quickadd && opadd && !check_member %]
133 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
134 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
137 [% IF ( check_member ) %]
138 <div class="dialog alert">
139 <h3>Duplicate patron record?</h3>
140 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
141 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
142 <input type="hidden" name="op" value="modify" />
143 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
144 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
145 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
146 Edit existing record</button>
149 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
150 <input type="hidden" name="nodouble" value="1" />
151 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
152 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
153 Save as new record</button>
158 <div class="dialog alert">
159 <p>The following fields are wrong. Please fix them.</p>
161 [% IF ( ERROR_login_exist ) %]
162 <li id="ERROR_login_exist">Username/password already exists.</li>
164 [% IF ERROR_cardnumber_already_exists %]
165 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
167 [% IF ERROR_cardnumber_length %]
168 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
170 [% IF ( ERROR_age_limitations ) %]
171 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
172 Ages allowed are [% age_low %]-[% age_high %].</li>
174 [% IF ( ERROR_branch ) %]
175 <li id="ERROR_branch">Library is invalid.</li>
177 [% IF ( ERROR_dateofbirth ) %]
178 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
180 [% IF ( ERROR_dateenrolled ) %]
181 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
183 [% IF ( ERROR_dateexpiry ) %]
184 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
186 [% IF ( ERROR_short_password ) %]
187 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
189 [% IF ( ERROR_password_mismatch ) %]
190 <li id="ERROR_password_mismatch">Passwords do not match.</li>
192 [% IF ( ERROR_extended_unique_id_failed ) %]
193 <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>
195 [% IF ERROR_bad_email %]
196 <li id="ERROR_bad_email">The primary email is invalid.</li>
198 [% IF ERROR_bad_email_secondary %]
199 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
201 [% IF ERROR_bad_email_alternative %]
202 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
209 <div id="toolbar" class="btn-toolbar">
210 [% UNLESS ( check_member ) %]
211 [% IF quickadd && opadd %]
212 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
214 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
216 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
218 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
220 <i class="fa fa-times"></i> Cancel
225 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
226 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
227 <!-- field always hidden in different form (1,2,3) -->
228 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
229 <input type="hidden" name="category_type" value="[% category_type %]" />
230 <input type="hidden" name="updtype" value="[% updtype %]" />
231 <input type="hidden" name="destination" value="[% destination %]" />
232 <input type="hidden" name="check_member" value="[% check_member %]" />
233 <input type="hidden" name="borrowernumber" value="[% borrowernumber UNLESS opduplicate %]" />
234 <input type="hidden" name="nodouble" value="[% nodouble UNLESS opduplicate %]" />
235 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
236 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
237 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
238 [% ELSIF ( opduplicate ) %]
239 <input type="hidden" name="op" value="insert" />
241 <input type="hidden" name="op" value="save" />
242 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
243 [%# Only put the cardnumber if we arent showing it in the form later %]
245 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
251 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
252 <fieldset class="rows" id="memberentry_identity">
253 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
257 [% IF Koha.Preference('BorrowersTitles') %]
259 [% IF ( mandatorytitle ) %]
260 <label for="btitle" class="required">
265 <select id="btitle" name="title">
266 <option value=""></option>
267 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
269 <option value="[% t %]" selected="selected">[% t %]</option>
271 <option value="[% t %]">[% t %]</option>
275 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
280 [% UNLESS nosurname %]
282 [% IF ( mandatorysurname ) %]
283 <label for="surname" class="required">
285 <label for="surname">
288 [% IF ( uppercasesurnames ) %]
289 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
291 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
293 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
297 [% UNLESS nofirstname %]
299 [% IF ( mandatoryfirstname ) %]
300 <label for="firstname" class="required">
302 <label for="firstname">
305 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
306 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
309 [% UNLESS nodateofbirth %]
311 [% IF ( mandatorydateofbirth ) %]
312 <label for="dateofbirth" class="required">
314 <label for="dateofbirth">
316 Date of birth: </label>
318 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth UNLESS opduplicate %]" class="datepicker" />
320 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
321 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
322 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
325 [% UNLESS noinitials %]
327 [% IF ( mandatoryinitials ) %]
328 <label for="initials" class="required">
330 <label for="initials">
333 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
334 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
338 [% UNLESS noothernames %]
340 [% IF ( mandatoryothernames ) %]
341 <label for="othernames" class="required">
343 <label for="othernames">
346 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
347 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
348 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
355 [% UNLESS ( opduplicate ) %]
357 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
359 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
362 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
364 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
367 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
369 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
372 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
373 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
374 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
382 [% END # hide fieldset %]
384 [% IF ( showguarantor ) %]
385 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
387 <input type="hidden" name="branchcode" value="[% branchcode %]" />
389 <fieldset id="memberentry_guarantor" class="rows">
390 <legend id="guarantor_lgd">Guarantor information</legend>
393 [% IF ( guarantorid ) %]
394 <li id="contact-details">
396 <li id="contact-details" style="display: none">
398 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
401 <label for="contactname">Organization name: </label>
402 [% IF ( guarantorid ) %]
403 <span>[% contactname %]</span>
404 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
406 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
411 [% IF ( guarantorid ) %]
412 <li id="contact-details">
414 <li id="contact-details" style="display: none">
416 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
418 [% UNLESS nocontactname %]
420 <label for="contactname">Surname: </label>
421 [% IF ( guarantorid ) %]
422 <span>[% contactname %]</span>
423 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
425 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
429 [% UNLESS nocontactfirstname %]
431 <label for="contactfirstname">First name: </label>
432 [% IF ( guarantorid ) %]
433 <span>[% contactfirstname %]</span>
434 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
436 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
440 [% IF ( relshiploop ) %]
442 <label for="relationship">Relationship: </label>
443 <select name="relationship" id="relationship" >
444 [% FOREACH relshiploo IN relshiploop %]
445 [% IF ( relshiploo.selected ) %]
446 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
448 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
457 <span class="label"> </span>
458 [% IF ( guarantorid ) %]
459 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
461 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
463 <input id="guarantordelete" type="button" value="Delete" />
465 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
467 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
468 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
469 [% IF privacy_guarantor_checkouts %]
470 <option value="0">No</option>
471 <option value="1" selected>Yes</option>
473 <option value="0" selected>No</option>
474 <option value="1">Yes</option>
477 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
484 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
485 [% IF Koha.Preference( 'AddressFormat' ) %]
486 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
488 [% INCLUDE 'member-main-address-style-us.inc' %]
490 [% END # nostreet && nocity etc group%]
492 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
493 <fieldset class="rows" id="memberentry_contact">
494 <legend id="contact_lgd">Contact</legend><ol>
497 [% IF ( mandatoryphone ) %]
498 <label for="phone" class="required">
502 Primary phone: </label>
503 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
504 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
508 [% UNLESS nophonepro %]
510 [% IF ( mandatoryphonepro ) %]
511 <label for="phonepro" class="required">
513 <label for="phonepro">
515 Secondary phone: </label>
516 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
517 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
520 [% UNLESS nomobile %]
522 [% IF ( mandatorymobile ) %]
523 <label for="mobile" class="required">
527 Other phone: </label>
528 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
529 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
534 [% IF ( mandatoryemail ) %]
535 <label for="email" class="required">
539 Primary email: </label>
540 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
541 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
545 [% UNLESS noemailpro %]
547 [% IF ( mandatoryemailpro ) %]
548 <label for="emailpro" class="required">
550 <label for="emailpro">
552 Secondary email: </label>
553 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
554 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
559 [% IF ( mandatoryfax ) %]
560 <label for="fax" class="required">
565 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
566 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
571 [%END # hide fieldset %]
573 <!-- ************************ STEP_1 *********************** -->
577 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
578 [% IF Koha.Preference( 'AddressFormat' ) %]
579 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
581 [% INCLUDE 'member-alt-address-style-us.inc' %]
583 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
586 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
587 [% IF Koha.Preference( 'AddressFormat' ) %]
588 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
590 [% INCLUDE 'member-alt-contact-style-us.inc' %]
592 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
597 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
598 <fieldset class="rows" id="memberentry_library_management">
599 <legend id="library_management_lgd">Library management</legend><ol>
600 [% UNLESS nocardnumber %]
602 [% IF mandatorycardnumber and not autoMemberNum %]
603 <label for="cardnumber" class="required">
605 <label for="cardnumber" class="validated">
607 [% IF autoMemberNum %]
608 Card number<br>(<u>leave blank for auto calc during registration</u>): </label>
610 Card number: </label>
612 [% IF minlength_cardnumber == maxlength_cardnumber %]
613 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
614 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
615 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
616 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
617 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
618 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
619 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
620 [% ELSIF maxlength_cardnumber %]
621 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
622 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
623 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
625 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
626 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
627 <div class="hint">There is no minimum or maximum character length.</div>
631 [% UNLESS nobranchcode %]
633 <label for="libraries" class="required">Library:</label>
634 <select name="branchcode" size="1" id="libraries">
635 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch ) %]
637 <span class="required">Required</span>
641 <label for="categorycode_entry" class="required">Category: </label>
642 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
643 [% FOREACH typeloo IN typeloop %]
644 [% FOREACH categoryloo IN typeloo.categoryloop %]
645 [% IF ( loop.first ) %]
646 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
647 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
648 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
649 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
650 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
651 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
653 [% IF ( categoryloo.categorycodeselected ) %]
654 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
656 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
658 [% IF ( loop.last ) %]
664 <span class="required">Required</span>
668 [% IF ( mandatorysort1 ) %]
669 <label for="sort1" class="required">
674 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
675 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
680 [% IF ( mandatorysort2 ) %]
681 <label for="sort2" class="required">
686 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
687 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
690 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
692 <label for="sort2">Sync with the Norwegian national patron database:</label>
693 [% IF ( sync == 0 ) %]
694 <input type="radio" id="sync" name="sync" value="1"> Yes
695 <input type="radio" id="sync" name="sync" value="0" checked> No
697 <input type="radio" id="sync" name="sync" value="1" checked> Yes
698 <input type="radio" id="sync" name="sync" value="0"> No
702 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
703 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
704 <select name="checkprevcheckout" id="checkprevcheckout">
705 [% IF ( checkprevcheckout == 'yes' ) %]
706 <option value="yes" selected="selected">Yes if settings allow it</option>
707 <option value="no">No if settings allow it</option>
708 <option value="inherit">Inherit from settings</option>
709 [% ELSIF ( checkprevcheckout == 'no' ) %]
710 <option value="yes">Yes if settings allow it</option>
711 <option value="no" selected="selected">No if settings allow it</option>
712 <option value="inherit">Inherit from settings</option>
714 <option value="yes">Yes if settings allow it</option>
715 <option value="no">No if settings allow it</option>
716 <option value="inherit" selected="selected">Inherit from settings</option>
721 [% IF Koha.Preference('TranslateNotices') %]
723 <label for="lang">Preferred language for notices: </label>
724 <select id="lang" name="lang">
725 <option value="default">Default</option>
726 [% FOR language IN languages %]
727 [% FOR sublanguage IN language.sublanguages_loop %]
728 [% IF language.plural %]
729 [% IF sublanguage.rfc4646_subtag == lang %]
730 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
732 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
735 [% IF sublanguage.rfc4646_subtag == lang %]
736 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
738 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
748 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
749 <fieldset class="rows" id="memberentry_subscription">
750 <legend id="library_setup_lgd">Library set-up</legend><ol>
751 [% UNLESS nodateenrolled %]
753 [% IF ( mandatorydateenrolled ) %]
754 <label for="from" class="required">
758 Registration date: </label>
759 [% IF ( dateformat == "metric" ) %]
760 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
762 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
764 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
765 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
766 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
769 [% UNLESS nodateexpiry %]
772 <li style="display:none">
774 [% IF ( mandatorydateexpiry ) %]
775 <label for="to" class="required">
779 Expiry date (leave blank for auto calc): </label>
780 [% IF ( dateformat == "metric" ) %]
781 [% UNLESS ( opadd ) %]
782 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
784 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
787 [% UNLESS ( opadd ) %]
788 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
790 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
793 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
794 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
795 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
797 [% UNLESS noopacnote %]
799 [% IF ( mandatoryopacnote ) %]
800 <label for="opacnote" class="required">
802 <label for="opacnote">
805 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
806 <div class="hint">This message appears on this patron's user page in the OPAC</div>
807 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
810 [% UNLESS noborrowernotes %]
812 [% IF ( mandatoryborrowernotes ) %]
813 <label for="borrowernotes" class="required">
815 <label for="borrowernotes">
817 Circulation note: </label>
818 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
819 <div class="hint">This message displays when checking out to this patron</div>
820 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
825 [% END # hide fieldset %]
827 [% UNLESS nouserid && nopassword %]
828 <fieldset class="rows" id="memberentry_userid">
829 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
830 [% UNLESS nouserid %]
832 [% IF ( mandatoryuserid ) %]
833 <label for="userid" class="required">
839 [% IF ( NoUpdateLogin ) %]
840 [% IF ( opduplicate ) %]
841 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
843 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
846 [% IF ( opduplicate ) %]
847 <input type="text" id="userid" name="userid" size="20" value="" />
849 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
853 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
854 <input type="text" disabled="disabled" style="display:none" />
856 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
859 [% UNLESS nopassword %]
861 [% IF ( mandatorypassword ) %]
862 <label for="password" class="required">
864 <label for="password">
868 [% IF ( NoUpdateLogin ) %]
869 [% IF ( opduplicate ) %]
870 <input type="password" id="password" name="password" size="20" disabled="disabled" />
872 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
875 [% IF ( opduplicate ) %]
876 <input type="password" id="password" name="password" size="20" />
878 <input type="password" id="password" name="password" size="20" value="[% password %]" />
882 [% IF ( password ) %]
883 [% IF ( NoUpdateLogin ) %]
884 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
886 [% IF ( opduplicate ) %]
887 <input type="password" id="password" name="password" size="20" />
889 <input type="password" id="password" name="password" size="20" value="****" />
893 [% IF ( NoUpdateLogin ) %]
894 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
896 <input type="password" id="password" name="password" size="20" value="" />
900 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
901 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
904 [% IF ( mandatorypassword ) %]
905 <label for="password2" class="required">
907 <label for="password2">
909 Confirm password: </label>
911 [% IF ( NoUpdateLogin ) %]
912 [% IF ( opduplicate ) %]
913 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
915 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
918 [% IF ( opduplicate ) %]
919 <input type="password" id="password2" name="password2" size="20" />
921 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
925 [% IF ( password ) %]
926 [% IF ( NoUpdateLogin ) %]
927 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
929 [% IF ( opduplicate ) %]
930 <input type="password" id="password2" name="password2" size="20" />
932 <input type="password" id="password2" name="password2" size="20" value="****" />
936 [% IF ( NoUpdateLogin ) %]
937 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
939 <input type="password" id="password2" name="password2" size="20" value="" />
943 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
947 [% END # hide fieldset %][% END %]
948 <!--this zones are not necessary in modif mode -->
949 [% UNLESS ( opadd || opduplicate ) %]
950 <fieldset class="rows" id="memberentry_account_flags">
951 <legend id="account_flags_lgd">Patron account flags</legend>
953 [% FOREACH flagloo IN flagloop %]
954 <li><label class="radio" for="yes[% flagloo.name %]">
955 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
956 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
958 [% IF CAN_user_circulate_manage_restrictions %]
959 <label for="yes[% flagloo.name %]">
960 [% IF ( flagloo.yes ) %]
961 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
963 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
966 <label for="no[% flagloo.name %]">
967 [% IF ( flagloo.no ) %]
968 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
970 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
974 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
983 <fieldset class="rows" id="memberentry_restrictions">
984 <legend id="restrictions_lgd">Patron restrictions</legend>
986 [% IF ( debarments ) %]
993 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1000 [% FOREACH d IN debarments %]
1002 <td>[% d.type %]</td>
1004 [% IF d.comment.search('OVERDUES_PROCESS') %]
1005 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
1010 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
1011 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1013 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
1021 <p>Patron is currently unrestricted.</p>
1024 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1025 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1026 <fieldset id="manual_restriction_form">
1027 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1028 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1030 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1031 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1032 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1036 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1046 [% IF Koha.Preference('HouseboundModule') %]
1047 <fieldset class="rows" id="memberentry_housebound_roles">
1048 <legend id="housebound_roles">Housebound roles</legend>
1051 <label class="radio" for="housebound_chooser">
1054 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1055 <label for="yes_housebound_chooser">Yes </label>
1056 <input type="radio" id="yes_housebound_chooser"
1057 name="housebound_chooser" value="1"
1058 checked="checked" />
1059 <label for="no_housebound_chooser">No </label>
1060 <input type="radio" id="no_housebound_chooser"
1061 name="housebound_chooser" value="0" />
1063 <label for="yes_housebound_chooser">Yes </label>
1064 <input type="radio" id="yes_housebound_chooser"
1065 name="housebound_chooser" value="1" />
1066 <label for="no_housebound_chooser">No </label>
1067 <input type="radio" id="no_housebound_chooser"
1068 name="housebound_chooser" value="0"
1069 checked="checked" />
1073 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1074 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1075 <label for="yes_housebound_deliverer">Yes </label>
1076 <input type="radio" id="yes_housebound_deliverer"
1077 name="housebound_deliverer" value="1"
1078 checked="checked" />
1079 <label for="no_housebound_deliverer">No </label>
1080 <input type="radio" id="no_housebound_deliverer"
1081 name="housebound_deliverer" value="0" />
1083 <label for="yes_housebound_deliverer">Yes </label>
1084 <input type="radio" id="yes_housebound_deliverer"
1085 name="housebound_deliverer" value="1" />
1086 <label for="no_housebound_deliverer">No </label>
1087 <input type="radio" id="no_housebound_deliverer"
1088 name="housebound_deliverer" value="0"
1089 checked="checked" />
1094 [% END # hide fieldset %]
1095 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1096 <fieldset class="rows" id="memberentry_patron_attributes">
1097 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1098 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1099 [% FOREACH pa_loo IN patron_attributes %]
1100 [% IF pa_loo.class %]
1101 <fieldset id="aai_[% pa_loo.class %]">
1102 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1104 <ol class="attributes_table">
1105 [% FOREACH patron_attribute IN pa_loo.items %]
1106 <li data-category_code="[% patron_attribute.category_code %]">
1107 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1108 [% IF ( patron_attribute.use_dropdown ) %]
1109 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1110 <option value=""></option>
1111 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1112 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1113 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1114 [% auth_val_loo.lib %]
1117 <option value="[% auth_val_loo.authorised_value %]" >
1118 [% auth_val_loo.lib %]
1124 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1126 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1127 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1128 [% IF ( patron_attribute.repeatable ) %]
1129 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1134 [% IF pa_loo.class %]</fieldset>[% END %]
1137 [% END %][% END %][% END %]
1139 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1140 <fieldset class="rows" id="memberentry_messaging_prefs">
1141 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1143 <!-- handle changing prefs if creating new patron and changing
1146 <script type="text/javascript">//<![CDATA[
1147 $(document).ready(function(){
1148 var message_prefs_dirty = false;
1149 $('#memberentry_messaging_prefs > *').change(function() {
1150 message_prefs_dirty = true;
1152 $('#categorycode_entry').change(function() {
1153 var categorycode = $(this).val();
1154 if (message_prefs_dirty) {
1155 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1159 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1161 $.each(data.messaging_preferences, function(i, item) {
1162 var attrid = item.message_attribute_id;
1163 var transports = ['email', 'rss', 'sms'];
1164 $.each(transports, function(j, transport) {
1165 if (item['transports_' + transport] == 1) {
1166 $('#' + transport + attrid).prop('checked', true);
1168 $('#' + transport + attrid).prop('checked', false);
1171 if (item.digest && item.digest != ' ') {
1172 $('#digest' + attrid).prop('checked', true);
1174 $('#digest' + attrid).prop('checked', false);
1176 if (item.takes_days == '1') {
1177 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1180 message_prefs_dirty = false;
1188 <input type="hidden" name="setting_messaging_prefs" value="1" />
1189 [% INCLUDE 'messaging-preference-form.inc' %]
1190 [% IF ( SMSSendDriver ) %]
1191 <p><label for="SMSnumber">SMS number:</label>
1192 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1195 <label for="sms_provider_id">SMS provider:</label>
1196 <select id="sms_provider_id" name="sms_provider_id"/>
1197 <option value="">Unknown</option>
1198 [% FOREACH s IN sms_providers %]
1199 [% IF s.id == sms_provider_id %]
1200 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1202 <option value="[% s.id %]">[% s.name %]</option>
1213 [% IF quickadd && opadd && !check_member %]
1214 <form id="quick_add_form" class="toggler">
1215 <fieldset class="rows quick_add"><legend>Quick add</legend>
1216 <ol id="quick_add_list">
1221 $(document).ready(function () {
1223 $("#entryform,#saverecord").hide();
1224 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1225 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1226 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1227 $("#entryform label").each(function () {
1228 var input_label = $(this).attr('for');
1229 if ( input_label == 'sex-female' ) {
1232 else if ( input_label == 'btitle' ) {
1233 input_label='title';
1235 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1236 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1237 $(this).parent().clone().appendTo("#quick_add_list");
1238 [% UNLESS mandatorypassword %]
1239 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1243 if( $("#memberentry_guarantor").length ) {
1244 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1245 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1246 $("#quick_add_list #guarantordelete").prop('id','qagd');
1248 $("#qagd").click(function() { $("#guarantordelete").click(); });
1249 $("#quick_add_form").show();
1256 [% UNLESS ( opadd ) %]<div class="yui-b">
1257 [% INCLUDE 'members-menu.inc' %]
1261 [% INCLUDE 'intranet-bottom.inc' %]