4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
8 [% INCLUDE 'calendar.inc' %]
9 <script type="text/javascript">
11 $(document).ready(function() {
13 $("#saverecord").css({ 'margin-left': 0 });
14 var original_offset = $("#toolbar").position().top;
15 var additional_height = $("#filters").height();
16 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
17 $("#filteraction_on").on("click", function(){
18 $(window).off('scroll');
19 $("#toolbar").css({ top: original_offset });
20 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
22 $("#filteraction_off").on("click", function(){
23 $(window).off('scroll');
24 $("#toolbar").css({ top: original_offset - additional_height});
25 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
29 update_category_code( "[% categorycode %]" );
31 if ( $("#categorycode_entry").length > 0 ){
32 var category_code = $("#categorycode_entry").find("option:selected").val();
33 update_category_code( category_code );
38 $(document).ready(function() {
40 var toggle_quick_add = $(".toggle_quick_add");
41 $(toggle_quick_add).click(function(e){
42 toggle_quick_add.toggle();
46 if( $("#entryform:visible").length ) {
47 toggle_to = "#quick_add_form label";
48 toggle_from = "#entryform label";
50 toggle_to="#entryform label";
51 toggle_from = "#quick_add_form label";
53 $(toggle_from).each(function() {
54 var input_label = $(this).attr('for');
55 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
56 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
59 if( $(this).next().val() != '' ) {
60 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
64 $(".toggler").toggle();
67 $("#save_quick_add").click(function(){
68 $("#quick_add_form").validate();
69 if( $("#quick_add_form").valid()){
70 $('.toggle_quick_add').click();
71 $('#saverecord').click();
75 $("#saverecord").click(function(){
76 if( check_form_borrowers() ){
77 $("#entryform").submit();
83 var MSG_SEPARATOR = _("Separator must be / in field %s");
84 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
85 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
86 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
87 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
88 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
89 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
90 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
91 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
92 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
93 var MSG_MONTH = _("%s month")
94 var MSG_MONTHS = _("%s months")
95 var MSG_YEAR = _("%s year")
96 var MSG_YEARS = _("%s years")
97 var LABEL_CHANGE = _("Change");
98 var LABEL_SET_TO_PATRON = _("Set to patron");
99 var LABEL_AGE = _("Age");
103 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
105 <body id="pat_memberentrygen" class="pat">
106 [% INCLUDE 'header.inc' %]
107 [% INCLUDE 'patron-search.inc' %]
109 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
110 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
111 <strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong>
113 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
119 [% IF ( error_alert == "no_email" ) %]
120 <div class="error">This member has no email</div>
122 <div class="error">[% error_alert %]</div>
126 <div class="dialog message">Email has been sent.</div>
129 [% INCLUDE 'noadd-warnings.inc' %]
131 [% UNLESS ( no_add ) %]
132 <h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% 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>
134 [% IF quickadd && opadd && !check_member %]
135 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
136 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
139 [% IF ( check_member ) %]
140 <div class="dialog alert">
141 <h3>Duplicate patron record?</h3>
142 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
143 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
144 <input type="hidden" name="op" value="modify" />
145 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
146 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
147 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
148 Edit existing record</button>
151 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
152 <input type="hidden" name="nodouble" value="1" />
153 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
154 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
155 Save as new record</button>
160 <div class="dialog alert">
161 <p>The following fields are wrong. Please fix them.</p>
163 [% IF ( ERROR_login_exist ) %]
164 <li id="ERROR_login_exist">Username/password already exists.</li>
166 [% IF ERROR_cardnumber_already_exists %]
167 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
169 [% IF ERROR_cardnumber_length %]
170 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
172 [% IF ( ERROR_age_limitations ) %]
173 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
174 Ages allowed are [% age_low %]-[% age_high %].</li>
176 [% IF ( ERROR_branch ) %]
177 <li id="ERROR_branch">Library is invalid.</li>
179 [% IF ( ERROR_dateofbirth ) %]
180 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
182 [% IF ( ERROR_dateenrolled ) %]
183 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
185 [% IF ( ERROR_dateexpiry ) %]
186 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
188 [% IF ( ERROR_short_password ) %]
189 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
191 [% IF ( ERROR_password_mismatch ) %]
192 <li id="ERROR_password_mismatch">Passwords do not match.</li>
194 [% IF ( ERROR_extended_unique_id_failed ) %]
195 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value %]" is already in use by another patron record.</li>
197 [% IF ERROR_bad_email %]
198 <li id="ERROR_bad_email">The primary email is invalid.</li>
200 [% IF ERROR_bad_email_secondary %]
201 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
203 [% IF ERROR_bad_email_alternative %]
204 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
211 <div id="toolbar" class="btn-toolbar">
212 [% UNLESS ( check_member ) %]
213 [% IF quickadd && opadd %]
214 <button class="btn btn-small toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
216 <button class="btn btn-small toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
218 <a class="btn btn-small" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
220 <a class="btn btn-small" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
222 <i class="fa fa-times"></i> Cancel
227 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
228 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
229 <!-- field always hidden in different form (1,2,3) -->
230 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
231 <input type="hidden" name="category_type" value="[% category_type %]" />
232 <input type="hidden" name="updtype" value="[% updtype %]" />
233 <input type="hidden" name="destination" value="[% destination %]" />
234 <input type="hidden" name="check_member" value="[% check_member %]" />
235 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
236 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
237 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
238 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
239 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
240 [% ELSIF ( opduplicate ) %]
241 <input type="hidden" name="op" value="insert" />
243 <input type="hidden" name="op" value="save" />
244 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
245 [%# Only put the cardnumber if we arent showing it in the form later %]
247 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
253 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
254 <fieldset class="rows" id="memberentry_identity">
255 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
259 [% IF Koha.Preference('BorrowersTitles') %]
261 [% IF ( mandatorytitle ) %]
262 <label for="btitle" class="required">
267 <select id="btitle" name="title">
268 <option value=""></option>
269 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
271 <option value="[% t %]" selected="selected">[% t %]</option>
273 <option value="[% t %]">[% t %]</option>
277 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
282 [% UNLESS nosurname %]
284 [% IF ( mandatorysurname ) %]
285 <label for="surname" class="required">
287 <label for="surname">
290 [% IF ( uppercasesurnames ) %]
291 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
293 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
295 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
299 [% UNLESS nofirstname %]
301 [% IF ( mandatoryfirstname ) %]
302 <label for="firstname" class="required">
304 <label for="firstname">
307 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
308 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
311 [% UNLESS nodateofbirth %]
313 [% IF ( mandatorydateofbirth ) %]
314 <label for="dateofbirth" class="required">
316 <label for="dateofbirth">
318 Date of birth: </label>
320 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" class="datepicker" />
322 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
323 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
324 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
327 [% UNLESS noinitials %]
329 [% IF ( mandatoryinitials ) %]
330 <label for="initials" class="required">
332 <label for="initials">
335 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
336 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
340 [% UNLESS noothernames %]
342 [% IF ( mandatoryothernames ) %]
343 <label for="othernames" class="required">
345 <label for="othernames">
348 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
349 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
350 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
357 [% UNLESS ( opduplicate ) %]
359 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
361 <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" checked="checked" />
366 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
369 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
371 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
374 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
375 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
376 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
384 [% END # hide fieldset %]
386 [% IF ( showguarantor ) %]
387 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
389 <input type="hidden" name="branchcode" value="[% branchcode %]" />
391 <fieldset id="memberentry_guarantor" class="rows">
392 <legend id="guarantor_lgd">Guarantor information</legend>
395 [% IF ( guarantorid ) %]
396 <li id="contact-details">
398 <li id="contact-details" style="display: none">
400 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
403 <label for="contactname">Organization name: </label>
404 [% IF ( guarantorid ) %]
405 <span>[% contactname %]</span>
406 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
408 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
413 [% IF ( guarantorid ) %]
414 <li id="contact-details">
416 <li id="contact-details" style="display: none">
418 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
420 [% UNLESS nocontactname %]
422 <label for="contactname">Surname: </label>
423 [% IF ( guarantorid ) %]
424 <span>[% contactname %]</span>
425 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
427 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
431 [% UNLESS nocontactfirstname %]
433 <label for="contactfirstname">First name: </label>
434 [% IF ( guarantorid ) %]
435 <span>[% contactfirstname %]</span>
436 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
438 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
442 [% IF ( relshiploop ) %]
444 <label for="relationship">Relationship: </label>
445 <select name="relationship" id="relationship" >
446 [% FOREACH relshiploo IN relshiploop %]
447 [% IF ( relshiploo.selected ) %]
448 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
450 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
459 <span class="label"> </span>
460 [% IF ( guarantorid ) %]
461 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
463 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
465 <input id="guarantordelete" type="button" value="Delete" />
467 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
469 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
470 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
471 [% IF privacy_guarantor_checkouts %]
472 <option value="0">No</option>
473 <option value="1" selected>Yes</option>
475 <option value="0" selected>No</option>
476 <option value="1">Yes</option>
479 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
486 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
487 [% IF Koha.Preference( 'AddressFormat' ) %]
488 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
490 [% INCLUDE 'member-main-address-style-us.inc' %]
492 [% END # nostreet && nocity etc group%]
494 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
495 <fieldset class="rows" id="memberentry_contact">
496 <legend id="contact_lgd">Contact</legend><ol>
499 [% IF ( mandatoryphone ) %]
500 <label for="phone" class="required">
504 Primary phone: </label>
505 <input type="text" id="phone" name="phone" value="[% phone %]" />
506 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
510 [% UNLESS nophonepro %]
512 [% IF ( mandatoryphonepro ) %]
513 <label for="phonepro" class="required">
515 <label for="phonepro">
517 Secondary phone: </label>
518 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
519 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
522 [% UNLESS nomobile %]
524 [% IF ( mandatorymobile ) %]
525 <label for="mobile" class="required">
529 Other phone: </label>
530 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
531 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
536 [% IF ( mandatoryemail ) %]
537 <label for="email" class="required">
541 Primary email: </label>
542 <input type="text" id="email" name="email" size="45" value="[% email %]" />
543 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
547 [% UNLESS noemailpro %]
549 [% IF ( mandatoryemailpro ) %]
550 <label for="emailpro" class="required">
552 <label for="emailpro">
554 Secondary email: </label>
555 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
556 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
561 [% IF ( mandatoryfax ) %]
562 <label for="fax" class="required">
567 <input type="text" id="fax" name="fax" value="[% fax %]" />
568 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
573 [%END # hide fieldset %]
575 <!-- ************************ STEP_1 *********************** -->
579 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
580 [% IF Koha.Preference( 'AddressFormat' ) %]
581 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
583 [% INCLUDE 'member-alt-address-style-us.inc' %]
585 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
588 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
589 [% IF Koha.Preference( 'AddressFormat' ) %]
590 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
592 [% INCLUDE 'member-alt-contact-style-us.inc' %]
594 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
599 <fieldset class="rows" id="memberentry_library_management">
600 <legend id="library_management_lgd">Library management</legend><ol>
601 [% UNLESS nocardnumber %]
603 [% IF ( mandatorycardnumber ) %]
604 <label for="cardnumber" class="required">
606 <label for="cardnumber" class="validated">
608 Card number: </label>
609 [% IF minlength_cardnumber == maxlength_cardnumber %]
610 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
611 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
612 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
613 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
614 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
615 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
616 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
617 [% ELSIF maxlength_cardnumber %]
618 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
619 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
620 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
622 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
623 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
624 <div class="hint">There is no minimum or maximum character length.</div>
628 [% UNLESS nobranchcode %]
630 <label for="libraries" class="required">Library:</label>
631 <select name="branchcode" size="1" id="libraries">
632 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch ) %]
634 <span class="required">Required</span>
638 <label for="categorycode_entry" class="required">Category: </label>
639 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
640 [% FOREACH typeloo IN typeloop %]
641 [% FOREACH categoryloo IN typeloo.categoryloop %]
642 [% IF ( loop.first ) %]
643 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
644 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
645 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
646 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
647 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
648 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
650 [% IF ( categoryloo.categorycodeselected ) %]
651 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
653 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
655 [% IF ( loop.last ) %]
661 <span class="required">Required</span>
665 [% IF ( mandatorysort1 ) %]
666 <label for="sort1" class="required">
671 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
672 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
677 [% IF ( mandatorysort2 ) %]
678 <label for="sort2" class="required">
683 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
684 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
687 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
689 <label for="sort2">Sync with the Norwegian national patron database:</label>
690 [% IF ( sync == 0 ) %]
691 <input type="radio" id="sync" name="sync" value="1"> Yes
692 <input type="radio" id="sync" name="sync" value="0" checked> No
694 <input type="radio" id="sync" name="sync" value="1" checked> Yes
695 <input type="radio" id="sync" name="sync" value="0"> No
699 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
700 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
701 <select name="checkprevcheckout" id="checkprevcheckout">
702 [% IF ( checkprevcheckout == 'yes' ) %]
703 <option value="yes" selected="selected">Yes if settings allow it</option>
704 <option value="no">No if settings allow it</option>
705 <option value="inherit">Inherit from settings</option>
706 [% ELSIF ( checkprevcheckout == 'no' ) %]
707 <option value="yes">Yes if settings allow it</option>
708 <option value="no" selected="selected">No if settings allow it</option>
709 <option value="inherit">Inherit from settings</option>
711 <option value="yes">Yes if settings allow it</option>
712 <option value="no">No if settings allow it</option>
713 <option value="inherit" selected="selected">Inherit from settings</option>
720 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
721 <fieldset class="rows" id="memberentry_subscription">
722 <legend id="library_setup_lgd">Library set-up</legend><ol>
723 [% UNLESS nodateenrolled %]
725 [% IF ( mandatorydateenrolled ) %]
726 <label for="from" class="required">
730 Registration date: </label>
731 [% IF ( dateformat == "metric" ) %]
732 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
734 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
736 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
737 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
738 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
741 [% UNLESS nodateexpiry %]
744 <li style="display:none">
746 [% IF ( mandatorydateexpiry ) %]
747 <label for="to" class="required">
751 Expiry date (leave blank for auto calc): </label>
752 [% IF ( dateformat == "metric" ) %]
753 [% UNLESS ( opadd ) %]
754 <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" />
756 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
759 [% UNLESS ( opadd ) %]
760 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
762 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
765 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
766 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
767 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
769 [% UNLESS noopacnote %]
771 [% IF ( mandatoryopacnote ) %]
772 <label for="opacnote" class="required">
774 <label for="opacnote">
777 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
778 <div class="hint">This message appears on this patron's user page in the OPAC</div>
779 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
782 [% UNLESS noborrowernotes %]
784 [% IF ( mandatoryborrowernotes ) %]
785 <label for="borrowernotes" class="required">
787 <label for="borrowernotes">
789 Circulation note: </label>
790 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
791 <div class="hint">This message displays when checking out to this patron</div>
792 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
797 [% END # hide fieldset %]
799 [% UNLESS nouserid && nopassword %]
800 <fieldset class="rows" id="memberentry_userid">
801 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
802 [% UNLESS nouserid %]
804 [% IF ( mandatoryuserid ) %]
805 <label for="userid" class="required">
811 [% IF ( NoUpdateLogin ) %]
812 [% IF ( opduplicate ) %]
813 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
815 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
818 [% IF ( opduplicate ) %]
819 <input type="text" id="userid" name="userid" size="20" value="" />
821 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
825 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
826 <input type="text" disabled="disabled" style="display:none" />
828 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
831 [% UNLESS nopassword %]
833 [% IF ( mandatorypassword ) %]
834 <label for="password" class="required">
836 <label for="password">
840 [% IF ( NoUpdateLogin ) %]
841 [% IF ( opduplicate ) %]
842 <input type="password" id="password" name="password" size="20" disabled="disabled" />
844 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
847 [% IF ( opduplicate ) %]
848 <input type="password" id="password" name="password" size="20" />
850 <input type="password" id="password" name="password" size="20" value="[% password %]" />
854 [% IF ( password ) %]
855 [% IF ( NoUpdateLogin ) %]
856 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
858 [% IF ( opduplicate ) %]
859 <input type="password" id="password" name="password" size="20" />
861 <input type="password" id="password" name="password" size="20" value="****" />
865 [% IF ( NoUpdateLogin ) %]
866 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
868 <input type="password" id="password" name="password" size="20" value="" />
872 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
873 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
876 [% IF ( mandatorypassword ) %]
877 <label for="password2" class="required">
879 <label for="password2">
881 Confirm password: </label>
883 [% IF ( NoUpdateLogin ) %]
884 [% IF ( opduplicate ) %]
885 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
887 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
890 [% IF ( opduplicate ) %]
891 <input type="password" id="password2" name="password2" size="20" />
893 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
897 [% IF ( password ) %]
898 [% IF ( NoUpdateLogin ) %]
899 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
901 [% IF ( opduplicate ) %]
902 <input type="password" id="password2" name="password2" size="20" />
904 <input type="password" id="password2" name="password2" size="20" value="****" />
908 [% IF ( NoUpdateLogin ) %]
909 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
911 <input type="password" id="password2" name="password2" size="20" value="" />
915 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
919 [% END # hide fieldset %][% END %]
920 <!--this zones are not necessary in modif mode -->
921 [% UNLESS ( opadd || opduplicate ) %]
922 <fieldset class="rows" id="memberentry_account_flags">
923 <legend id="account_flags_lgd">Patron account flags</legend>
925 [% FOREACH flagloo IN flagloop %]
926 <li><label class="radio" for="yes[% flagloo.name %]">
927 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
928 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
930 [% IF CAN_user_circulate_manage_restrictions %]
931 <label for="yes[% flagloo.name %]">Yes </label>
932 [% IF ( flagloo.yes ) %]
933 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
935 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
937 <label for="no[% flagloo.name %]">No </label>
938 [% IF ( flagloo.no ) %]
939 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
941 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
944 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
953 <fieldset class="rows" id="memberentry_restrictions">
954 <legend id="restrictions_lgd">Patron restrictions</legend>
956 [% IF ( debarments ) %]
963 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
970 [% FOREACH d IN debarments %]
972 <td>[% d.type %]</td>
974 [% IF d.comment.search('OVERDUES_PROCESS') %]
975 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
980 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
981 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
983 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
991 <p>Patron is currently unrestricted.</p>
994 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
995 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
996 <fieldset id="manual_restriction_form">
997 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
998 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1000 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1001 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1002 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1006 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1015 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1016 <fieldset class="rows" id="memberentry_patron_attributes">
1017 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1018 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1019 [% FOREACH pa_loo IN patron_attributes %]
1020 [% IF pa_loo.class %]
1021 <fieldset id="aai_[% pa_loo.class %]">
1022 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1024 <ol class="attributes_table">
1025 [% FOREACH patron_attribute IN pa_loo.items %]
1026 <li data-category_code="[% patron_attribute.category_code %]">
1027 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1028 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1029 [% IF ( patron_attribute.use_dropdown ) %]
1030 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1031 <option value=""></option>
1032 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1033 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1034 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1035 [% auth_val_loo.lib %]
1038 <option value="[% auth_val_loo.authorised_value %]" >
1039 [% auth_val_loo.lib %]
1045 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1047 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1048 [% IF ( patron_attribute.repeatable ) %]
1049 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1054 [% IF pa_loo.class %]</fieldset>[% END %]
1057 [% END %][% END %][% END %]
1059 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1060 <fieldset class="rows" id="memberentry_messaging_prefs">
1061 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1063 <!-- handle changing prefs if creating new patron and changing
1066 <script type="text/javascript">//<![CDATA[
1067 $(document).ready(function(){
1068 var message_prefs_dirty = false;
1069 $('#memberentry_messaging_prefs > *').change(function() {
1070 message_prefs_dirty = true;
1072 $('#categorycode_entry').change(function() {
1073 var categorycode = $(this).val();
1074 if (message_prefs_dirty) {
1075 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1079 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1081 $.each(data.messaging_preferences, function(i, item) {
1082 var attrid = item.message_attribute_id;
1083 var transports = ['email', 'rss', 'sms'];
1084 $.each(transports, function(j, transport) {
1085 if (item['transports_' + transport] == 1) {
1086 $('#' + transport + attrid).prop('checked', true);
1088 $('#' + transport + attrid).prop('checked', false);
1091 if (item.digest && item.digest != ' ') {
1092 $('#digest' + attrid).prop('checked', true);
1094 $('#digest' + attrid).prop('checked', false);
1096 if (item.takes_days == '1') {
1097 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1100 message_prefs_dirty = false;
1108 <input type="hidden" name="setting_messaging_prefs" value="1" />
1109 [% INCLUDE 'messaging-preference-form.inc' %]
1110 [% IF ( SMSSendDriver ) %]
1111 <p><label for="SMSnumber">SMS number:</label>
1112 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1115 <label for="sms_provider_id">SMS provider:</label>
1116 <select id="sms_provider_id" name="sms_provider_id"/>
1117 <option value="">Unknown</option>
1118 [% FOREACH s IN sms_providers %]
1119 [% IF s.id == sms_provider_id %]
1120 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1122 <option value="[% s.id %]">[% s.name %]</option>
1133 [% IF quickadd && opadd && !check_member %]
1134 <form id="quick_add_form" class="toggler">
1135 <fieldset class="rows quick_add"><legend>Quick add</legend>
1136 <ol id="quick_add_list">
1141 $(document).ready(function () {
1142 $("#entryform,#saverecord").hide();
1143 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1144 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1145 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1146 $("#entryform label").each(function () {
1147 var input_label = $(this).attr('for');
1148 if ( input_label == 'sex-female' ) {
1151 else if ( input_label == 'btitle' ) {
1152 input_label='title';
1154 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1155 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1156 $(this).parent().clone().appendTo("#quick_add_list");
1157 if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1160 if( $("#memberentry_guarantor").length ) {
1161 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1163 $("#quick_add_form").show();
1170 [% UNLESS ( opadd ) %]<div class="yui-b">
1171 [% INCLUDE 'members-menu.inc' %]
1175 [% INCLUDE 'intranet-bottom.inc' %]