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 if( $(this).next().val() != '' ) {
60 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
64 $(".toggler").toggle();
67 $("#save_quick_add").click(function(){
68 $("#quick_add_form").validate();
69 if( $("#quick_add_form").valid()){
70 $('.toggle_quick_add').click();
71 $('#saverecord').click();
75 $("#saverecord").click(function(){
76 if( check_form_borrowers() ){
77 $("#entryform").submit();
83 var MSG_SEPARATOR = _("Separator must be / in field %s");
84 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
85 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
86 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
87 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
88 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
89 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
90 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
91 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
92 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
93 var MSG_MONTH = _("%s month")
94 var MSG_MONTHS = _("%s months")
95 var MSG_YEAR = _("%s year")
96 var MSG_YEARS = _("%s years")
97 var LABEL_CHANGE = _("Change");
98 var LABEL_SET_TO_PATRON = _("Set to patron");
99 var LABEL_AGE = _("Age");
103 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
105 <body id="pat_memberentrygen" class="pat">
106 [% INCLUDE 'header.inc' %]
107 [% INCLUDE 'patron-search.inc' %]
109 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
110 [% 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 %]
111 <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>
113 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
119 [% IF ( error_alert == "no_email" ) %]
120 <div class="error">This member has no email</div>
122 <div class="error">[% error_alert %]</div>
126 <div class="dialog message">Email has been sent.</div>
129 [% INCLUDE 'noadd-warnings.inc' %]
131 [% UNLESS ( no_add ) %]
132 <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>
134 [% IF quickadd && opadd && !check_member %]
135 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
136 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
139 [% IF ( check_member ) %]
140 <div class="dialog alert">
141 <h3>Duplicate patron record?</h3>
142 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
143 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
144 <input type="hidden" name="op" value="modify" />
145 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
146 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
147 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
148 Edit existing record</button>
151 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
152 <input type="hidden" name="nodouble" value="1" />
153 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
154 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
155 Save as new record</button>
160 <div class="dialog alert">
161 <p>The following fields are wrong. Please fix them.</p>
163 [% IF ( ERROR_login_exist ) %]
164 <li id="ERROR_login_exist">Username/password already exists.</li>
166 [% IF ERROR_cardnumber_already_exists %]
167 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
169 [% IF ERROR_cardnumber_length %]
170 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
172 [% IF ( ERROR_age_limitations ) %]
173 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
174 Ages allowed are [% age_low %]-[% age_high %].</li>
176 [% IF ( ERROR_branch ) %]
177 <li id="ERROR_branch">Library is invalid.</li>
179 [% IF ( ERROR_dateofbirth ) %]
180 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
182 [% IF ( ERROR_dateenrolled ) %]
183 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
185 [% IF ( ERROR_dateexpiry ) %]
186 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
188 [% IF ( ERROR_short_password ) %]
189 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
191 [% IF ( ERROR_password_mismatch ) %]
192 <li id="ERROR_password_mismatch">Passwords do not match.</li>
194 [% IF ( ERROR_extended_unique_id_failed ) %]
195 <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>
197 [% IF ERROR_bad_email %]
198 <li id="ERROR_bad_email">The primary email is invalid.</li>
200 [% IF ERROR_bad_email_secondary %]
201 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
203 [% IF ERROR_bad_email_alternative %]
204 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
211 <div id="toolbar" class="btn-toolbar">
212 [% UNLESS ( check_member ) %]
213 [% IF quickadd && opadd %]
214 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
216 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
218 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
220 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
222 <i class="fa fa-times"></i> Cancel
227 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
228 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
229 <!-- field always hidden in different form (1,2,3) -->
230 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
231 <input type="hidden" name="category_type" value="[% category_type %]" />
232 <input type="hidden" name="updtype" value="[% updtype %]" />
233 <input type="hidden" name="destination" value="[% destination %]" />
234 <input type="hidden" name="check_member" value="[% check_member %]" />
235 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
236 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
237 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
238 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
239 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
240 [% ELSIF ( opduplicate ) %]
241 <input type="hidden" name="op" value="insert" />
243 <input type="hidden" name="op" value="save" />
244 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
245 [%# Only put the cardnumber if we arent showing it in the form later %]
247 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
253 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
254 <fieldset class="rows" id="memberentry_identity">
255 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
259 [% IF Koha.Preference('BorrowersTitles') %]
261 [% IF ( mandatorytitle ) %]
262 <label for="btitle" class="required">
267 <select id="btitle" name="title">
268 <option value=""></option>
269 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
271 <option value="[% t %]" selected="selected">[% t %]</option>
273 <option value="[% t %]">[% t %]</option>
277 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
282 [% UNLESS nosurname %]
284 [% IF ( mandatorysurname ) %]
285 <label for="surname" class="required">
287 <label for="surname">
290 [% IF ( uppercasesurnames ) %]
291 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
293 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
295 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
299 [% UNLESS nofirstname %]
301 [% IF ( mandatoryfirstname ) %]
302 <label for="firstname" class="required">
304 <label for="firstname">
307 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname | html %][% END %]" />
308 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
311 [% UNLESS nodateofbirth %]
313 [% IF ( mandatorydateofbirth ) %]
314 <label for="dateofbirth" class="required">
316 <label for="dateofbirth">
318 Date of birth: </label>
320 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" class="datepicker" />
322 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
323 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
324 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
327 [% UNLESS noinitials %]
329 [% IF ( mandatoryinitials ) %]
330 <label for="initials" class="required">
332 <label for="initials">
335 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials | html %][% END %]" />
336 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
340 [% UNLESS noothernames %]
342 [% IF ( mandatoryothernames ) %]
343 <label for="othernames" class="required">
345 <label for="othernames">
348 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames | html %][% END %]" />
349 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
350 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
357 [% UNLESS ( opduplicate ) %]
359 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
361 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
364 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
366 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
369 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
371 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
374 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
375 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
376 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
384 [% END # hide fieldset %]
386 [% IF ( showguarantor ) %]
387 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
389 <input type="hidden" name="branchcode" value="[% branchcode %]" />
391 <fieldset id="memberentry_guarantor" class="rows">
392 <legend id="guarantor_lgd">Guarantor information</legend>
395 [% IF ( guarantorid ) %]
396 <li id="contact-details">
398 <li id="contact-details" style="display: none">
400 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
403 <label for="contactname">Organization name: </label>
404 [% IF ( guarantorid ) %]
405 <span>[% contactname %]</span>
406 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
408 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
413 [% IF ( guarantorid ) %]
414 <li id="contact-details">
416 <li id="contact-details" style="display: none">
418 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
420 [% UNLESS nocontactname %]
422 <label for="contactname">Surname: </label>
423 [% IF ( guarantorid ) %]
424 <span>[% contactname %]</span>
425 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
427 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
431 [% UNLESS nocontactfirstname %]
433 <label for="contactfirstname">First name: </label>
434 [% IF ( guarantorid ) %]
435 <span>[% contactfirstname %]</span>
436 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
438 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
442 [% IF ( relshiploop ) %]
444 <label for="relationship">Relationship: </label>
445 <select name="relationship" id="relationship" >
446 [% FOREACH relshiploo IN relshiploop %]
447 [% IF ( relshiploo.selected ) %]
448 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
450 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
459 <span class="label"> </span>
460 [% IF ( guarantorid ) %]
461 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
463 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
465 <input id="guarantordelete" type="button" value="Delete" />
467 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
469 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
470 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
471 [% IF privacy_guarantor_checkouts %]
472 <option value="0">No</option>
473 <option value="1" selected>Yes</option>
475 <option value="0" selected>No</option>
476 <option value="1">Yes</option>
479 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
486 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
487 [% IF Koha.Preference( 'AddressFormat' ) %]
488 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
490 [% INCLUDE 'member-main-address-style-us.inc' %]
492 [% END # nostreet && nocity etc group%]
494 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
495 <fieldset class="rows" id="memberentry_contact">
496 <legend id="contact_lgd">Contact</legend><ol>
499 [% IF ( mandatoryphone ) %]
500 <label for="phone" class="required">
504 Primary phone: </label>
505 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
506 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
510 [% UNLESS nophonepro %]
512 [% IF ( mandatoryphonepro ) %]
513 <label for="phonepro" class="required">
515 <label for="phonepro">
517 Secondary phone: </label>
518 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
519 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
522 [% UNLESS nomobile %]
524 [% IF ( mandatorymobile ) %]
525 <label for="mobile" class="required">
529 Other phone: </label>
530 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
531 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
536 [% IF ( mandatoryemail ) %]
537 <label for="email" class="required">
541 Primary email: </label>
542 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
543 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
547 [% UNLESS noemailpro %]
549 [% IF ( mandatoryemailpro ) %]
550 <label for="emailpro" class="required">
552 <label for="emailpro">
554 Secondary email: </label>
555 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
556 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
561 [% IF ( mandatoryfax ) %]
562 <label for="fax" class="required">
567 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
568 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
573 [%END # hide fieldset %]
575 <!-- ************************ STEP_1 *********************** -->
579 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
580 [% IF Koha.Preference( 'AddressFormat' ) %]
581 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
583 [% INCLUDE 'member-alt-address-style-us.inc' %]
585 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
588 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
589 [% IF Koha.Preference( 'AddressFormat' ) %]
590 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
592 [% INCLUDE 'member-alt-contact-style-us.inc' %]
594 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
599 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
600 <fieldset class="rows" id="memberentry_library_management">
601 <legend id="library_management_lgd">Library management</legend><ol>
602 [% UNLESS nocardnumber %]
604 [% IF mandatorycardnumber and not autoMemberNum %]
605 <label for="cardnumber" class="required">
607 <label for="cardnumber" class="validated">
609 [% IF autoMemberNum %]
610 Card number<br>(<u>leave blank for auto calc during registration</u>): </label>
612 Card number: </label>
614 [% IF minlength_cardnumber == maxlength_cardnumber %]
615 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
616 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
617 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
618 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
619 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
620 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
621 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
622 [% ELSIF maxlength_cardnumber %]
623 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
624 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
625 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
627 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
628 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
629 <div class="hint">There is no minimum or maximum character length.</div>
633 [% UNLESS nobranchcode %]
635 <label for="libraries" class="required">Library:</label>
636 <select name="branchcode" size="1" id="libraries">
637 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch ) %]
639 <span class="required">Required</span>
643 <label for="categorycode_entry" class="required">Category: </label>
644 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
645 [% FOREACH typeloo IN typeloop %]
646 [% FOREACH categoryloo IN typeloo.categoryloop %]
647 [% IF ( loop.first ) %]
648 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
649 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
650 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
651 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
652 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
653 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
655 [% IF ( categoryloo.categorycodeselected ) %]
656 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
658 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
660 [% IF ( loop.last ) %]
666 <span class="required">Required</span>
670 [% IF ( mandatorysort1 ) %]
671 <label for="sort1" class="required">
676 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
677 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
682 [% IF ( mandatorysort2 ) %]
683 <label for="sort2" class="required">
688 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
689 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
692 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
694 <label for="sort2">Sync with the Norwegian national patron database:</label>
695 [% IF ( sync == 0 ) %]
696 <input type="radio" id="sync" name="sync" value="1"> Yes
697 <input type="radio" id="sync" name="sync" value="0" checked> No
699 <input type="radio" id="sync" name="sync" value="1" checked> Yes
700 <input type="radio" id="sync" name="sync" value="0"> No
704 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
705 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
706 <select name="checkprevcheckout" id="checkprevcheckout">
707 [% IF ( checkprevcheckout == 'yes' ) %]
708 <option value="yes" selected="selected">Yes if settings allow it</option>
709 <option value="no">No if settings allow it</option>
710 <option value="inherit">Inherit from settings</option>
711 [% ELSIF ( checkprevcheckout == 'no' ) %]
712 <option value="yes">Yes if settings allow it</option>
713 <option value="no" selected="selected">No if settings allow it</option>
714 <option value="inherit">Inherit from settings</option>
716 <option value="yes">Yes if settings allow it</option>
717 <option value="no">No if settings allow it</option>
718 <option value="inherit" selected="selected">Inherit from settings</option>
723 [% IF Koha.Preference('TranslateNotices') %]
725 <label for="lang">Preferred language for notices: </label>
726 <select id="lang" name="lang">
727 <option value="default">Default</option>
728 [% FOR language IN languages %]
729 [% FOR sublanguage IN language.sublanguages_loop %]
730 [% IF language.plural %]
731 [% IF sublanguage.rfc4646_subtag == lang %]
732 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
734 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
737 [% IF sublanguage.rfc4646_subtag == lang %]
738 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
740 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
750 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
751 <fieldset class="rows" id="memberentry_subscription">
752 <legend id="library_setup_lgd">Library set-up</legend><ol>
753 [% UNLESS nodateenrolled %]
755 [% IF ( mandatorydateenrolled ) %]
756 <label for="from" class="required">
760 Registration date: </label>
761 [% IF ( dateformat == "metric" ) %]
762 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
764 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
766 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
767 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
768 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
771 [% UNLESS nodateexpiry %]
774 <li style="display:none">
776 [% IF ( mandatorydateexpiry ) %]
777 <label for="to" class="required">
781 Expiry date (leave blank for auto calc): </label>
782 [% IF ( dateformat == "metric" ) %]
783 [% UNLESS ( opadd ) %]
784 <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" />
786 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
789 [% UNLESS ( opadd ) %]
790 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
792 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
795 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
796 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
797 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
799 [% UNLESS noopacnote %]
801 [% IF ( mandatoryopacnote ) %]
802 <label for="opacnote" class="required">
804 <label for="opacnote">
807 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote | html %][% END %]</textarea>
808 <div class="hint">This message appears on this patron's user page in the OPAC</div>
809 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
812 [% UNLESS noborrowernotes %]
814 [% IF ( mandatoryborrowernotes ) %]
815 <label for="borrowernotes" class="required">
817 <label for="borrowernotes">
819 Circulation note: </label>
820 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes | html %][% END %]</textarea>
821 <div class="hint">This message displays when checking out to this patron</div>
822 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
827 [% END # hide fieldset %]
829 [% UNLESS nouserid && nopassword %]
830 <fieldset class="rows" id="memberentry_userid">
831 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
832 [% UNLESS nouserid %]
834 [% IF ( mandatoryuserid ) %]
835 <label for="userid" class="required">
841 [% IF ( NoUpdateLogin ) %]
842 [% IF ( opduplicate ) %]
843 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
845 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
848 [% IF ( opduplicate ) %]
849 <input type="text" id="userid" name="userid" size="20" value="" />
851 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
855 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
856 <input type="text" disabled="disabled" style="display:none" />
858 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
861 [% UNLESS nopassword %]
863 [% IF ( mandatorypassword ) %]
864 <label for="password" class="required">
866 <label for="password">
870 [% IF ( NoUpdateLogin ) %]
871 [% IF ( opduplicate ) %]
872 <input type="password" id="password" name="password" size="20" disabled="disabled" />
874 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
877 [% IF ( opduplicate ) %]
878 <input type="password" id="password" name="password" size="20" />
880 <input type="password" id="password" name="password" size="20" value="[% password %]" />
884 [% IF ( password ) %]
885 [% IF ( NoUpdateLogin ) %]
886 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
888 [% IF ( opduplicate ) %]
889 <input type="password" id="password" name="password" size="20" />
891 <input type="password" id="password" name="password" size="20" value="****" />
895 [% IF ( NoUpdateLogin ) %]
896 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
898 <input type="password" id="password" name="password" size="20" value="" />
902 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
903 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
906 [% IF ( mandatorypassword ) %]
907 <label for="password2" class="required">
909 <label for="password2">
911 Confirm password: </label>
913 [% IF ( NoUpdateLogin ) %]
914 [% IF ( opduplicate ) %]
915 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
917 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
920 [% IF ( opduplicate ) %]
921 <input type="password" id="password2" name="password2" size="20" />
923 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
927 [% IF ( password ) %]
928 [% IF ( NoUpdateLogin ) %]
929 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
931 [% IF ( opduplicate ) %]
932 <input type="password" id="password2" name="password2" size="20" />
934 <input type="password" id="password2" name="password2" size="20" value="****" />
938 [% IF ( NoUpdateLogin ) %]
939 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
941 <input type="password" id="password2" name="password2" size="20" value="" />
945 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
949 [% END # hide fieldset %][% END %]
950 <!--this zones are not necessary in modif mode -->
951 [% UNLESS ( opadd || opduplicate ) %]
952 <fieldset class="rows" id="memberentry_account_flags">
953 <legend id="account_flags_lgd">Patron account flags</legend>
955 [% FOREACH flagloo IN flagloop %]
956 <li><label class="radio" for="yes[% flagloo.name %]">
957 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
958 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
960 [% IF CAN_user_circulate_manage_restrictions %]
961 <label for="yes[% flagloo.name %]">
962 [% IF ( flagloo.yes ) %]
963 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
965 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
968 <label for="no[% flagloo.name %]">
969 [% IF ( flagloo.no ) %]
970 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
972 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
976 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
985 <fieldset class="rows" id="memberentry_restrictions">
986 <legend id="restrictions_lgd">Patron restrictions</legend>
988 [% IF ( debarments ) %]
995 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1002 [% FOREACH d IN debarments %]
1004 <td>[% d.type %]</td>
1006 [% IF d.comment.search('OVERDUES_PROCESS') %]
1007 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
1012 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
1013 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1015 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
1023 <p>Patron is currently unrestricted.</p>
1026 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1027 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1028 <fieldset id="manual_restriction_form">
1029 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1030 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1032 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1033 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1034 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1038 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1048 [% IF Koha.Preference('HouseboundModule') %]
1049 <fieldset class="rows" id="memberentry_housebound_roles">
1050 <legend id="housebound_roles">Housebound roles</legend>
1053 <label class="radio" for="housebound_chooser">
1056 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1057 <label for="yes_housebound_chooser">Yes </label>
1058 <input type="radio" id="yes_housebound_chooser"
1059 name="housebound_chooser" value="1"
1060 checked="checked" />
1061 <label for="no_housebound_chooser">No </label>
1062 <input type="radio" id="no_housebound_chooser"
1063 name="housebound_chooser" value="0" />
1065 <label for="yes_housebound_chooser">Yes </label>
1066 <input type="radio" id="yes_housebound_chooser"
1067 name="housebound_chooser" value="1" />
1068 <label for="no_housebound_chooser">No </label>
1069 <input type="radio" id="no_housebound_chooser"
1070 name="housebound_chooser" value="0"
1071 checked="checked" />
1075 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1076 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1077 <label for="yes_housebound_deliverer">Yes </label>
1078 <input type="radio" id="yes_housebound_deliverer"
1079 name="housebound_deliverer" value="1"
1080 checked="checked" />
1081 <label for="no_housebound_deliverer">No </label>
1082 <input type="radio" id="no_housebound_deliverer"
1083 name="housebound_deliverer" value="0" />
1085 <label for="yes_housebound_deliverer">Yes </label>
1086 <input type="radio" id="yes_housebound_deliverer"
1087 name="housebound_deliverer" value="1" />
1088 <label for="no_housebound_deliverer">No </label>
1089 <input type="radio" id="no_housebound_deliverer"
1090 name="housebound_deliverer" value="0"
1091 checked="checked" />
1096 [% END # hide fieldset %]
1097 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1098 <fieldset class="rows" id="memberentry_patron_attributes">
1099 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1100 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1101 [% FOREACH pa_loo IN patron_attributes %]
1102 [% IF pa_loo.class %]
1103 <fieldset id="aai_[% pa_loo.class %]">
1104 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1106 <ol class="attributes_table">
1107 [% FOREACH patron_attribute IN pa_loo.items %]
1108 <li data-category_code="[% patron_attribute.category_code %]">
1109 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1110 [% IF ( patron_attribute.use_dropdown ) %]
1111 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1112 <option value=""></option>
1113 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1114 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1115 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1116 [% auth_val_loo.lib %]
1119 <option value="[% auth_val_loo.authorised_value %]" >
1120 [% auth_val_loo.lib %]
1126 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1128 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1129 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1130 [% IF ( patron_attribute.repeatable ) %]
1131 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1136 [% IF pa_loo.class %]</fieldset>[% END %]
1139 [% END %][% END %][% END %]
1141 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1142 <fieldset class="rows" id="memberentry_messaging_prefs">
1143 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1145 <!-- handle changing prefs if creating new patron and changing
1148 <script type="text/javascript">//<![CDATA[
1149 $(document).ready(function(){
1150 var message_prefs_dirty = false;
1151 $('#memberentry_messaging_prefs > *').change(function() {
1152 message_prefs_dirty = true;
1154 $('#categorycode_entry').change(function() {
1155 var categorycode = $(this).val();
1156 if (message_prefs_dirty) {
1157 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1161 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1163 $.each(data.messaging_preferences, function(i, item) {
1164 var attrid = item.message_attribute_id;
1165 var transports = ['email', 'rss', 'sms'];
1166 $.each(transports, function(j, transport) {
1167 if (item['transports_' + transport] == 1) {
1168 $('#' + transport + attrid).prop('checked', true);
1170 $('#' + transport + attrid).prop('checked', false);
1173 if (item.digest && item.digest != ' ') {
1174 $('#digest' + attrid).prop('checked', true);
1176 $('#digest' + attrid).prop('checked', false);
1178 if (item.takes_days == '1') {
1179 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1182 message_prefs_dirty = false;
1190 <input type="hidden" name="setting_messaging_prefs" value="1" />
1191 [% INCLUDE 'messaging-preference-form.inc' %]
1192 [% IF ( SMSSendDriver ) %]
1193 <p><label for="SMSnumber">SMS number:</label>
1194 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1197 <label for="sms_provider_id">SMS provider:</label>
1198 <select id="sms_provider_id" name="sms_provider_id"/>
1199 <option value="">Unknown</option>
1200 [% FOREACH s IN sms_providers %]
1201 [% IF s.id == sms_provider_id %]
1202 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1204 <option value="[% s.id %]">[% s.name %]</option>
1215 [% IF quickadd && opadd && !check_member %]
1216 <form id="quick_add_form" class="toggler">
1217 <fieldset class="rows quick_add"><legend>Quick add</legend>
1218 <ol id="quick_add_list">
1223 $(document).ready(function () {
1225 $("#entryform,#saverecord").hide();
1226 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1227 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1228 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1229 $("#entryform label").each(function () {
1230 var input_label = $(this).attr('for');
1231 if ( input_label == 'sex-female' ) {
1234 else if ( input_label == 'btitle' ) {
1235 input_label='title';
1237 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1238 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1239 $(this).parent().clone().appendTo("#quick_add_list");
1240 [% UNLESS mandatorypassword %]
1241 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1245 if( $("#memberentry_guarantor").length ) {
1246 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1247 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1248 $("#quick_add_list #guarantordelete").prop('id','qagd');
1250 $("#qagd").click(function() { $("#guarantordelete").click(); });
1251 $("#quick_add_form").show();
1258 [% UNLESS ( opadd ) %]<div class="yui-b">
1259 [% INCLUDE 'members-menu.inc' %]
1263 [% INCLUDE 'intranet-bottom.inc' %]