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 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
129 [% IF ( no_branches ) %]<p><strong>There are no libraries defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/branches.pl">Please add a library.</a>[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
130 [% IF ( no_categories ) %]<p><strong>There are no patron categories defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categories.pl">Please add a patron category.</a>[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
132 [% UNLESS ( no_add ) %]
133 <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>
135 [% IF quickadd && opadd && !check_member %]
136 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
137 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
140 [% IF ( check_member ) %]
141 <div class="dialog alert">
142 <h3>Duplicate patron record?</h3>
143 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
144 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
145 <input type="hidden" name="op" value="modify" />
146 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
147 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
148 Edit existing record</button>
151 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
152 <input type="hidden" name="nodouble" value="1" />
153 <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 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
237 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
238 [% ELSIF ( opduplicate ) %]
239 <input type="hidden" name="op" value="insert" />
241 <input type="hidden" name="op" value="save" />
242 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
243 [%# Only put the cardnumber if we arent showing it in the form later %]
245 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
251 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
252 <fieldset class="rows" id="memberentry_identity">
253 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
257 [% IF ( title_cgipopup ) %]
259 [% IF ( mandatorytitle ) %]
260 <label for="btitle" class="required">
265 [% borrotitlepopup %]
266 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
271 [% UNLESS nosurname %]
273 [% IF ( mandatorysurname ) %]
274 <label for="surname" class="required">
276 <label for="surname">
279 [% IF ( uppercasesurnames ) %]
280 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
282 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
284 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
288 [% UNLESS nofirstname %]
290 [% IF ( mandatoryfirstname ) %]
291 <label for="firstname" class="required">
293 <label for="firstname">
296 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
297 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
300 [% UNLESS nodateofbirth %]
302 [% IF ( mandatorydateofbirth ) %]
303 <label for="dateofbirth" class="required">
305 <label for="dateofbirth">
307 Date of birth: </label>
309 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
311 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
312 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
313 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
316 [% UNLESS noinitials %]
318 [% IF ( mandatoryinitials ) %]
319 <label for="initials" class="required">
321 <label for="initials">
324 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
325 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
329 [% UNLESS noothernames %]
331 [% IF ( mandatoryothernames ) %]
332 <label for="othernames" class="required">
334 <label for="othernames">
337 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
338 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
339 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
346 [% UNLESS ( opduplicate ) %]
348 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
350 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
353 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
355 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
358 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
360 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
363 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
364 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
365 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
373 [% END # hide fieldset %]
375 [% IF ( showguarantor ) %]
376 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
378 <input type="hidden" name="branchcode" value="[% branchcode %]" />
380 <fieldset id="memberentry_guarantor" class="rows">
381 <legend id="guarantor_lgd">Guarantor information</legend>
384 [% IF ( guarantorid ) %]
385 <li id="contact-details">
387 <li id="contact-details" style="display: none">
389 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
392 <label for="contactname">Organization name: </label>
393 [% IF ( guarantorid ) %]
394 <span>[% contactname %]</span>
395 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
397 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
402 [% IF ( guarantorid ) %]
403 <li id="contact-details">
405 <li id="contact-details" style="display: none">
407 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
409 [% UNLESS nocontactname %]
411 <label for="contactname">Surname: </label>
412 [% IF ( guarantorid ) %]
413 <span>[% contactname %]</span>
414 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
416 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
420 [% UNLESS nocontactfirstname %]
422 <label for="contactfirstname">First name: </label>
423 [% IF ( guarantorid ) %]
424 <span>[% contactfirstname %]</span>
425 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
427 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
431 [% IF ( relshiploop ) %]
433 <label for="relationship">Relationship: </label>
434 <select name="relationship" id="relationship" >
435 [% FOREACH relshiploo IN relshiploop %]
436 [% IF ( relshiploo.selected ) %]
437 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
439 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
448 <span class="label"> </span>
449 [% IF ( guarantorid ) %]
450 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
452 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
454 <input id="guarantordelete" type="button" value="Delete" />
456 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
458 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
459 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
460 [% IF privacy_guarantor_checkouts %]
461 <option value="0">No</option>
462 <option value="1" selected>Yes</option>
464 <option value="0" selected>No</option>
465 <option value="1">Yes</option>
468 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
475 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
476 [% IF Koha.Preference( 'AddressFormat' ) %]
477 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
479 [% INCLUDE 'member-main-address-style-us.inc' %]
481 [% END # nostreet && nocity etc group%]
483 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
484 <fieldset class="rows" id="memberentry_contact">
485 <legend id="contact_lgd">Contact</legend><ol>
488 [% IF ( mandatoryphone ) %]
489 <label for="phone" class="required">
493 Primary phone: </label>
494 <input type="text" id="phone" name="phone" value="[% phone %]" />
495 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
499 [% UNLESS nophonepro %]
501 [% IF ( mandatoryphonepro ) %]
502 <label for="phonepro" class="required">
504 <label for="phonepro">
506 Secondary phone: </label>
507 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
508 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
511 [% UNLESS nomobile %]
513 [% IF ( mandatorymobile ) %]
514 <label for="mobile" class="required">
518 Other phone: </label>
519 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
520 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
525 [% IF ( mandatoryemail ) %]
526 <label for="email" class="required">
530 Primary email: </label>
531 <input type="text" id="email" name="email" size="45" value="[% email %]" />
532 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
536 [% UNLESS noemailpro %]
538 [% IF ( mandatoryemailpro ) %]
539 <label for="emailpro" class="required">
541 <label for="emailpro">
543 Secondary email: </label>
544 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
545 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
550 [% IF ( mandatoryfax ) %]
551 <label for="fax" class="required">
556 <input type="text" id="fax" name="fax" value="[% fax %]" />
557 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
562 [%END # hide fieldset %]
564 <!-- ************************ STEP_1 *********************** -->
568 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
569 [% IF Koha.Preference( 'AddressFormat' ) %]
570 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
572 [% INCLUDE 'member-alt-address-style-us.inc' %]
574 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
577 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
578 [% IF Koha.Preference( 'AddressFormat' ) %]
579 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
581 [% INCLUDE 'member-alt-contact-style-us.inc' %]
583 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
588 <fieldset class="rows" id="memberentry_library_management">
589 <legend id="library_management_lgd">Library management</legend><ol>
590 [% UNLESS nocardnumber %]
592 [% IF ( mandatorycardnumber ) %]
593 <label for="cardnumber" class="required">
595 <label for="cardnumber" class="validated">
597 Card number: </label>
598 [% IF minlength_cardnumber == maxlength_cardnumber %]
599 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
600 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
601 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
602 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
603 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
604 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
605 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
606 [% ELSIF maxlength_cardnumber %]
607 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
608 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
609 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
611 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
612 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
613 <div class="hint">There is no minimum or maximum character length.</div>
617 [% UNLESS nobranchcode %]
619 <label for="libraries" class="required">Library:</label>
620 <select name="branchcode" size="1" id="libraries">
621 [%- FOREACH branchloo IN branchloop %]
622 [% IF ( branchloo.selected ) -%]
623 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
625 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
629 <span class="required">Required</span>
633 <label for="categorycode_entry" class="required">Category: </label>
634 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
635 [% FOREACH typeloo IN typeloop %]
636 [% FOREACH categoryloo IN typeloo.categoryloop %]
637 [% IF ( loop.first ) %]
638 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
639 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
640 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
641 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
642 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
643 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
645 [% IF ( categoryloo.categorycodeselected ) %]
646 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
648 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
650 [% IF ( loop.last ) %]
656 <span class="required">Required</span>
660 [% IF ( mandatorysort1 ) %]
661 <label for="sort1" class="required">
666 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
667 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
672 [% IF ( mandatorysort2 ) %]
673 <label for="sort2" class="required">
678 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
679 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
682 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
684 <label for="sort2">Sync with the Norwegian national patron database:</label>
685 [% IF ( sync == 0 ) %]
686 <input type="radio" id="sync" name="sync" value="1"> Yes
687 <input type="radio" id="sync" name="sync" value="0" checked> No
689 <input type="radio" id="sync" name="sync" value="1" checked> Yes
690 <input type="radio" id="sync" name="sync" value="0"> No
696 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
697 <fieldset class="rows" id="memberentry_subscription">
698 <legend id="library_setup_lgd">Library set-up</legend><ol>
699 [% UNLESS nodateenrolled %]
701 [% IF ( mandatorydateenrolled ) %]
702 <label for="from" class="required">
706 Registration date: </label>
707 [% IF ( dateformat == "metric" ) %]
708 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
710 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
712 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
713 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
714 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
717 [% UNLESS nodateexpiry %]
720 <li style="display:none">
722 [% IF ( mandatorydateexpiry ) %]
723 <label for="to" class="required">
727 Expiry date (leave blank for auto calc): </label>
728 [% IF ( dateformat == "metric" ) %]
729 [% UNLESS ( opadd ) %]
730 <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" />
732 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
735 [% UNLESS ( opadd ) %]
736 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
738 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
741 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
742 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
743 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
745 [% UNLESS noopacnote %]
747 [% IF ( mandatoryopacnote ) %]
748 <label for="opacnote" class="required">
750 <label for="opacnote">
753 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
754 <div class="hint">This message appears on this patron's user page in the OPAC</div>
755 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
758 [% UNLESS noborrowernotes %]
760 [% IF ( mandatoryborrowernotes ) %]
761 <label for="borrowernotes" class="required">
763 <label for="borrowernotes">
765 Circulation note: </label>
766 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
767 <div class="hint">This message displays when checking out to this patron</div>
768 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
773 [% END # hide fieldset %]
775 [% UNLESS nouserid && nopassword %]
776 <fieldset class="rows" id="memberentry_userid">
777 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
778 [% UNLESS nouserid %]
780 [% IF ( mandatoryuserid ) %]
781 <label for="userid" class="required">
787 [% IF ( NoUpdateLogin ) %]
788 [% IF ( opduplicate ) %]
789 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
791 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
794 [% IF ( opduplicate ) %]
795 <input type="text" id="userid" name="userid" size="20" value="" />
797 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
801 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
802 <input type="text" disabled="disabled" style="display:none" />
804 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
807 [% UNLESS nopassword %]
809 [% IF ( mandatorypassword ) %]
810 <label for="password" class="required">
812 <label for="password">
816 [% IF ( NoUpdateLogin ) %]
817 [% IF ( opduplicate ) %]
818 <input type="password" id="password" name="password" size="20" disabled="disabled" />
820 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
823 [% IF ( opduplicate ) %]
824 <input type="password" id="password" name="password" size="20" />
826 <input type="password" id="password" name="password" size="20" value="[% password %]" />
830 [% IF ( password ) %]
831 [% IF ( NoUpdateLogin ) %]
832 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
834 [% IF ( opduplicate ) %]
835 <input type="password" id="password" name="password" size="20" />
837 <input type="password" id="password" name="password" size="20" value="****" />
841 [% IF ( NoUpdateLogin ) %]
842 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
844 <input type="password" id="password" name="password" size="20" value="" />
848 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
849 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
852 [% IF ( mandatorypassword ) %]
853 <label for="password2" class="required">
855 <label for="password2">
857 Confirm password: </label>
859 [% IF ( NoUpdateLogin ) %]
860 [% IF ( opduplicate ) %]
861 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
863 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
866 [% IF ( opduplicate ) %]
867 <input type="password" id="password2" name="password2" size="20" />
869 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
873 [% IF ( password ) %]
874 [% IF ( NoUpdateLogin ) %]
875 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
877 [% IF ( opduplicate ) %]
878 <input type="password" id="password2" name="password2" size="20" />
880 <input type="password" id="password2" name="password2" size="20" value="****" />
884 [% IF ( NoUpdateLogin ) %]
885 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
887 <input type="password" id="password2" name="password2" size="20" value="" />
891 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
895 [% END # hide fieldset %][% END %]
896 <!--this zones are not necessary in modif mode -->
897 [% UNLESS ( opadd || opduplicate ) %]
898 <fieldset class="rows" id="memberentry_account_flags">
899 <legend id="account_flags_lgd">Patron account flags</legend>
901 [% FOREACH flagloo IN flagloop %]
902 <li><label class="radio" for="yes[% flagloo.name %]">
903 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
904 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
906 [% IF CAN_user_circulate_manage_restrictions %]
907 <label for="yes[% flagloo.name %]">Yes </label>
908 [% IF ( flagloo.yes ) %]
909 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
911 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
913 <label for="no[% flagloo.name %]">No </label>
914 [% IF ( flagloo.no ) %]
915 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
917 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
920 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
929 <fieldset class="rows" id="memberentry_restrictions">
930 <legend id="restrictions_lgd">Patron restrictions</legend>
932 [% IF ( debarments ) %]
939 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
946 [% FOREACH d IN debarments %]
948 <td>[% d.type %]</td>
950 [% IF d.comment.search('OVERDUES_PROCESS') %]
951 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
956 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
957 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
959 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
967 <p>Patron is currently unrestricted.</p>
970 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
971 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
972 <fieldset id="manual_restriction_form">
973 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
974 <legend id="manual_restriction_lgd">Add manual restriction</legend>
976 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
977 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" readonly="readonly" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
978 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
982 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
991 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
992 <fieldset class="rows" id="memberentry_patron_attributes">
993 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
994 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
995 [% FOREACH pa_loo IN patron_attributes %]
996 [% IF pa_loo.class %]
997 <fieldset id="aai_[% pa_loo.class %]">
998 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1000 <ol class="attributes_table">
1001 [% FOREACH patron_attribute IN pa_loo.items %]
1002 <li data-category_code="[% patron_attribute.category_code %]">
1003 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1004 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1005 [% IF ( patron_attribute.use_dropdown ) %]
1006 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1007 <option value=""></option>
1008 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1009 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1010 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1011 [% auth_val_loo.lib %]
1014 <option value="[% auth_val_loo.authorised_value %]" >
1015 [% auth_val_loo.lib %]
1021 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1023 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1024 [% IF ( patron_attribute.repeatable ) %]
1025 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1030 [% IF pa_loo.class %]</fieldset>[% END %]
1033 [% END %][% END %][% END %]
1035 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1036 <fieldset class="rows" id="memberentry_messaging_prefs">
1037 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1039 <!-- handle changing prefs if creating new patron and changing
1042 <script type="text/javascript">//<![CDATA[
1043 $(document).ready(function(){
1044 var message_prefs_dirty = false;
1045 $('#memberentry_messaging_prefs > *').change(function() {
1046 message_prefs_dirty = true;
1048 $('#categorycode_entry').change(function() {
1049 var categorycode = $(this).val();
1050 if (message_prefs_dirty) {
1051 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1055 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1057 $.each(data.messaging_preferences, function(i, item) {
1058 var attrid = item.message_attribute_id;
1059 var transports = ['email', 'rss', 'sms'];
1060 $.each(transports, function(j, transport) {
1061 if (item['transports_' + transport] == 1) {
1062 $('#' + transport + attrid).prop('checked', true);
1064 $('#' + transport + attrid).prop('checked', false);
1067 if (item.digest && item.digest != ' ') {
1068 $('#digest' + attrid).prop('checked', true);
1070 $('#digest' + attrid).prop('checked', false);
1072 if (item.takes_days == '1') {
1073 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1076 message_prefs_dirty = false;
1084 <input type="hidden" name="setting_messaging_prefs" value="1" />
1085 [% INCLUDE 'messaging-preference-form.inc' %]
1086 [% IF ( SMSSendDriver ) %]
1087 <p><label for="SMSnumber">SMS number:</label>
1088 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1091 <label for="sms_provider_id">SMS provider:</label>
1092 <select id="sms_provider_id" name="sms_provider_id"/>
1093 <option value="">Unknown</option>
1094 [% FOREACH s IN sms_providers %]
1095 [% IF s.id == sms_provider_id %]
1096 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1098 <option value="[% s.id %]">[% s.name %]</option>
1109 [% IF quickadd && opadd && !check_member %]
1110 <form id="quick_add_form" class="toggler">
1111 <fieldset class="rows quick_add"><legend>Quick add</legend>
1112 <ol id="quick_add_list">
1117 $(document).ready(function () {
1118 $("#entryform,#saverecord").hide();
1119 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1120 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1121 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1122 $("#entryform label").each(function () {
1123 var input_label = $(this).attr('for');
1124 if ( input_label == 'sex-female' ) {
1127 else if ( input_label == 'btitle' ) {
1128 input_label='title';
1130 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1131 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1132 $(this).parent().clone().appendTo("#quick_add_list");
1133 if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1136 if( $("#memberentry_guarantor").length ) {
1137 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1139 $("#quick_add_form").show();
1146 [% UNLESS ( opadd ) %]<div class="yui-b">
1147 [% INCLUDE 'members-menu.inc' %]
1151 [% INCLUDE 'intranet-bottom.inc' %]