3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
7 [% INCLUDE 'calendar.inc' %]
8 <script type="text/javascript">
10 $(document).ready(function() {
12 $("#saverecord").css({ 'margin-left': 0 });
13 var original_offset = $("#toolbar").position().top;
14 var additional_height = $("#filters").height();
15 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
16 $("#filteraction_on").on("click", function(){
17 $(window).off('scroll');
18 $("#toolbar").css({ top: original_offset });
19 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
21 $("#filteraction_off").on("click", function(){
22 $(window).off('scroll');
23 $("#toolbar").css({ top: original_offset - additional_height});
24 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
28 update_category_code( "[% categorycode %]" );
30 if ( $("#categorycode_entry").length > 0 ){
31 var category_code = $("#categorycode_entry").find("option:selected").val();
32 update_category_code( category_code );
37 $(document).ready(function() {
39 var toggle_quick_add = $(".toggle_quick_add");
40 $(toggle_quick_add).click(function(e){
41 toggle_quick_add.toggle();
45 if( $("#entryform:visible").length ) {
46 toggle_to = "#quick_add_form label";
47 toggle_from = "#entryform label";
49 toggle_to="#entryform label";
50 toggle_from = "#quick_add_form label";
52 $(toggle_from).each(function() {
53 var input_label = $(this).attr('for');
54 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
55 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
58 if( $(this).next().val() != '' ) {
59 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
63 $(".toggler").toggle();
66 $("#save_quick_add").click(function(){
67 $("#quick_add_form").validate();
68 if( $("#quick_add_form").valid()){
69 $('.toggle_quick_add').click();
70 $('#saverecord').click();
74 $("#saverecord").click(function(){
75 if( check_form_borrowers() ){
76 $("#entryform").submit();
82 var MSG_SEPARATOR = _("Separator must be / in field %s");
83 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
84 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
85 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
86 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
87 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
88 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
89 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
90 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
91 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
92 var MSG_MONTH = _("%s month")
93 var MSG_MONTHS = _("%s months")
94 var MSG_YEAR = _("%s year")
95 var MSG_YEARS = _("%s years")
96 var LABEL_CHANGE = _("Change");
97 var LABEL_SET_TO_PATRON = _("Set to patron");
98 var LABEL_AGE = _("Age");
102 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
104 <body id="pat_memberentrygen" class="pat">
105 [% INCLUDE 'header.inc' %]
106 [% INCLUDE 'patron-search.inc' %]
108 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
109 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
110 <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>
112 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
118 [% IF ( error_alert == "no_email" ) %]
119 <div class="error">This member has no email</div>
121 <div class="error">[% error_alert %]</div>
125 <div class="dialog message">Email has been sent.</div>
128 [% INCLUDE 'noadd-warnings.inc' %]
130 [% UNLESS ( no_add ) %]
131 <h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1>
133 [% IF quickadd && opadd && !check_member %]
134 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
135 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
138 [% IF ( check_member ) %]
139 <div class="dialog alert">
140 <h3>Duplicate patron record?</h3>
141 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
142 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
143 <input type="hidden" name="op" value="modify" />
144 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
145 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
146 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
147 Edit existing record</button>
150 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
151 <input type="hidden" name="nodouble" value="1" />
152 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
153 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
154 Save as new record</button>
159 <div class="dialog alert">
160 <p>The following fields are wrong. Please fix them.</p>
162 [% IF ( ERROR_login_exist ) %]
163 <li id="ERROR_login_exist">Username/password already exists.</li>
165 [% IF ERROR_cardnumber_already_exists %]
166 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
168 [% IF ERROR_cardnumber_length %]
169 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
171 [% IF ( ERROR_age_limitations ) %]
172 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
173 Ages allowed are [% age_low %]-[% age_high %].</li>
175 [% IF ( ERROR_branch ) %]
176 <li id="ERROR_branch">Library is invalid.</li>
178 [% IF ( ERROR_dateofbirth ) %]
179 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
181 [% IF ( ERROR_dateenrolled ) %]
182 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
184 [% IF ( ERROR_dateexpiry ) %]
185 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
187 [% IF ( ERROR_short_password ) %]
188 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
190 [% IF ( ERROR_password_mismatch ) %]
191 <li id="ERROR_password_mismatch">Passwords do not match.</li>
193 [% IF ( ERROR_extended_unique_id_failed ) %]
194 <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>
196 [% IF ERROR_bad_email %]
197 <li id="ERROR_bad_email">The primary email is invalid.</li>
199 [% IF ERROR_bad_email_secondary %]
200 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
202 [% IF ERROR_bad_email_alternative %]
203 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
210 <div id="toolbar" class="btn-toolbar">
211 [% UNLESS ( check_member ) %]
212 [% IF quickadd && opadd %]
213 <button class="btn btn-small toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
215 <button class="btn btn-small toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
217 <a class="btn btn-small" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
219 <a class="btn btn-small" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
221 <i class="fa fa-times"></i> Cancel
226 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
227 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
228 <!-- field always hidden in different form (1,2,3) -->
229 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
230 <input type="hidden" name="category_type" value="[% category_type %]" />
231 <input type="hidden" name="updtype" value="[% updtype %]" />
232 <input type="hidden" name="destination" value="[% destination %]" />
233 <input type="hidden" name="check_member" value="[% check_member %]" />
234 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
235 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
236 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
237 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
238 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
239 [% ELSIF ( opduplicate ) %]
240 <input type="hidden" name="op" value="insert" />
242 <input type="hidden" name="op" value="save" />
243 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
244 [%# Only put the cardnumber if we arent showing it in the form later %]
246 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
252 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
253 <fieldset class="rows" id="memberentry_identity">
254 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
258 [% IF Koha.Preference('BorrowersTitles') %]
260 [% IF ( mandatorytitle ) %]
261 <label for="btitle" class="required">
266 <select id="btitle" name="title">
267 <option value=""></option>
268 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
270 <option value="[% t %]" selected="selected">[% t %]</option>
272 <option value="[% t %]">[% t %]</option>
276 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
281 [% UNLESS nosurname %]
283 [% IF ( mandatorysurname ) %]
284 <label for="surname" class="required">
286 <label for="surname">
289 [% IF ( uppercasesurnames ) %]
290 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
292 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
294 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
298 [% UNLESS nofirstname %]
300 [% IF ( mandatoryfirstname ) %]
301 <label for="firstname" class="required">
303 <label for="firstname">
306 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
307 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
310 [% UNLESS nodateofbirth %]
312 [% IF ( mandatorydateofbirth ) %]
313 <label for="dateofbirth" class="required">
315 <label for="dateofbirth">
317 Date of birth: </label>
319 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
321 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
322 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
323 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
326 [% UNLESS noinitials %]
328 [% IF ( mandatoryinitials ) %]
329 <label for="initials" class="required">
331 <label for="initials">
334 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
335 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
339 [% UNLESS noothernames %]
341 [% IF ( mandatoryothernames ) %]
342 <label for="othernames" class="required">
344 <label for="othernames">
347 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
348 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
349 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
356 [% UNLESS ( opduplicate ) %]
358 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
360 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
363 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
365 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
368 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
370 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
373 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
374 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
375 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
383 [% END # hide fieldset %]
385 [% IF ( showguarantor ) %]
386 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
388 <input type="hidden" name="branchcode" value="[% branchcode %]" />
390 <fieldset id="memberentry_guarantor" class="rows">
391 <legend id="guarantor_lgd">Guarantor information</legend>
394 [% IF ( guarantorid ) %]
395 <li id="contact-details">
397 <li id="contact-details" style="display: none">
399 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
402 <label for="contactname">Organization name: </label>
403 [% IF ( guarantorid ) %]
404 <span>[% contactname %]</span>
405 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
407 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
412 [% IF ( guarantorid ) %]
413 <li id="contact-details">
415 <li id="contact-details" style="display: none">
417 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
419 [% UNLESS nocontactname %]
421 <label for="contactname">Surname: </label>
422 [% IF ( guarantorid ) %]
423 <span>[% contactname %]</span>
424 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
426 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
430 [% UNLESS nocontactfirstname %]
432 <label for="contactfirstname">First name: </label>
433 [% IF ( guarantorid ) %]
434 <span>[% contactfirstname %]</span>
435 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
437 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
441 [% IF ( relshiploop ) %]
443 <label for="relationship">Relationship: </label>
444 <select name="relationship" id="relationship" >
445 [% FOREACH relshiploo IN relshiploop %]
446 [% IF ( relshiploo.selected ) %]
447 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
449 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
458 <span class="label"> </span>
459 [% IF ( guarantorid ) %]
460 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
462 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
464 <input id="guarantordelete" type="button" value="Delete" />
466 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
468 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
469 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
470 [% IF privacy_guarantor_checkouts %]
471 <option value="0">No</option>
472 <option value="1" selected>Yes</option>
474 <option value="0" selected>No</option>
475 <option value="1">Yes</option>
478 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
485 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
486 [% IF Koha.Preference( 'AddressFormat' ) %]
487 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
489 [% INCLUDE 'member-main-address-style-us.inc' %]
491 [% END # nostreet && nocity etc group%]
493 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
494 <fieldset class="rows" id="memberentry_contact">
495 <legend id="contact_lgd">Contact</legend><ol>
498 [% IF ( mandatoryphone ) %]
499 <label for="phone" class="required">
503 Primary phone: </label>
504 <input type="text" id="phone" name="phone" value="[% phone %]" />
505 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
509 [% UNLESS nophonepro %]
511 [% IF ( mandatoryphonepro ) %]
512 <label for="phonepro" class="required">
514 <label for="phonepro">
516 Secondary phone: </label>
517 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
518 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
521 [% UNLESS nomobile %]
523 [% IF ( mandatorymobile ) %]
524 <label for="mobile" class="required">
528 Other phone: </label>
529 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
530 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
535 [% IF ( mandatoryemail ) %]
536 <label for="email" class="required">
540 Primary email: </label>
541 <input type="text" id="email" name="email" size="45" value="[% email %]" />
542 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
546 [% UNLESS noemailpro %]
548 [% IF ( mandatoryemailpro ) %]
549 <label for="emailpro" class="required">
551 <label for="emailpro">
553 Secondary email: </label>
554 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
555 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
560 [% IF ( mandatoryfax ) %]
561 <label for="fax" class="required">
566 <input type="text" id="fax" name="fax" value="[% fax %]" />
567 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
572 [%END # hide fieldset %]
574 <!-- ************************ STEP_1 *********************** -->
578 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
579 [% IF Koha.Preference( 'AddressFormat' ) %]
580 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
582 [% INCLUDE 'member-alt-address-style-us.inc' %]
584 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
587 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
588 [% IF Koha.Preference( 'AddressFormat' ) %]
589 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
591 [% INCLUDE 'member-alt-contact-style-us.inc' %]
593 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
598 <fieldset class="rows" id="memberentry_library_management">
599 <legend id="library_management_lgd">Library management</legend><ol>
600 [% UNLESS nocardnumber %]
602 [% IF ( mandatorycardnumber ) %]
603 <label for="cardnumber" class="required">
605 <label for="cardnumber" class="validated">
607 Card number: </label>
608 [% IF minlength_cardnumber == maxlength_cardnumber %]
609 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
610 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
611 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
612 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
613 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
614 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
615 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
616 [% ELSIF maxlength_cardnumber %]
617 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
618 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
619 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
621 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
622 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
623 <div class="hint">There is no minimum or maximum character length.</div>
627 [% UNLESS nobranchcode %]
629 <label for="libraries" class="required">Library:</label>
630 <select name="branchcode" size="1" id="libraries">
631 [%- FOREACH branchloo IN branchloop %]
632 [% IF ( branchloo.selected ) -%]
633 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
635 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
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>
725 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
726 <fieldset class="rows" id="memberentry_subscription">
727 <legend id="library_setup_lgd">Library set-up</legend><ol>
728 [% UNLESS nodateenrolled %]
730 [% IF ( mandatorydateenrolled ) %]
731 <label for="from" class="required">
735 Registration date: </label>
736 [% IF ( dateformat == "metric" ) %]
737 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
739 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
741 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
742 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
743 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
746 [% UNLESS nodateexpiry %]
749 <li style="display:none">
751 [% IF ( mandatorydateexpiry ) %]
752 <label for="to" class="required">
756 Expiry date (leave blank for auto calc): </label>
757 [% IF ( dateformat == "metric" ) %]
758 [% UNLESS ( opadd ) %]
759 <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" />
761 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
764 [% UNLESS ( opadd ) %]
765 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
767 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
770 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
771 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
772 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
774 [% UNLESS noopacnote %]
776 [% IF ( mandatoryopacnote ) %]
777 <label for="opacnote" class="required">
779 <label for="opacnote">
782 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
783 <div class="hint">This message appears on this patron's user page in the OPAC</div>
784 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
787 [% UNLESS noborrowernotes %]
789 [% IF ( mandatoryborrowernotes ) %]
790 <label for="borrowernotes" class="required">
792 <label for="borrowernotes">
794 Circulation note: </label>
795 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
796 <div class="hint">This message displays when checking out to this patron</div>
797 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
802 [% END # hide fieldset %]
804 [% UNLESS nouserid && nopassword %]
805 <fieldset class="rows" id="memberentry_userid">
806 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
807 [% UNLESS nouserid %]
809 [% IF ( mandatoryuserid ) %]
810 <label for="userid" class="required">
816 [% IF ( NoUpdateLogin ) %]
817 [% IF ( opduplicate ) %]
818 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
820 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
823 [% IF ( opduplicate ) %]
824 <input type="text" id="userid" name="userid" size="20" value="" />
826 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
830 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
831 <input type="text" disabled="disabled" style="display:none" />
833 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
836 [% UNLESS nopassword %]
838 [% IF ( mandatorypassword ) %]
839 <label for="password" class="required">
841 <label for="password">
845 [% IF ( NoUpdateLogin ) %]
846 [% IF ( opduplicate ) %]
847 <input type="password" id="password" name="password" size="20" disabled="disabled" />
849 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
852 [% IF ( opduplicate ) %]
853 <input type="password" id="password" name="password" size="20" />
855 <input type="password" id="password" name="password" size="20" value="[% password %]" />
859 [% IF ( password ) %]
860 [% IF ( NoUpdateLogin ) %]
861 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
863 [% IF ( opduplicate ) %]
864 <input type="password" id="password" name="password" size="20" />
866 <input type="password" id="password" name="password" size="20" value="****" />
870 [% IF ( NoUpdateLogin ) %]
871 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
873 <input type="password" id="password" name="password" size="20" value="" />
877 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
878 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
881 [% IF ( mandatorypassword ) %]
882 <label for="password2" class="required">
884 <label for="password2">
886 Confirm password: </label>
888 [% IF ( NoUpdateLogin ) %]
889 [% IF ( opduplicate ) %]
890 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
892 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
895 [% IF ( opduplicate ) %]
896 <input type="password" id="password2" name="password2" size="20" />
898 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
902 [% IF ( password ) %]
903 [% IF ( NoUpdateLogin ) %]
904 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
906 [% IF ( opduplicate ) %]
907 <input type="password" id="password2" name="password2" size="20" />
909 <input type="password" id="password2" name="password2" size="20" value="****" />
913 [% IF ( NoUpdateLogin ) %]
914 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
916 <input type="password" id="password2" name="password2" size="20" value="" />
920 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
924 [% END # hide fieldset %][% END %]
925 <!--this zones are not necessary in modif mode -->
926 [% UNLESS ( opadd || opduplicate ) %]
927 <fieldset class="rows" id="memberentry_account_flags">
928 <legend id="account_flags_lgd">Patron account flags</legend>
930 [% FOREACH flagloo IN flagloop %]
931 <li><label class="radio" for="yes[% flagloo.name %]">
932 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
933 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
935 [% IF CAN_user_circulate_manage_restrictions %]
936 <label for="yes[% flagloo.name %]">Yes </label>
937 [% IF ( flagloo.yes ) %]
938 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
940 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
942 <label for="no[% flagloo.name %]">No </label>
943 [% IF ( flagloo.no ) %]
944 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
946 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
949 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
958 <fieldset class="rows" id="memberentry_restrictions">
959 <legend id="restrictions_lgd">Patron restrictions</legend>
961 [% IF ( debarments ) %]
968 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
975 [% FOREACH d IN debarments %]
977 <td>[% d.type %]</td>
979 [% IF d.comment.search('OVERDUES_PROCESS') %]
980 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
985 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
986 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
988 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
996 <p>Patron is currently unrestricted.</p>
999 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
1000 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1001 <fieldset id="manual_restriction_form">
1002 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1003 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1005 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1006 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1007 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1011 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1020 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1021 <fieldset class="rows" id="memberentry_patron_attributes">
1022 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1023 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1024 [% FOREACH pa_loo IN patron_attributes %]
1025 [% IF pa_loo.class %]
1026 <fieldset id="aai_[% pa_loo.class %]">
1027 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1029 <ol class="attributes_table">
1030 [% FOREACH patron_attribute IN pa_loo.items %]
1031 <li data-category_code="[% patron_attribute.category_code %]">
1032 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1033 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1034 [% IF ( patron_attribute.use_dropdown ) %]
1035 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1036 <option value=""></option>
1037 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1038 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1039 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1040 [% auth_val_loo.lib %]
1043 <option value="[% auth_val_loo.authorised_value %]" >
1044 [% auth_val_loo.lib %]
1050 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1052 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1053 [% IF ( patron_attribute.repeatable ) %]
1054 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1059 [% IF pa_loo.class %]</fieldset>[% END %]
1062 [% END %][% END %][% END %]
1064 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1065 <fieldset class="rows" id="memberentry_messaging_prefs">
1066 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1068 <!-- handle changing prefs if creating new patron and changing
1071 <script type="text/javascript">//<![CDATA[
1072 $(document).ready(function(){
1073 var message_prefs_dirty = false;
1074 $('#memberentry_messaging_prefs > *').change(function() {
1075 message_prefs_dirty = true;
1077 $('#categorycode_entry').change(function() {
1078 var categorycode = $(this).val();
1079 if (message_prefs_dirty) {
1080 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1084 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1086 $.each(data.messaging_preferences, function(i, item) {
1087 var attrid = item.message_attribute_id;
1088 var transports = ['email', 'rss', 'sms'];
1089 $.each(transports, function(j, transport) {
1090 if (item['transports_' + transport] == 1) {
1091 $('#' + transport + attrid).prop('checked', true);
1093 $('#' + transport + attrid).prop('checked', false);
1096 if (item.digest && item.digest != ' ') {
1097 $('#digest' + attrid).prop('checked', true);
1099 $('#digest' + attrid).prop('checked', false);
1101 if (item.takes_days == '1') {
1102 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1105 message_prefs_dirty = false;
1113 <input type="hidden" name="setting_messaging_prefs" value="1" />
1114 [% INCLUDE 'messaging-preference-form.inc' %]
1115 [% IF ( SMSSendDriver ) %]
1116 <p><label for="SMSnumber">SMS number:</label>
1117 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1120 <label for="sms_provider_id">SMS provider:</label>
1121 <select id="sms_provider_id" name="sms_provider_id"/>
1122 <option value="">Unknown</option>
1123 [% FOREACH s IN sms_providers %]
1124 [% IF s.id == sms_provider_id %]
1125 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1127 <option value="[% s.id %]">[% s.name %]</option>
1138 [% IF quickadd && opadd && !check_member %]
1139 <form id="quick_add_form" class="toggler">
1140 <fieldset class="rows quick_add"><legend>Quick add</legend>
1141 <ol id="quick_add_list">
1146 $(document).ready(function () {
1147 $("#entryform,#saverecord").hide();
1148 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1149 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1150 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1151 $("#entryform label").each(function () {
1152 var input_label = $(this).attr('for');
1153 if ( input_label == 'sex-female' ) {
1156 else if ( input_label == 'btitle' ) {
1157 input_label='title';
1159 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1160 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1161 $(this).parent().clone().appendTo("#quick_add_list");
1162 if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1165 if( $("#memberentry_guarantor").length ) {
1166 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1168 $("#quick_add_form").show();
1175 [% UNLESS ( opadd ) %]<div class="yui-b">
1176 [% INCLUDE 'members-menu.inc' %]
1180 [% INCLUDE 'intranet-bottom.inc' %]