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 });
17 $("#filteraction_on").on("click", function(){
18 $(window).off('scroll');
19 $("#toolbar").css({ top: original_offset + additional_height });
20 $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
22 $("#filteraction_off").on("click", function(){
23 $(window).off('scroll');
24 $("#toolbar").css({ top: original_offset });
25 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
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();
74 $("#entryform").validate({
78 password_strong: true,
79 password_no_spaces: true
88 $("#saverecord").click(function(){
89 if( check_form_borrowers() ){
90 $("#entryform").submit();
94 $('#duplicate').on('click', function() {
95 $("input[name='op']").val('modify');
96 $("input[name='borrowernumber']").val('[% check_member %]');
97 $('#entryform').submit();
100 $('#not-duplicate').on('click', function() {
101 $("input[name='nodouble']").val('1');
102 $('#entryform').submit();
106 var MSG_SEPARATOR = _("Separator must be / in field %s");
107 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
108 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
109 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
110 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
111 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
112 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
113 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
114 var MSG_MONTH = _("%s month")
115 var MSG_MONTHS = _("%s months")
116 var MSG_YEAR = _("%s year")
117 var MSG_YEARS = _("%s years")
118 var LABEL_CHANGE = _("Change");
119 var LABEL_SET_TO_PATRON = _("Set to patron");
120 var LABEL_AGE = _("Age");
124 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
126 <body id="pat_memberentrygen" class="pat">
127 [% INCLUDE 'header.inc' %]
128 [% INCLUDE 'patron-search.inc' %]
130 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
131 [% 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 %]
132 <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>
134 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
140 [% IF ( error_alert == "no_email" ) %]
141 <div class="error">This member has no email</div>
143 <div class="error">[% error_alert %]</div>
147 <div class="dialog message">Email has been sent.</div>
150 [% INCLUDE 'noadd-warnings.inc' %]
152 [% UNLESS ( no_add ) %]
153 <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>
155 [% IF quickadd && opadd && !check_member %]
156 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
157 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
160 [% IF ( check_member ) %]
161 <div class="dialog alert">
162 <h3>Duplicate patron record?</h3>
163 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
164 <button id="duplicate" type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
165 Edit existing record</button>
167 <button type="submit" id="not-duplicate" class="new"><i class="fa fa-plus"></i> Not a duplicate.
168 Save as new record</button>
173 <div class="dialog alert">
174 <p>The following fields are wrong. Please fix them.</p>
176 [% IF ( ERROR_login_exist ) %]
177 <li id="ERROR_login_exist">Username/password already exists.</li>
179 [% IF ERROR_cardnumber_already_exists %]
180 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
182 [% IF ERROR_cardnumber_length %]
183 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
185 [% IF ( ERROR_age_limitations ) %]
186 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
187 Ages allowed are [% age_low %]-[% age_high %].</li>
189 [% IF ( ERROR_branch ) %]
190 <li id="ERROR_branch">Library is invalid.</li>
192 [% IF ( ERROR_dateofbirth ) %]
193 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
195 [% IF ( ERROR_dateenrolled ) %]
196 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
198 [% IF ( ERROR_dateexpiry ) %]
199 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
201 [% IF ( ERROR_password_too_short ) %]
202 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
204 [% IF ( ERROR_password_too_weak ) %]
205 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
207 [% IF ( ERROR_password_has_whitespaces ) %]
208 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
210 [% IF ( ERROR_password_mismatch ) %]
211 <li id="ERROR_password_mismatch">Passwords do not match.</li>
213 [% IF ( ERROR_extended_unique_id_failed ) %]
214 <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>
216 [% IF ERROR_bad_email %]
217 <li id="ERROR_bad_email">The primary email is invalid.</li>
219 [% IF ERROR_bad_email_secondary %]
220 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
222 [% IF ERROR_bad_email_alternative %]
223 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
230 <div id="toolbar" class="btn-toolbar">
231 [% UNLESS ( check_member ) %]
232 [% IF quickadd && opadd %]
233 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
235 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
237 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
239 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
241 <i class="fa fa-times"></i> Cancel
246 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
247 [% UNLESS ( check_member ) %]
248 <input type="hidden" name="nodouble" value="[% nodouble %]" />
250 <!-- field always hidden in different form (1,2,3) -->
251 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
252 <input type="hidden" name="category_type" value="[% category_type %]" />
253 <input type="hidden" name="updtype" value="[% updtype %]" />
254 <input type="hidden" name="destination" value="[% destination %]" />
255 <input type="hidden" name="check_member" value="[% check_member %]" />
256 <input type="hidden" name="borrowernumber" value="[% borrowernumber UNLESS opduplicate %]" />
257 <input type="hidden" name="nodouble" value="[% nodouble UNLESS opduplicate %]" />
258 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
259 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
260 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
261 [% ELSIF ( opduplicate ) %]
262 <input type="hidden" name="op" value="insert" />
264 <input type="hidden" name="op" value="save" />
265 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
266 [%# Only put the cardnumber if we arent showing it in the form later %]
268 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
274 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
275 <fieldset class="rows" id="memberentry_identity">
276 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
280 [% IF Koha.Preference('BorrowersTitles') %]
282 [% IF ( mandatorytitle ) %]
283 <label for="btitle" class="required">
288 <select id="btitle" name="title">
289 <option value=""></option>
290 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
292 <option value="[% t %]" selected="selected">[% t %]</option>
294 <option value="[% t %]">[% t %]</option>
298 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
303 [% UNLESS nosurname %]
305 [% IF ( mandatorysurname ) %]
306 <label for="surname" class="required">
308 <label for="surname">
311 [% IF ( uppercasesurnames ) %]
312 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
314 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
316 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
320 [% UNLESS nofirstname %]
322 [% IF ( mandatoryfirstname ) %]
323 <label for="firstname" class="required">
325 <label for="firstname">
328 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
329 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
332 [% UNLESS nodateofbirth %]
334 [% IF ( mandatorydateofbirth ) %]
335 <label for="dateofbirth" class="required">
337 <label for="dateofbirth">
339 Date of birth: </label>
341 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth UNLESS opduplicate %]" class="datepicker" />
343 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
344 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
345 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
348 [% UNLESS noinitials %]
350 [% IF ( mandatoryinitials ) %]
351 <label for="initials" class="required">
353 <label for="initials">
356 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
357 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
361 [% UNLESS noothernames %]
363 [% IF ( mandatoryothernames ) %]
364 <label for="othernames" class="required">
366 <label for="othernames">
369 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
370 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
371 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
378 [% UNLESS ( opduplicate ) %]
380 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
382 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
385 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
387 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
390 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
392 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
395 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
396 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
397 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
405 [% END # hide fieldset %]
407 [% IF ( showguarantor ) %]
408 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
410 <input type="hidden" name="branchcode" value="[% branchcode %]" />
412 <fieldset id="memberentry_guarantor" class="rows">
413 <legend id="guarantor_lgd">Guarantor information</legend>
416 [% IF ( guarantorid ) %]
417 <li id="contact-details">
419 <li id="contact-details" style="display: none">
421 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
424 <label for="contactname">Organization name: </label>
425 [% IF ( guarantorid ) %]
426 <span>[% contactname %]</span>
427 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
429 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
434 [% IF ( guarantorid ) %]
435 <li id="contact-details">
437 <li id="contact-details" style="display: none">
439 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid |html %]</a>[% END %]
441 [% UNLESS nocontactname %]
443 <label for="contactname">Surname: </label>
444 [% IF ( guarantorid ) %]
445 <span>[% contactname %]</span>
446 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
448 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
452 [% UNLESS nocontactfirstname %]
454 <label for="contactfirstname">First name: </label>
455 [% IF ( guarantorid ) %]
456 <span>[% contactfirstname %]</span>
457 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
459 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
463 [% IF ( relshiploop ) %]
465 <label for="relationship">Relationship: </label>
466 <select name="relationship" id="relationship" >
467 [% FOREACH relshiploo IN relshiploop %]
468 [% IF ( relshiploo.selected ) %]
469 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
471 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
480 <span class="label"> </span>
481 [% IF ( guarantorid ) %]
482 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
484 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
486 <input id="guarantordelete" type="button" value="Delete" />
488 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
490 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
491 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
492 [% IF privacy_guarantor_checkouts %]
493 <option value="0">No</option>
494 <option value="1" selected>Yes</option>
496 <option value="0" selected>No</option>
497 <option value="1">Yes</option>
500 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
507 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
508 [% IF Koha.Preference( 'AddressFormat' ) %]
509 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
511 [% INCLUDE 'member-main-address-style-us.inc' %]
513 [% END # nostreet && nocity etc group%]
515 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
516 <fieldset class="rows" id="memberentry_contact">
517 <legend id="contact_lgd">Contact</legend><ol>
520 [% IF ( mandatoryphone ) %]
521 <label for="phone" class="required">
525 Primary phone: </label>
526 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
527 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
531 [% UNLESS nophonepro %]
533 [% IF ( mandatoryphonepro ) %]
534 <label for="phonepro" class="required">
536 <label for="phonepro">
538 Secondary phone: </label>
539 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
540 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
543 [% UNLESS nomobile %]
545 [% IF ( mandatorymobile ) %]
546 <label for="mobile" class="required">
550 Other phone: </label>
551 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
552 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
557 [% IF ( mandatoryemail ) %]
558 <label for="email" class="required">
562 Primary email: </label>
563 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
564 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
568 [% UNLESS noemailpro %]
570 [% IF ( mandatoryemailpro ) %]
571 <label for="emailpro" class="required">
573 <label for="emailpro">
575 Secondary email: </label>
576 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
577 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
582 [% IF ( mandatoryfax ) %]
583 <label for="fax" class="required">
588 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
589 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
594 [%END # hide fieldset %]
596 <!-- ************************ STEP_1 *********************** -->
600 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
601 [% IF Koha.Preference( 'AddressFormat' ) %]
602 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
604 [% INCLUDE 'member-alt-address-style-us.inc' %]
606 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
609 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
610 [% IF Koha.Preference( 'AddressFormat' ) %]
611 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
613 [% INCLUDE 'member-alt-contact-style-us.inc' %]
615 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
620 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
621 <fieldset class="rows" id="memberentry_library_management">
622 <legend id="library_management_lgd">Library management</legend><ol>
623 [% UNLESS nocardnumber %]
625 [% IF mandatorycardnumber and not autoMemberNum %]
626 <label for="cardnumber" class="required">
628 <label for="cardnumber" class="validated">
630 [% IF autoMemberNum %]
631 Card number<br>(<u>leave blank for auto calc during registration</u>): </label>
633 Card number: </label>
635 [% IF minlength_cardnumber == maxlength_cardnumber %]
636 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
637 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
638 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
639 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
640 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
641 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
642 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
643 [% ELSIF maxlength_cardnumber %]
644 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
645 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
646 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
648 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
649 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
650 <div class="hint">There is no minimum or maximum character length.</div>
654 [% UNLESS nobranchcode %]
656 <label for="libraries" class="required">Library:</label>
657 <select name="branchcode" size="1" id="libraries">
658 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch ) %]
660 <span class="required">Required</span>
664 <label for="categorycode_entry" class="required">Category: </label>
665 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
666 [% FOREACH typeloo IN typeloop %]
667 [% FOREACH categoryloo IN typeloo.categoryloop %]
668 [% IF ( loop.first ) %]
669 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
670 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
671 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
672 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
673 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
674 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
676 [% IF ( categoryloo.categorycodeselected ) %]
677 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
679 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
681 [% IF ( loop.last ) %]
687 <span class="required">Required</span>
691 [% IF ( mandatorysort1 ) %]
692 <label for="sort1" class="required">
697 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
698 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
703 [% IF ( mandatorysort2 ) %]
704 <label for="sort2" class="required">
709 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
710 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
713 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
715 <label for="sort2">Sync with the Norwegian national patron database:</label>
716 [% IF ( sync == 0 ) %]
717 <input type="radio" id="sync" name="sync" value="1"> Yes
718 <input type="radio" id="sync" name="sync" value="0" checked> No
720 <input type="radio" id="sync" name="sync" value="1" checked> Yes
721 <input type="radio" id="sync" name="sync" value="0"> No
725 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
726 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
727 <select name="checkprevcheckout" id="checkprevcheckout">
728 [% IF ( checkprevcheckout == 'yes' ) %]
729 <option value="yes" selected="selected">Yes if settings allow it</option>
730 <option value="no">No if settings allow it</option>
731 <option value="inherit">Inherit from settings</option>
732 [% ELSIF ( checkprevcheckout == 'no' ) %]
733 <option value="yes">Yes if settings allow it</option>
734 <option value="no" selected="selected">No if settings allow it</option>
735 <option value="inherit">Inherit from settings</option>
737 <option value="yes">Yes if settings allow it</option>
738 <option value="no">No if settings allow it</option>
739 <option value="inherit" selected="selected">Inherit from settings</option>
744 [% IF Koha.Preference('TranslateNotices') %]
746 <label for="lang">Preferred language for notices: </label>
747 <select id="lang" name="lang">
748 <option value="default">Default</option>
749 [% FOR language IN languages %]
750 [% FOR sublanguage IN language.sublanguages_loop %]
751 [% IF language.plural %]
752 [% IF sublanguage.rfc4646_subtag == lang %]
753 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
755 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
758 [% IF sublanguage.rfc4646_subtag == lang %]
759 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
761 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
771 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
772 <fieldset class="rows" id="memberentry_subscription">
773 <legend id="library_setup_lgd">Library set-up</legend><ol>
774 [% UNLESS nodateenrolled %]
776 [% IF ( mandatorydateenrolled ) %]
777 <label for="from" class="required">
781 Registration date: </label>
782 [% IF ( dateformat == "metric" ) %]
783 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
785 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
787 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
788 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
789 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
792 [% UNLESS nodateexpiry %]
795 <li style="display:none">
797 [% IF ( mandatorydateexpiry ) %]
798 <label for="to" class="required">
802 Expiry date (leave blank for auto calc): </label>
803 [% IF ( dateformat == "metric" ) %]
804 [% UNLESS ( opadd ) %]
805 <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" />
807 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
810 [% UNLESS ( opadd ) %]
811 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
813 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
816 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
817 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
818 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
820 [% UNLESS noopacnote %]
822 [% IF ( mandatoryopacnote ) %]
823 <label for="opacnote" class="required">
825 <label for="opacnote">
828 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
829 <div class="hint">This message appears on this patron's user page in the OPAC</div>
830 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
833 [% UNLESS noborrowernotes %]
835 [% IF ( mandatoryborrowernotes ) %]
836 <label for="borrowernotes" class="required">
838 <label for="borrowernotes">
840 Circulation note: </label>
841 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
842 <div class="hint">This message displays when checking out to this patron</div>
843 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
848 [% END # hide fieldset %]
850 [% UNLESS nouserid && nopassword %]
851 <fieldset class="rows" id="memberentry_userid">
852 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
853 [% UNLESS nouserid %]
855 [% IF ( mandatoryuserid ) %]
856 <label for="userid" class="required">
862 [% IF ( NoUpdateLogin ) %]
863 [% IF ( opduplicate ) %]
864 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
866 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
869 [% IF ( opduplicate ) %]
870 <input type="text" id="userid" name="userid" size="20" value="" />
872 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
876 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
877 <input type="text" disabled="disabled" style="display:none" />
879 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
882 [% UNLESS nopassword %]
884 [% IF ( mandatorypassword ) %]
885 <label for="password" class="required">
887 <label for="password">
891 [% IF ( NoUpdateLogin ) %]
892 [% IF ( opduplicate ) %]
893 <input type="password" id="password" name="password" size="20" disabled="disabled" />
895 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
898 [% IF ( opduplicate ) %]
899 <input type="password" id="password" name="password" size="20" />
901 <input type="password" id="password" name="password" size="20" value="[% password %]" />
905 [% IF ( password ) %]
906 [% IF ( NoUpdateLogin ) %]
907 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
909 [% IF ( opduplicate ) %]
910 <input type="password" id="password" name="password" size="20" />
912 <input type="password" id="password" name="password" size="20" value="****" />
916 [% IF ( NoUpdateLogin ) %]
917 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
919 <input type="password" id="password" name="password" size="20" value="" />
923 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
924 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
925 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
926 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
927 <div class="hint">Minimum password length: [% minPasswordLength %]</div>
930 [% IF ( mandatorypassword ) %]
931 <label for="password2" class="required">
933 <label for="password2">
935 Confirm password: </label>
937 [% IF ( NoUpdateLogin ) %]
938 [% IF ( opduplicate ) %]
939 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
941 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
944 [% IF ( opduplicate ) %]
945 <input type="password" id="password2" name="password2" size="20" />
947 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
951 [% IF ( password ) %]
952 [% IF ( NoUpdateLogin ) %]
953 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
955 [% IF ( opduplicate ) %]
956 <input type="password" id="password2" name="password2" size="20" />
958 <input type="password" id="password2" name="password2" size="20" value="****" />
962 [% IF ( NoUpdateLogin ) %]
963 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
965 <input type="password" id="password2" name="password2" size="20" value="" />
969 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
973 [% END # hide fieldset %][% END %]
974 <!--this zones are not necessary in modif mode -->
975 [% UNLESS ( opadd || opduplicate ) %]
976 <fieldset class="rows" id="memberentry_account_flags">
977 <legend id="account_flags_lgd">Patron account flags</legend>
979 [% FOREACH flagloo IN flagloop %]
980 <li><label class="radio" for="yes[% flagloo.name %]">
981 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
982 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
984 [% IF CAN_user_circulate_manage_restrictions %]
985 <label for="yes[% flagloo.name %]">
986 [% IF ( flagloo.yes ) %]
987 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
989 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
992 <label for="no[% flagloo.name %]">
993 [% IF ( flagloo.no ) %]
994 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
996 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
1000 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1009 <fieldset class="rows" id="memberentry_restrictions">
1010 <legend id="restrictions_lgd">Patron restrictions</legend>
1012 [% IF ( debarments ) %]
1019 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1026 [% FOREACH d IN debarments %]
1028 <td>[% d.type %]</td>
1030 [% IF d.comment.search('OVERDUES_PROCESS') %]
1031 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
1036 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
1037 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1039 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
1047 <p>Patron is currently unrestricted.</p>
1050 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1051 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1052 <fieldset id="manual_restriction_form">
1053 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1054 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1056 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1057 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1058 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1062 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1072 [% IF Koha.Preference('HouseboundModule') %]
1073 <fieldset class="rows" id="memberentry_housebound_roles">
1074 <legend id="housebound_roles">Housebound roles</legend>
1077 <label class="radio" for="housebound_chooser">
1080 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1081 <label for="yes_housebound_chooser">Yes </label>
1082 <input type="radio" id="yes_housebound_chooser"
1083 name="housebound_chooser" value="1"
1084 checked="checked" />
1085 <label for="no_housebound_chooser">No </label>
1086 <input type="radio" id="no_housebound_chooser"
1087 name="housebound_chooser" value="0" />
1089 <label for="yes_housebound_chooser">Yes </label>
1090 <input type="radio" id="yes_housebound_chooser"
1091 name="housebound_chooser" value="1" />
1092 <label for="no_housebound_chooser">No </label>
1093 <input type="radio" id="no_housebound_chooser"
1094 name="housebound_chooser" value="0"
1095 checked="checked" />
1099 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1100 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1101 <label for="yes_housebound_deliverer">Yes </label>
1102 <input type="radio" id="yes_housebound_deliverer"
1103 name="housebound_deliverer" value="1"
1104 checked="checked" />
1105 <label for="no_housebound_deliverer">No </label>
1106 <input type="radio" id="no_housebound_deliverer"
1107 name="housebound_deliverer" value="0" />
1109 <label for="yes_housebound_deliverer">Yes </label>
1110 <input type="radio" id="yes_housebound_deliverer"
1111 name="housebound_deliverer" value="1" />
1112 <label for="no_housebound_deliverer">No </label>
1113 <input type="radio" id="no_housebound_deliverer"
1114 name="housebound_deliverer" value="0"
1115 checked="checked" />
1120 [% END # hide fieldset %]
1121 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1122 <fieldset class="rows" id="memberentry_patron_attributes">
1123 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1124 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1125 [% FOREACH pa_loo IN patron_attributes %]
1126 [% IF pa_loo.class %]
1127 <fieldset id="aai_[% pa_loo.class %]">
1128 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1130 <ol class="attributes_table">
1131 [% FOREACH patron_attribute IN pa_loo.items %]
1132 <li data-category_code="[% patron_attribute.category_code %]">
1133 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1134 [% IF ( patron_attribute.use_dropdown ) %]
1135 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1136 <option value=""></option>
1137 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1138 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1139 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1140 [% auth_val_loo.lib %]
1143 <option value="[% auth_val_loo.authorised_value %]" >
1144 [% auth_val_loo.lib %]
1150 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1152 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1153 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1154 [% IF ( patron_attribute.repeatable ) %]
1155 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1160 [% IF pa_loo.class %]</fieldset>[% END %]
1163 [% END %][% END %][% END %]
1165 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1166 <fieldset class="rows" id="memberentry_messaging_prefs">
1167 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1169 <!-- handle changing prefs if creating new patron and changing
1172 <script type="text/javascript">//<![CDATA[
1173 $(document).ready(function(){
1174 var message_prefs_dirty = false;
1175 $('#memberentry_messaging_prefs > *').change(function() {
1176 message_prefs_dirty = true;
1178 $('#categorycode_entry').change(function() {
1179 var categorycode = $(this).val();
1180 if (message_prefs_dirty) {
1181 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1185 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1187 $.each(data.messaging_preferences, function(i, item) {
1188 var attrid = item.message_attribute_id;
1189 var transports = ['email', 'rss', 'sms'];
1190 $.each(transports, function(j, transport) {
1191 if (item['transports_' + transport] == 1) {
1192 $('#' + transport + attrid).prop('checked', true);
1194 $('#' + transport + attrid).prop('checked', false);
1197 if (item.digest && item.digest != ' ') {
1198 $('#digest' + attrid).prop('checked', true);
1200 $('#digest' + attrid).prop('checked', false);
1202 if (item.takes_days == '1') {
1203 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1206 message_prefs_dirty = false;
1214 <input type="hidden" name="setting_messaging_prefs" value="1" />
1215 [% INCLUDE 'messaging-preference-form.inc' %]
1216 [% IF ( SMSSendDriver ) %]
1217 <p><label for="SMSnumber">SMS number:</label>
1218 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1221 <label for="sms_provider_id">SMS provider:</label>
1222 <select id="sms_provider_id" name="sms_provider_id"/>
1223 <option value="">Unknown</option>
1224 [% FOREACH s IN sms_providers %]
1225 [% IF s.id == sms_provider_id %]
1226 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1228 <option value="[% s.id %]">[% s.name %]</option>
1239 [% IF quickadd && opadd && !check_member %]
1240 <form id="quick_add_form" class="toggler">
1241 <fieldset class="rows quick_add"><legend>Quick add</legend>
1242 <ol id="quick_add_list">
1247 $(document).ready(function () {
1249 $("#entryform,#saverecord").hide();
1250 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1251 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1252 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1253 $("#entryform label").each(function () {
1254 var input_label = $(this).attr('for');
1255 if ( input_label == 'sex-female' ) {
1258 else if ( input_label == 'btitle' ) {
1259 input_label='title';
1261 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1262 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1263 $(this).parent().clone().appendTo("#quick_add_list");
1264 [% UNLESS mandatorypassword %]
1265 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1269 if( $("#memberentry_guarantor").length ) {
1270 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1271 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1272 $("#quick_add_list #guarantordelete").prop('id','qagd');
1274 $("#qagd").click(function() { $("#guarantordelete").click(); });
1275 $("#quick_add_form").show();
1282 [% UNLESS ( opadd ) %]<div class="yui-b">
1283 [% INCLUDE 'members-menu.inc' %]
1287 [% INCLUDE 'intranet-bottom.inc' %]
1288 [% PROCESS 'password_check.inc' %]
1289 [% PROCESS 'add_password_check' new_password => 'password' %]