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();
96 var MSG_SEPARATOR = _("Separator must be / in field %s");
97 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
98 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
99 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
100 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
101 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
102 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
103 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
104 var MSG_MONTH = _("%s month")
105 var MSG_MONTHS = _("%s months")
106 var MSG_YEAR = _("%s year")
107 var MSG_YEARS = _("%s years")
108 var LABEL_CHANGE = _("Change");
109 var LABEL_SET_TO_PATRON = _("Set to patron");
110 var LABEL_AGE = _("Age");
114 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
116 <body id="pat_memberentrygen" class="pat">
117 [% INCLUDE 'header.inc' %]
118 [% INCLUDE 'patron-search.inc' %]
120 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
121 [% 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 %]
122 <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>
124 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
130 [% IF ( error_alert == "no_email" ) %]
131 <div class="error">This member has no email</div>
133 <div class="error">[% error_alert %]</div>
137 <div class="dialog message">Email has been sent.</div>
140 [% INCLUDE 'noadd-warnings.inc' %]
142 [% UNLESS ( no_add ) %]
143 <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>
145 [% IF quickadd && opadd && !check_member %]
146 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
147 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
150 [% IF ( check_member ) %]
151 <div class="dialog alert">
152 <h3>Duplicate patron record?</h3>
153 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
154 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
155 <input type="hidden" name="op" value="modify" />
156 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
157 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
158 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
159 Edit existing record</button>
162 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
163 <input type="hidden" name="nodouble" value="1" />
164 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
165 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
166 Save as new record</button>
171 <div class="dialog alert">
172 <p>The following fields are wrong. Please fix them.</p>
174 [% IF ( ERROR_login_exist ) %]
175 <li id="ERROR_login_exist">Username/password already exists.</li>
177 [% IF ERROR_cardnumber_already_exists %]
178 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
180 [% IF ERROR_cardnumber_length %]
181 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
183 [% IF ( ERROR_age_limitations ) %]
184 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
185 Ages allowed are [% age_low %]-[% age_high %].</li>
187 [% IF ( ERROR_branch ) %]
188 <li id="ERROR_branch">Library is invalid.</li>
190 [% IF ( ERROR_dateofbirth ) %]
191 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
193 [% IF ( ERROR_dateenrolled ) %]
194 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
196 [% IF ( ERROR_dateexpiry ) %]
197 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
199 [% IF ( ERROR_short_password ) %]
200 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
202 [% IF ( ERROR_password_mismatch ) %]
203 <li id="ERROR_password_mismatch">Passwords do not match.</li>
205 [% IF ( ERROR_extended_unique_id_failed ) %]
206 <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>
208 [% IF ERROR_bad_email %]
209 <li id="ERROR_bad_email">The primary email is invalid.</li>
211 [% IF ERROR_bad_email_secondary %]
212 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
214 [% IF ERROR_bad_email_alternative %]
215 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
222 <div id="toolbar" class="btn-toolbar">
223 [% UNLESS ( check_member ) %]
224 [% IF quickadd && opadd %]
225 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
227 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
229 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
231 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
233 <i class="fa fa-times"></i> Cancel
238 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
239 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
240 <!-- field always hidden in different form (1,2,3) -->
241 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
242 <input type="hidden" name="category_type" value="[% category_type %]" />
243 <input type="hidden" name="updtype" value="[% updtype %]" />
244 <input type="hidden" name="destination" value="[% destination %]" />
245 <input type="hidden" name="check_member" value="[% check_member %]" />
246 <input type="hidden" name="borrowernumber" value="[% borrowernumber UNLESS opduplicate %]" />
247 <input type="hidden" name="nodouble" value="[% nodouble UNLESS opduplicate %]" />
248 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
249 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
250 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
251 [% ELSIF ( opduplicate ) %]
252 <input type="hidden" name="op" value="insert" />
254 <input type="hidden" name="op" value="save" />
255 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
256 [%# Only put the cardnumber if we arent showing it in the form later %]
258 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
264 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
265 <fieldset class="rows" id="memberentry_identity">
266 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
270 [% IF Koha.Preference('BorrowersTitles') %]
272 [% IF ( mandatorytitle ) %]
273 <label for="btitle" class="required">
278 <select id="btitle" name="title">
279 <option value=""></option>
280 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
282 <option value="[% t %]" selected="selected">[% t %]</option>
284 <option value="[% t %]">[% t %]</option>
288 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
293 [% UNLESS nosurname %]
295 [% IF ( mandatorysurname ) %]
296 <label for="surname" class="required">
298 <label for="surname">
301 [% IF ( uppercasesurnames ) %]
302 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
304 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
306 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
310 [% UNLESS nofirstname %]
312 [% IF ( mandatoryfirstname ) %]
313 <label for="firstname" class="required">
315 <label for="firstname">
318 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
319 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
322 [% UNLESS nodateofbirth %]
324 [% IF ( mandatorydateofbirth ) %]
325 <label for="dateofbirth" class="required">
327 <label for="dateofbirth">
329 Date of birth: </label>
331 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth UNLESS opduplicate %]" class="datepicker" />
333 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
334 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
335 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
338 [% UNLESS noinitials %]
340 [% IF ( mandatoryinitials ) %]
341 <label for="initials" class="required">
343 <label for="initials">
346 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
347 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
351 [% UNLESS noothernames %]
353 [% IF ( mandatoryothernames ) %]
354 <label for="othernames" class="required">
356 <label for="othernames">
359 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
360 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
361 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
368 [% UNLESS ( opduplicate ) %]
370 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
372 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
375 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
377 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
380 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
382 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
385 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
386 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
387 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
395 [% END # hide fieldset %]
397 [% IF ( showguarantor ) %]
398 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
400 <input type="hidden" name="branchcode" value="[% branchcode %]" />
402 <fieldset id="memberentry_guarantor" class="rows">
403 <legend id="guarantor_lgd">Guarantor information</legend>
406 [% IF ( guarantorid ) %]
407 <li id="contact-details">
409 <li id="contact-details" style="display: none">
411 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
414 <label for="contactname">Organization name: </label>
415 [% IF ( guarantorid ) %]
416 <span>[% contactname %]</span>
417 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
419 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
424 [% IF ( guarantorid ) %]
425 <li id="contact-details">
427 <li id="contact-details" style="display: none">
429 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid |html %]</a>[% END %]
431 [% UNLESS nocontactname %]
433 <label for="contactname">Surname: </label>
434 [% IF ( guarantorid ) %]
435 <span>[% contactname %]</span>
436 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
438 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
442 [% UNLESS nocontactfirstname %]
444 <label for="contactfirstname">First name: </label>
445 [% IF ( guarantorid ) %]
446 <span>[% contactfirstname %]</span>
447 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
449 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
453 [% IF ( relshiploop ) %]
455 <label for="relationship">Relationship: </label>
456 <select name="relationship" id="relationship" >
457 [% FOREACH relshiploo IN relshiploop %]
458 [% IF ( relshiploo.selected ) %]
459 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
461 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
470 <span class="label"> </span>
471 [% IF ( guarantorid ) %]
472 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
474 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
476 <input id="guarantordelete" type="button" value="Delete" />
478 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
480 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
481 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
482 [% IF privacy_guarantor_checkouts %]
483 <option value="0">No</option>
484 <option value="1" selected>Yes</option>
486 <option value="0" selected>No</option>
487 <option value="1">Yes</option>
490 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
497 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
498 [% IF Koha.Preference( 'AddressFormat' ) %]
499 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
501 [% INCLUDE 'member-main-address-style-us.inc' %]
503 [% END # nostreet && nocity etc group%]
505 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
506 <fieldset class="rows" id="memberentry_contact">
507 <legend id="contact_lgd">Contact</legend><ol>
510 [% IF ( mandatoryphone ) %]
511 <label for="phone" class="required">
515 Primary phone: </label>
516 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
517 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
521 [% UNLESS nophonepro %]
523 [% IF ( mandatoryphonepro ) %]
524 <label for="phonepro" class="required">
526 <label for="phonepro">
528 Secondary phone: </label>
529 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
530 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
533 [% UNLESS nomobile %]
535 [% IF ( mandatorymobile ) %]
536 <label for="mobile" class="required">
540 Other phone: </label>
541 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
542 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
547 [% IF ( mandatoryemail ) %]
548 <label for="email" class="required">
552 Primary email: </label>
553 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
554 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
558 [% UNLESS noemailpro %]
560 [% IF ( mandatoryemailpro ) %]
561 <label for="emailpro" class="required">
563 <label for="emailpro">
565 Secondary email: </label>
566 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
567 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
572 [% IF ( mandatoryfax ) %]
573 <label for="fax" class="required">
578 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
579 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
584 [%END # hide fieldset %]
586 <!-- ************************ STEP_1 *********************** -->
590 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
591 [% IF Koha.Preference( 'AddressFormat' ) %]
592 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
594 [% INCLUDE 'member-alt-address-style-us.inc' %]
596 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
599 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
600 [% IF Koha.Preference( 'AddressFormat' ) %]
601 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
603 [% INCLUDE 'member-alt-contact-style-us.inc' %]
605 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
610 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
611 <fieldset class="rows" id="memberentry_library_management">
612 <legend id="library_management_lgd">Library management</legend><ol>
613 [% UNLESS nocardnumber %]
615 [% IF mandatorycardnumber and not autoMemberNum %]
616 <label for="cardnumber" class="required">
618 <label for="cardnumber" class="validated">
620 [% IF autoMemberNum %]
621 Card number<br>(<u>leave blank for auto calc during registration</u>): </label>
623 Card number: </label>
625 [% IF minlength_cardnumber == maxlength_cardnumber %]
626 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
627 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
628 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
629 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
630 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
631 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
632 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
633 [% ELSIF maxlength_cardnumber %]
634 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
635 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
636 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
638 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
639 [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
640 <div class="hint">There is no minimum or maximum character length.</div>
644 [% UNLESS nobranchcode %]
646 <label for="libraries" class="required">Library:</label>
647 <select name="branchcode" size="1" id="libraries">
648 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch ) %]
650 <span class="required">Required</span>
654 <label for="categorycode_entry" class="required">Category: </label>
655 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
656 [% FOREACH typeloo IN typeloop %]
657 [% FOREACH categoryloo IN typeloo.categoryloop %]
658 [% IF ( loop.first ) %]
659 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
660 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
661 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
662 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
663 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
664 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
666 [% IF ( categoryloo.categorycodeselected ) %]
667 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
669 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
671 [% IF ( loop.last ) %]
677 <span class="required">Required</span>
681 [% IF ( mandatorysort1 ) %]
682 <label for="sort1" class="required">
687 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
688 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
693 [% IF ( mandatorysort2 ) %]
694 <label for="sort2" class="required">
699 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
700 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
703 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
705 <label for="sort2">Sync with the Norwegian national patron database:</label>
706 [% IF ( sync == 0 ) %]
707 <input type="radio" id="sync" name="sync" value="1"> Yes
708 <input type="radio" id="sync" name="sync" value="0" checked> No
710 <input type="radio" id="sync" name="sync" value="1" checked> Yes
711 <input type="radio" id="sync" name="sync" value="0"> No
715 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
716 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
717 <select name="checkprevcheckout" id="checkprevcheckout">
718 [% IF ( checkprevcheckout == 'yes' ) %]
719 <option value="yes" selected="selected">Yes if settings allow it</option>
720 <option value="no">No if settings allow it</option>
721 <option value="inherit">Inherit from settings</option>
722 [% ELSIF ( checkprevcheckout == 'no' ) %]
723 <option value="yes">Yes if settings allow it</option>
724 <option value="no" selected="selected">No if settings allow it</option>
725 <option value="inherit">Inherit from settings</option>
727 <option value="yes">Yes if settings allow it</option>
728 <option value="no">No if settings allow it</option>
729 <option value="inherit" selected="selected">Inherit from settings</option>
734 [% IF Koha.Preference('TranslateNotices') %]
736 <label for="lang">Preferred language for notices: </label>
737 <select id="lang" name="lang">
738 <option value="default">Default</option>
739 [% FOR language IN languages %]
740 [% FOR sublanguage IN language.sublanguages_loop %]
741 [% IF language.plural %]
742 [% IF sublanguage.rfc4646_subtag == lang %]
743 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
745 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
748 [% IF sublanguage.rfc4646_subtag == lang %]
749 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
751 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
761 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
762 <fieldset class="rows" id="memberentry_subscription">
763 <legend id="library_setup_lgd">Library set-up</legend><ol>
764 [% UNLESS nodateenrolled %]
766 [% IF ( mandatorydateenrolled ) %]
767 <label for="from" class="required">
771 Registration date: </label>
772 [% IF ( dateformat == "metric" ) %]
773 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
775 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
777 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
778 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
779 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
782 [% UNLESS nodateexpiry %]
785 <li style="display:none">
787 [% IF ( mandatorydateexpiry ) %]
788 <label for="to" class="required">
792 Expiry date (leave blank for auto calc): </label>
793 [% IF ( dateformat == "metric" ) %]
794 [% UNLESS ( opadd ) %]
795 <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" />
797 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
800 [% UNLESS ( opadd ) %]
801 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
803 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
806 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
807 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
808 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
810 [% UNLESS noopacnote %]
812 [% IF ( mandatoryopacnote ) %]
813 <label for="opacnote" class="required">
815 <label for="opacnote">
818 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
819 <div class="hint">This message appears on this patron's user page in the OPAC</div>
820 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
823 [% UNLESS noborrowernotes %]
825 [% IF ( mandatoryborrowernotes ) %]
826 <label for="borrowernotes" class="required">
828 <label for="borrowernotes">
830 Circulation note: </label>
831 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
832 <div class="hint">This message displays when checking out to this patron</div>
833 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
838 [% END # hide fieldset %]
840 [% UNLESS nouserid && nopassword %]
841 <fieldset class="rows" id="memberentry_userid">
842 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
843 [% UNLESS nouserid %]
845 [% IF ( mandatoryuserid ) %]
846 <label for="userid" class="required">
852 [% IF ( NoUpdateLogin ) %]
853 [% IF ( opduplicate ) %]
854 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
856 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
859 [% IF ( opduplicate ) %]
860 <input type="text" id="userid" name="userid" size="20" value="" />
862 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
866 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
867 <input type="text" disabled="disabled" style="display:none" />
869 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
872 [% UNLESS nopassword %]
874 [% IF ( mandatorypassword ) %]
875 <label for="password" class="required">
877 <label for="password">
881 [% IF ( NoUpdateLogin ) %]
882 [% IF ( opduplicate ) %]
883 <input type="password" id="password" name="password" size="20" disabled="disabled" />
885 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
888 [% IF ( opduplicate ) %]
889 <input type="password" id="password" name="password" size="20" />
891 <input type="password" id="password" name="password" size="20" value="[% password %]" />
895 [% IF ( password ) %]
896 [% IF ( NoUpdateLogin ) %]
897 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
899 [% IF ( opduplicate ) %]
900 <input type="password" id="password" name="password" size="20" />
902 <input type="password" id="password" name="password" size="20" value="****" />
906 [% IF ( NoUpdateLogin ) %]
907 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
909 <input type="password" id="password" name="password" size="20" value="" />
913 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
914 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
917 [% IF ( mandatorypassword ) %]
918 <label for="password2" class="required">
920 <label for="password2">
922 Confirm password: </label>
924 [% IF ( NoUpdateLogin ) %]
925 [% IF ( opduplicate ) %]
926 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
928 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
931 [% IF ( opduplicate ) %]
932 <input type="password" id="password2" name="password2" size="20" />
934 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
938 [% IF ( password ) %]
939 [% IF ( NoUpdateLogin ) %]
940 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
942 [% IF ( opduplicate ) %]
943 <input type="password" id="password2" name="password2" size="20" />
945 <input type="password" id="password2" name="password2" size="20" value="****" />
949 [% IF ( NoUpdateLogin ) %]
950 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
952 <input type="password" id="password2" name="password2" size="20" value="" />
956 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
960 [% END # hide fieldset %][% END %]
961 <!--this zones are not necessary in modif mode -->
962 [% UNLESS ( opadd || opduplicate ) %]
963 <fieldset class="rows" id="memberentry_account_flags">
964 <legend id="account_flags_lgd">Patron account flags</legend>
966 [% FOREACH flagloo IN flagloop %]
967 <li><label class="radio" for="yes[% flagloo.name %]">
968 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
969 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
971 [% IF CAN_user_circulate_manage_restrictions %]
972 <label for="yes[% flagloo.name %]">
973 [% IF ( flagloo.yes ) %]
974 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
976 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
979 <label for="no[% flagloo.name %]">
980 [% IF ( flagloo.no ) %]
981 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
983 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
987 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
996 <fieldset class="rows" id="memberentry_restrictions">
997 <legend id="restrictions_lgd">Patron restrictions</legend>
999 [% IF ( debarments ) %]
1006 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1013 [% FOREACH d IN debarments %]
1015 <td>[% d.type %]</td>
1017 [% IF d.comment.search('OVERDUES_PROCESS') %]
1018 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
1023 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
1024 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1026 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
1034 <p>Patron is currently unrestricted.</p>
1037 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1038 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1039 <fieldset id="manual_restriction_form">
1040 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1041 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1043 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1044 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1045 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1049 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1059 [% IF Koha.Preference('HouseboundModule') %]
1060 <fieldset class="rows" id="memberentry_housebound_roles">
1061 <legend id="housebound_roles">Housebound roles</legend>
1064 <label class="radio" for="housebound_chooser">
1067 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1068 <label for="yes_housebound_chooser">Yes </label>
1069 <input type="radio" id="yes_housebound_chooser"
1070 name="housebound_chooser" value="1"
1071 checked="checked" />
1072 <label for="no_housebound_chooser">No </label>
1073 <input type="radio" id="no_housebound_chooser"
1074 name="housebound_chooser" value="0" />
1076 <label for="yes_housebound_chooser">Yes </label>
1077 <input type="radio" id="yes_housebound_chooser"
1078 name="housebound_chooser" value="1" />
1079 <label for="no_housebound_chooser">No </label>
1080 <input type="radio" id="no_housebound_chooser"
1081 name="housebound_chooser" value="0"
1082 checked="checked" />
1086 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1087 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1088 <label for="yes_housebound_deliverer">Yes </label>
1089 <input type="radio" id="yes_housebound_deliverer"
1090 name="housebound_deliverer" value="1"
1091 checked="checked" />
1092 <label for="no_housebound_deliverer">No </label>
1093 <input type="radio" id="no_housebound_deliverer"
1094 name="housebound_deliverer" value="0" />
1096 <label for="yes_housebound_deliverer">Yes </label>
1097 <input type="radio" id="yes_housebound_deliverer"
1098 name="housebound_deliverer" value="1" />
1099 <label for="no_housebound_deliverer">No </label>
1100 <input type="radio" id="no_housebound_deliverer"
1101 name="housebound_deliverer" value="0"
1102 checked="checked" />
1107 [% END # hide fieldset %]
1108 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1109 <fieldset class="rows" id="memberentry_patron_attributes">
1110 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1111 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1112 [% FOREACH pa_loo IN patron_attributes %]
1113 [% IF pa_loo.class %]
1114 <fieldset id="aai_[% pa_loo.class %]">
1115 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1117 <ol class="attributes_table">
1118 [% FOREACH patron_attribute IN pa_loo.items %]
1119 <li data-category_code="[% patron_attribute.category_code %]">
1120 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1121 [% IF ( patron_attribute.use_dropdown ) %]
1122 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1123 <option value=""></option>
1124 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1125 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1126 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1127 [% auth_val_loo.lib %]
1130 <option value="[% auth_val_loo.authorised_value %]" >
1131 [% auth_val_loo.lib %]
1137 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1139 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1140 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1141 [% IF ( patron_attribute.repeatable ) %]
1142 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1147 [% IF pa_loo.class %]</fieldset>[% END %]
1150 [% END %][% END %][% END %]
1152 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1153 <fieldset class="rows" id="memberentry_messaging_prefs">
1154 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1156 <!-- handle changing prefs if creating new patron and changing
1159 <script type="text/javascript">//<![CDATA[
1160 $(document).ready(function(){
1161 var message_prefs_dirty = false;
1162 $('#memberentry_messaging_prefs > *').change(function() {
1163 message_prefs_dirty = true;
1165 $('#categorycode_entry').change(function() {
1166 var categorycode = $(this).val();
1167 if (message_prefs_dirty) {
1168 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1172 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1174 $.each(data.messaging_preferences, function(i, item) {
1175 var attrid = item.message_attribute_id;
1176 var transports = ['email', 'rss', 'sms'];
1177 $.each(transports, function(j, transport) {
1178 if (item['transports_' + transport] == 1) {
1179 $('#' + transport + attrid).prop('checked', true);
1181 $('#' + transport + attrid).prop('checked', false);
1184 if (item.digest && item.digest != ' ') {
1185 $('#digest' + attrid).prop('checked', true);
1187 $('#digest' + attrid).prop('checked', false);
1189 if (item.takes_days == '1') {
1190 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1193 message_prefs_dirty = false;
1201 <input type="hidden" name="setting_messaging_prefs" value="1" />
1202 [% INCLUDE 'messaging-preference-form.inc' %]
1203 [% IF ( SMSSendDriver ) %]
1204 <p><label for="SMSnumber">SMS number:</label>
1205 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1208 <label for="sms_provider_id">SMS provider:</label>
1209 <select id="sms_provider_id" name="sms_provider_id"/>
1210 <option value="">Unknown</option>
1211 [% FOREACH s IN sms_providers %]
1212 [% IF s.id == sms_provider_id %]
1213 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1215 <option value="[% s.id %]">[% s.name %]</option>
1226 [% IF quickadd && opadd && !check_member %]
1227 <form id="quick_add_form" class="toggler">
1228 <fieldset class="rows quick_add"><legend>Quick add</legend>
1229 <ol id="quick_add_list">
1234 $(document).ready(function () {
1236 $("#entryform,#saverecord").hide();
1237 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1238 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1239 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1240 $("#entryform label").each(function () {
1241 var input_label = $(this).attr('for');
1242 if ( input_label == 'sex-female' ) {
1245 else if ( input_label == 'btitle' ) {
1246 input_label='title';
1248 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1249 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1250 $(this).parent().clone().appendTo("#quick_add_list");
1251 [% UNLESS mandatorypassword %]
1252 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1256 if( $("#memberentry_guarantor").length ) {
1257 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1258 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1259 $("#quick_add_list #guarantordelete").prop('id','qagd');
1261 $("#qagd").click(function() { $("#guarantordelete").click(); });
1262 $("#quick_add_form").show();
1269 [% UNLESS ( opadd ) %]<div class="yui-b">
1270 [% INCLUDE 'members-menu.inc' %]
1274 [% INCLUDE 'intranet-bottom.inc' %]
1275 [% PROCESS 'password_check.inc' %]
1276 [% PROCESS 'add_password_check' new_password => 'password' %]