1 [% PROCESS 'i18n.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Patrons ›
11 [% UNLESS blocking_error %]
14 [% ELSIF ( opduplicate ) %]
19 [% IF (firstname) %][% firstname | html %] [% END %]
20 [% IF (surname) %][% surname | html %] [% END %]
21 ([% IF categoryname -%]
22 [%- categoryname | html -%]
24 [%- IF ( I ) %]Organization[% END -%]
25 [%- IF ( A ) %]Adult[% END -%]
26 [%- IF ( C ) %]Child[% END -%]
27 [%- IF ( P ) %]Professional[% END -%]
28 [%- IF ( S ) %]Staff[% END -%]
32 [% INCLUDE 'doc-head-close.inc' %]
35 <body id="pat_memberentrygen" class="pat">
36 [% INCLUDE 'header.inc' %]
37 [% INCLUDE 'patron-search.inc' %]
39 <div id="breadcrumbs">
40 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
41 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
42 [% UNLESS blocking_error %]
44 [% IF (firstname || surname ) %]
45 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
46 [% IF (firstname) %][% firstname | html %] [% END %]
47 [% IF (surname) %][% surname | html %] [% END %]
53 [% ELSIF ( opduplicate ) %]
59 [% categoryname | html %]
61 [% IF ( I ) %] Organization [% END %]
62 [% IF ( A ) %] Adult [% END %]
63 [% IF ( C ) %] Child [% END %]
64 [% IF ( P ) %] Professional [% END %]
65 [% IF ( S ) %] Staff [% END %]
69 </div> <!-- /#breadcrumbs -->
71 <div class="main container-fluid">
74 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
76 <div class="col-sm-10 col-sm-push-2">
78 <main class="clearfix">
79 [% INCLUDE 'blocking_errors.inc' %]
82 [% IF ( error_alert == "no_email" ) %]
83 <div class="dialog alert">This member has no email</div>
85 <div class="dialog alert">[% error_alert | html %]</div>
89 <div class="dialog message">Email has been sent.</div>
92 [% INCLUDE 'noadd-warnings.inc' %]
94 [% UNLESS ( no_add ) %]
98 [% ELSIF ( opduplicate ) %]
103 [% IF (firstname) %][% firstname | html %] [% END %]
104 [% IF (surname) %][% surname | html %] [% END %]
105 ([%IF categoryname %]
106 [% categoryname | html %]
108 [% IF ( I ) %] Organization [% END %]
109 [% IF ( A ) %] Adult [% END %]
110 [% IF ( C ) %] Child [% END %]
111 [% IF ( P ) %] Professional [% END %]
112 [% IF ( S ) %] Staff [% END %]
116 [% IF quickadd && opadd && !check_member %]
117 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
118 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
121 [% IF ( check_member ) %]
122 <div class="dialog alert">
123 <h3>Duplicate patron record?</h3>
124 <p><a href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member | uri %]');return false;" ><i class="fa fa-window-restore"></i> View existing record</a></p>
125 <button id="duplicate" type="submit" class="new">
126 <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record
128 <button type="submit" id="not-duplicate" class="new">
129 <i class="fa fa-plus"></i> Not a duplicate. Save as new record
135 <div class="dialog alert">
136 <p>The following fields are wrong. Please fix them.</p>
138 [% IF ( ERROR_login_exist ) %]
139 <li id="ERROR_login_exist">Username/password already exists.</li>
141 [% IF ERROR_cardnumber_already_exists %]
142 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
144 [% IF ERROR_cardnumber_length %]
145 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
147 [% IF ( ERROR_age_limitations ) %]
148 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
149 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
151 [% IF ( ERROR_branch ) %]
152 <li id="ERROR_branch">Library is invalid.</li>
154 [% IF ( ERROR_dateofbirth ) %]
155 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
157 [% IF ( ERROR_dateenrolled ) %]
158 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
160 [% IF ( ERROR_dateexpiry ) %]
161 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
163 [% IF ( ERROR_password_too_short ) %]
164 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
166 [% IF ( ERROR_password_too_weak ) %]
167 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
169 [% IF ( ERROR_password_has_whitespaces ) %]
170 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
172 [% IF ( ERROR_password_mismatch ) %]
173 <li id="ERROR_password_mismatch">Passwords do not match.</li>
175 [% IF ( ERROR_extended_unique_id_failed ) %]
176 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description | html %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value | html %]" is already in use by another patron record.</li>
178 [% IF ERROR_bad_email %]
179 <li id="ERROR_bad_email">The primary email is invalid.</li>
181 [% IF ERROR_bad_email_secondary %]
182 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
184 [% IF ERROR_bad_email_alternative %]
185 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
191 <div id="toolbar" class="btn-toolbar">
192 [% UNLESS ( check_member ) %]
193 [% IF quickadd && opadd %]
194 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
196 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
198 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
200 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
202 <i class="fa fa-times"></i> Cancel
207 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
208 [% UNLESS ( check_member ) %]
209 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
211 <!-- field always hidden in different form (1,2,3) -->
212 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
213 <input type="hidden" name="category_type" value="[% category_type | html %]" />
214 <input type="hidden" name="updtype" value="[% updtype | html %]" />
215 <input type="hidden" name="destination" value="[% destination | html %]" />
216 <input type="hidden" name="check_member" value="[% check_member | html %]" />
217 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
218 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
219 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
221 <input type="hidden" name="step" value="[% step | html %]" />
224 <input type="hidden" name="op" value="insert" />
225 [% ELSIF ( opduplicate ) %]
226 <input type="hidden" name="op" value="insert" />
228 <input type="hidden" name="op" value="save" />
229 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
230 [%# Only put the cardnumber if we arent showing it in the form later %]
232 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
238 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
239 <fieldset class="rows" id="memberentry_identity">
240 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
244 [% IF Koha.Preference('BorrowersTitles') %]
246 [% IF ( mandatorytitle ) %]
247 <label for="btitle" class="required">
252 <select id="btitle" name="title">
253 <option value=""></option>
254 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
256 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
258 <option value="[% t | html %]">[% t | html %]</option>
262 [% IF ( mandatorytitle ) %]
263 <span class="required">Required</span>
266 [% END # /IF Koha.Preference('BorrowersTitles') %]
267 [% END # /UNLESS notitle %]
268 [% END # /UNLESS ( I ) %]
270 [% UNLESS nosurname %]
273 <label for="surname" class="required">
277 [% IF ( mandatorysurname ) %]
278 <label for="surname" class="required">
280 <label for="surname">
285 [% IF ( uppercasesurnames ) %]
286 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
288 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
290 [% IF ( mandatorysurname ) %]
291 <span class="required">Required</span>
294 [% END # /UNLESS nosurname %]
297 [% UNLESS nofirstname %]
299 [% IF ( mandatoryfirstname ) %]
300 <label for="firstname" class="required">
302 <label for="firstname">
306 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
307 [% IF ( mandatoryfirstname ) %]
308 <span class="required">Required</span>
311 [% END #/UNLESS nofirstname %]
312 [% UNLESS nodateofbirth %]
314 [% IF ( mandatorydateofbirth ) %]
315 <label for="dateofbirth" class="required">
317 <label for="dateofbirth">
321 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
322 [% IF ( mandatorydateofbirth ) %]
323 <span class="required">Required</span>
325 [% IF ( ERROR_dateofbirth ) %]
326 <span class="required">(Error)</span>
328 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
330 [% END # /UNLESS nodateofbirth %]
331 [% UNLESS noinitials %]
333 [% IF ( mandatoryinitials ) %]
334 <label for="initials" class="required">
336 <label for="initials">
340 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
341 [% IF ( mandatoryinitials ) %]
342 <span class="required">Required</span>
345 [% END # /UNLESS noinitials %]
346 [% END #/UNLESS ( I ) %]
347 [% UNLESS noothernames %]
349 [% IF ( mandatoryothernames ) %]
350 <label for="othernames" class="required">
352 <label for="othernames">
356 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
357 [% IF ( mandatoryothernames ) %]
358 <span class="required">Required</span>
360 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
362 [% END #/UNLESS noothernames %]
367 [% UNLESS ( opduplicate ) %]
369 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
371 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
374 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
376 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
379 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
381 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
384 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
385 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
386 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
387 [% END # /UNLESS ( opduplicate )%]
389 [% END # /UNLESS nosex %]
390 [% END # /UNLESS ( I ) %]
392 </fieldset> <!-- /#memberentry_identity -->
393 [% END # hide fieldset %]
395 [% IF show_guarantor || guarantor %]
396 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
397 <span id="memberentry_guarantor_anchor">
398 <fieldset id="memberentry_guarantor" class="rows">
399 <legend>Guarantor information</legend>
401 <span id="guarantor_relationships">
402 [% FOREACH r IN relationships %]
403 <fieldset class="rows">
405 [% IF category_type == 'I' %]
406 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
407 <span class="label">Organization #:</span> [% IF ( r.guarantor_id ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>[% END %]
411 <label for="guarantor_surname">Organization name: </label>
412 <span>[% r.guarantor.surname | html %]</span>
415 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
416 <span class="label">Patron #:</span>
417 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>
420 [% IF r.guarantor.surname %]
422 <label for="guarantor_surname">Surname: </label>
423 <span>[% r.guarantor.surname | html %]</span>
427 [% IF r.guarantor.firstname %]
429 <label for="guarantor_firstname">First name: </label>
430 <span>[% r.guarantor.firstname | html %]</span>
435 <label for="relationship">Relationship: </label>
436 <span>[% r.relationship | html %]</span>
440 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
441 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
446 [% END # END relationships foreach %]
447 </span> <!-- #/guarantor_relationships -->
449 <fieldset class="rows guarantor" id="guarantor_template">
451 <li class="guarantor-details" data-borrowernumber="0">
452 <span class="label">Patron #:</span>
453 <span class="new_guarantor_id_text"></span>
454 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
458 <label for="guarantor_surname">Surname: </label>
459 <span class="new_guarantor_surname_text"></span>
463 <label for="guarantor_firstname">First name: </label>
464 <span class="new_guarantor_firstname_text"></span>
468 <label for="guarantor_relationship">Relationship: </label>
469 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
470 [% FOREACH pr IN possible_relationships.split('\|') %]
471 <option value="[% pr | html %]">[% pr | html %]</option>
477 <label for="guarantor_cancel"> </label>
478 <span><a href="#" class="guarantor_cancel">Remove</a></span>
484 <input type="hidden" id="guarantor_id" value="" />
485 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
486 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
489 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
492 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
494 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
495 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
496 [% IF privacy_guarantor_checkouts %]
497 <option value="0">No</option>
498 <option value="1" selected>Yes</option>
500 <option value="0" selected>No</option>
501 <option value="1">Yes</option>
504 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
507 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
509 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
510 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
511 [% IF privacy_guarantor_fines %]
512 <option value="0">No</option>
513 <option value="1" selected>Yes</option>
515 <option value="0" selected>No</option>
516 <option value="1">Yes</option>
519 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
523 </fieldset> <!-- /#memberentry_guarantor -->
524 </span> <!-- #/memberentry_guarantor_anchor -->
525 [% END # /IF show_guarantor || guarantor %]
528 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
529 [% IF Koha.Preference( 'AddressFormat' ) %]
530 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
532 [% END # /UNLESS nostreet && nocity etc group%]
534 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
535 <fieldset class="rows" id="memberentry_contact">
536 <legend id="contact_lgd">Contact</legend>
538 [% UNLESS nocontactname %]
540 [% IF ( mandatorycontactname ) %]
541 <label for="contactname" class="required">
543 <label for="contactname">
547 <input type="text" id="contactname" name="contactname" value="[% contactname | html %]" />
548 [% IF ( mandatorycontactname ) %]
549 <span class="required">Required</span>
551 <div class="hint">Non-patron guarantor surname</div>
553 [% END # /UNLESS nocontactname %]
555 [% UNLESS nocontactfirstname %]
557 [% IF ( mandatorycontactfirstname ) %]
558 <label for="contactfirstname" class="required">
560 <label for="contactfirstname">
562 Guarantor first name:
564 <input type="text" id="contactfirstname" name="contactfirstname" value="[% contactfirstname | html %]" />
565 [% IF ( mandatorycontactfirstname ) %]
566 <span class="required">Required</span>
568 <div class="hint">Non-patron guarantor first name</div>
570 [% END # /UNLESS noaltcontactfirstname %]
572 [% UNLESS norelationship %]
573 [% IF possible_relationships %]
575 <label for="relationship">Relationship: </label>
576 <select class="relationship" name="relationship">
577 <option value=""></option>
578 [% FOREACH pr IN possible_relationships.split('\|') %]
579 [% IF pr == relationship %]
580 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
582 <option value="[% pr | html %]">[% pr | html %]</option>
587 [% END #/IF possible_relationships %]
588 [% END # /UNLESS norelationship %]
592 [% IF ( mandatoryphone ) %]
593 <label for="phone" class="required">
599 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
600 [% IF ( mandatoryphone ) %]
601 <span class="required">Required</span>
603 <div class="hint">Shows on transit slips</div>
605 [% END # /UNLESS nophone %]
607 [% UNLESS nophonepro %]
609 [% IF ( mandatoryphonepro ) %]
610 <label for="phonepro" class="required">
612 <label for="phonepro">
616 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
617 [% IF ( mandatoryphonepro ) %]
618 <span class="required">Required</span>
621 [% END # /UNLESS nophonepro %]
623 [% UNLESS nomobile %]
625 [% IF ( mandatorymobile ) %]
626 <label for="mobile" class="required">
632 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
633 [% IF ( mandatorymobile ) %]
634 <span class="required">Required</span>
637 [% END # /UNLESS nomobile %]
641 [% IF ( mandatoryemail ) %]
642 <label for="email" class="required">
648 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
649 [% IF ( mandatoryemail ) %]
650 <span class="required">Required</span>
652 <div class="hint">Shows on transit slips</div>
654 [% END #/UNLESS noemail %]
656 [% UNLESS noemailpro %]
658 [% IF ( mandatoryemailpro ) %]
659 <label for="emailpro" class="required">
661 <label for="emailpro">
665 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
666 [% IF ( mandatoryemailpro ) %]
667 <span class="required">Required</span>
670 [% END # /UNLESS noemailpro %]
674 [% IF ( mandatoryfax ) %]
675 <label for="fax" class="required">
681 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
682 [% IF ( mandatoryfax ) %]
683 <span class="required">Required</span>
686 [% END #/UNLESS nofax %]
688 </fieldset> <!-- /#memberentry_contact -->
689 [% END # hide fieldset %]
691 <!-- ************************ STEP_1 *********************** -->
692 [% END # /IF ( step_1 ) %]
695 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
696 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
698 [% INCLUDE 'member-alt-address-style-de.inc' %]
700 [% INCLUDE 'member-alt-address-style-us.inc' %]
702 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
703 [% END # /IF ( step_6 ) %]
706 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
707 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
709 [% INCLUDE 'member-alt-contact-style-de.inc' %]
711 [% INCLUDE 'member-alt-contact-style-us.inc' %]
713 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
714 [% END # /IF ( step_2 ) %]
717 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
718 <fieldset class="rows" id="memberentry_library_management">
719 <legend id="library_management_lgd">Library management</legend>
721 [% UNLESS nocardnumber %]
723 [% IF mandatorycardnumber %]
724 <label for="cardnumber" class="required">
726 <label for="cardnumber" class="validated">
731 <!-- NOTE: div.hint closing tag isn't on the same line -->
732 [% IF minlength_cardnumber == maxlength_cardnumber %]
733 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
734 [% IF mandatorycardnumber %]
735 <span class="required">Required</span>
737 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
738 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
739 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
740 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
741 [% IF mandatorycardnumber %]
742 <span class="required">Required</span>
744 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
745 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
746 [% ELSIF maxlength_cardnumber %]
747 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
748 [% IF mandatorycardnumber %]
749 <span class="required">Required</span>
751 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
752 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
754 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
755 [% IF mandatorycardnumber %]
756 <span class="required">Required</span>
758 <div class="hint">There is no minimum or maximum character length.
760 [% IF autoMemberNum %]
761 [% IF mandatorycardnumber %]
762 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
764 <br/>Leave blank for auto calc during registration
767 </div><!--/div.hint -->
769 [% END # /UNLESS nocardnumber %]
771 [% UNLESS nobranchcode %]
773 <label for="libraries" class="required">Library:</label>
774 <select name="branchcode" size="1" id="libraries">
775 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
777 <span class="required">Required</span>
782 <label for="categorycode_entry" class="required">Category: </label>
783 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
784 [% FOREACH typeloo IN typeloop %]
785 [% FOREACH categoryloo IN typeloo.categoryloop %]
786 [% IF ( loop.first ) %]
787 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
788 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
789 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
790 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
791 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
792 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
794 [% IF ( categoryloo.categorycodeselected ) %]
795 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
797 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
799 [% IF ( loop.last ) %]
802 [% END # /FOREACH categoryloo %]
803 [% END # /FOREACH typeloo %]
805 <span class="required">Required</span>
810 [% IF ( mandatorysort1 ) %]
811 <label for="sort1" class="required">
817 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
818 [% IF ( mandatorysort1 ) %]
819 <span class="required">Required</span>
822 [% END # /UNLESS nosort1 %]
826 [% IF ( mandatorysort2 ) %]
827 <label for="sort2" class="required">
833 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
834 [% IF ( mandatorysort2 ) %]
835 <span class="required">Required</span>
838 [% END # /UNLESS nosort2 %]
840 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
842 <label for="checkprevcheckout">Check for previous checkouts: </label>
843 <select name="checkprevcheckout" id="checkprevcheckout">
844 [% IF ( checkprevcheckout == 'yes' ) %]
845 <option value="yes" selected="selected">Yes if settings allow it</option>
846 <option value="no">No if settings allow it</option>
847 <option value="inherit">Inherit from settings</option>
848 [% ELSIF ( checkprevcheckout == 'no' ) %]
849 <option value="yes">Yes if settings allow it</option>
850 <option value="no" selected="selected">No if settings allow it</option>
851 <option value="inherit">Inherit from settings</option>
853 <option value="yes">Yes if settings allow it</option>
854 <option value="no">No if settings allow it</option>
855 <option value="inherit" selected="selected">Inherit from settings</option>
859 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
861 [% IF Koha.Preference('TranslateNotices') %]
863 <label for="lang">Preferred language for notices: </label>
864 <select id="lang" name="lang">
865 <option value="default">Default</option>
866 [% FOR language IN languages %]
867 [% FOR sublanguage IN language.sublanguages_loop %]
868 [% IF language.plural %]
869 [% IF sublanguage.rfc4646_subtag == lang %]
870 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
872 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
875 [% IF sublanguage.rfc4646_subtag == lang %]
876 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
878 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
880 [% END # /IF language.plural %]
881 [% END # /FOR sublanguage %]
882 [% END #/FOR language %]
883 </select> <!-- /#lang -->
885 [% END #/IF Koha.Preference('TranslateNotices') %]
887 </fieldset> <!-- /#memberentry_library_management -->
889 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
890 <fieldset class="rows" id="memberentry_subscription">
891 <legend id="library_setup_lgd">Library set-up</legend><ol>
892 [% UNLESS nodateenrolled %]
894 [% IF ( mandatorydateenrolled ) %]
895 <label for="from" class="required">
901 [% IF ( dateformat == "metric" ) %]
902 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled | html %]" class="datepickerfrom" />
904 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
906 [% IF ( mandatorydateenrolled ) %]
907 <span class="required">Required</span>
909 [% IF ( ERROR_dateenrolled ) %]
910 <span class="required">(Error)</span>
912 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
914 [% END # /UNLESS nodateenrolled %]
916 [% UNLESS nodateexpiry %]
919 <li style="display:none">
921 [% IF ( mandatorydateexpiry ) %]
922 <label for="to" class="required">
926 Expiry date (leave blank for auto calc):
928 [% IF ( dateformat == "metric" ) %]
929 [% UNLESS ( opadd ) %]
930 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
932 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
935 [% UNLESS ( opadd ) %]
936 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
938 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
940 [% END # /IF ( dateformat == "metric" ) %]
941 [% IF ( mandatorydateexpiry ) %]
942 <span class="required">Required</span>
944 [% IF ( ERROR_dateexpiry ) %]
945 <span class="required">(Error)</span>
947 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
950 [% UNLESS noopacnote %]
952 [% IF ( mandatoryopacnote ) %]
953 <label for="opacnote" class="required">
955 <label for="opacnote">
959 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
960 <div class="hint">This message appears on this patron's user page in the OPAC</div>
961 [% IF ( mandatoryopacnote ) %]
962 <span class="required">Required</span>
965 [% END # /UNLESS noopacnote %]
967 [% UNLESS noborrowernotes %]
969 [% IF ( mandatoryborrowernotes ) %]
970 <label for="borrowernotes" class="required">
972 <label for="borrowernotes">
976 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
977 <div class="hint">This message displays when checking out to this patron</div>
978 [% IF ( mandatoryborrowernotes ) %]
979 <span class="required">Required</span>
982 [% END # /UNLESS noborrowernotes %]
984 </fieldset> <!-- /#memberentry_subscription -->
985 [% END # hide fieldset %]
987 [% UNLESS nouserid && nopassword %]
988 <fieldset class="rows" id="memberentry_userid">
989 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
991 [% UNLESS nouserid %]
993 [% IF ( mandatoryuserid ) %]
994 <label for="userid" class="required">
1001 [% IF ( NoUpdateLogin ) %]
1002 [% IF ( opduplicate ) %]
1003 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1005 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1008 [% IF ( opduplicate ) %]
1009 <input type="text" id="userid" name="userid" size="20" value="" />
1011 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1013 [% END # /IF ( NoUpdateLogin ) %]
1015 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1016 <input type="text" disabled="disabled" style="display:none" />
1018 [% IF ( mandatoryuserid ) %]
1019 <span class="required">Required</span>
1022 [% END # /UNLESS nouserid %]
1024 [% UNLESS nopassword %]
1026 [% IF ( mandatorypassword ) %]
1027 <label for="password" class="required">
1029 <label for="password">
1034 [% IF ( NoUpdateLogin ) %]
1035 [% IF ( opduplicate ) %]
1036 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1038 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1041 [% IF ( opduplicate ) %]
1042 <input type="password" id="password" name="password" size="20" />
1044 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1046 [% END # /IF ( NoUpdateLogin ) %]
1047 [% ELSE # IF ( opadd ) %]
1049 [% IF ( password ) %]
1050 [% IF ( NoUpdateLogin ) %]
1051 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1053 [% IF ( opduplicate ) %]
1054 <input type="password" id="password" name="password" size="20" />
1056 <input type="password" id="password" name="password" size="20" value="****" />
1060 [% IF ( NoUpdateLogin ) %]
1061 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1063 <input type="password" id="password" name="password" size="20" value="" />
1065 [% END # /IF ( password ) %]
1066 [% END # /IF ( opadd ) %]
1067 [% IF ( mandatorypassword ) %]
1068 <span class="required">Required</span>
1070 [% IF ( ERROR_password_too_short ) %]
1071 <span class="required">Password is too short</span>
1073 [% IF ( ERROR_password_too_weak ) %]
1074 <span class="required">Password is too weak</span>
1076 [% IF ( ERROR_password_has_whitespaces ) %]
1077 <span class="required">Password has leading or trailing whitespaces</span>
1079 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1083 [% IF ( mandatorypassword ) %]
1084 <label for="password2" class="required">
1086 <label for="password2">
1091 [% IF ( NoUpdateLogin ) %]
1092 [% IF ( opduplicate ) %]
1093 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1095 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1098 [% IF ( opduplicate ) %]
1099 <input type="password" id="password2" name="password2" size="20" />
1101 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1104 [% ELSE # IF ( opadd ) %]
1105 [% IF ( password ) %]
1106 [% IF ( NoUpdateLogin ) %]
1107 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1109 [% IF ( opduplicate ) %]
1110 <input type="password" id="password2" name="password2" size="20" />
1112 <input type="password" id="password2" name="password2" size="20" value="****" />
1116 [% IF ( NoUpdateLogin ) %]
1117 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1119 <input type="password" id="password2" name="password2" size="20" value="" />
1122 [% END # /IF ( opadd ) %]
1124 [% IF ( mandatorypassword ) %]
1125 <span class="required">Required</span>
1127 [% IF ( ERROR_password_mismatch ) %]
1128 <span class="required">Passwords do not match</span>
1131 [% END # /UNLESS nopassword %]
1133 </fieldset> <!-- /#memberentry_userid -->
1134 [% END # UNLESS nouserid && nopassword %]
1136 <!--this zones are not necessary in modif mode -->
1137 [% UNLESS ( opadd || opduplicate ) %]
1138 <fieldset class="rows" id="memberentry_account_flags">
1139 <legend id="account_flags_lgd">Patron account flags</legend>
1141 [% FOREACH flagloo IN flagloop %]
1143 <label class="radio" for="yes[% flagloo.name | html %]">
1144 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1145 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1147 [% IF CAN_user_circulate_manage_restrictions %]
1148 <label for="yes[% flagloo.name | html %]">
1149 [% IF ( flagloo.yes ) %]
1150 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1152 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1156 <label for="no[% flagloo.name | html %]">
1157 [% IF ( flagloo.no ) %]
1158 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1160 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1165 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1166 [% END # /IF CAN_user_circulate_manage_restrictions %]
1168 [% END # /FOREACH flagloo %]
1170 </fieldset> <!-- /#memberentry_account_flags -->
1172 <fieldset class="rows" id="memberentry_restrictions">
1173 <legend id="restrictions_lgd">Patron restrictions</legend>
1174 [% IF ( debarments ) %]
1181 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1182 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1188 [% FOREACH d IN debarments %]
1190 <td>[% d.type | html %]</td>
1192 [% IF d.comment.search('OVERDUES_PROCESS') %]
1193 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1195 [% d.comment | $raw %]
1199 [% IF d.expiration %]
1200 [% d.expiration | $KohaDates %]
1205 <td>[% d.created | $KohaDates %]</td>
1206 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1208 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1212 [% END # /FOREACH d %]
1216 <p>Patron is currently unrestricted.</p>
1217 [% END # /IF ( debarments ) %]
1219 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1220 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1221 <fieldset id="manual_restriction_form">
1222 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1223 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1226 <label for="debarred_comment">Comment: </label>
1227 <input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" />
1230 <label for="debarred_expiration">Expiration: </label>
1231 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" type="text" />
1232 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a>
1236 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1238 </fieldset> <!-- /#manual_restriction_form -->
1239 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1240 </fieldset> <!-- /#memberentry_restrictions -->
1241 [% END # /UNLESS ( opadd || opduplicate ) %]
1242 [% END # /IF ( step_3 ) %]
1245 [% IF Koha.Preference('HouseboundModule') %]
1246 <fieldset class="rows" id="memberentry_housebound_roles">
1247 <legend id="housebound_roles">Housebound roles</legend>
1250 <label class="radio" for="housebound_chooser">
1253 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1254 <label for="yes_housebound_chooser">Yes </label>
1255 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1256 <label for="no_housebound_chooser">No </label>
1257 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1259 <label for="yes_housebound_chooser">Yes </label>
1260 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1261 <label for="no_housebound_chooser">No </label>
1262 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1266 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1267 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1268 <label for="yes_housebound_deliverer">Yes </label>
1269 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1270 <label for="no_housebound_deliverer">No </label>
1271 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1273 <label for="yes_housebound_deliverer">Yes </label>
1274 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1275 <label for="no_housebound_deliverer">No </label>
1276 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1279 </ol> <!-- /ol.radio -->
1280 </fieldset> <!-- /#memberentry_housebound_roles -->
1281 [% END # hide fieldset %]
1282 [% END # IF step_7 %]
1285 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1286 [% UNLESS ( no_patron_attribute_types ) %]
1287 <fieldset class="rows" id="memberentry_patron_attributes">
1288 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1289 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1290 [% FOREACH pa_loo IN patron_attributes %]
1291 <ol class="attributes_table">
1292 [% IF pa_loo.class %]
1293 <fieldset id="aai_[% pa_loo.class | html %]">
1294 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1296 [% FOREACH patron_attribute IN pa_loo.items %]
1297 <li data-category_code="[% patron_attribute.category_code | html %]">
1298 <label for="[% patron_attribute.form_id | html %]">
1299 [% patron_attribute.description | html %]:
1301 [% IF ( patron_attribute.use_dropdown ) %]
1302 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1303 <option value=""></option>
1304 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1305 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1306 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1307 [% auth_val_loo.lib | html %]
1310 <option value="[% auth_val_loo.authorised_value | html %]" >
1311 [% auth_val_loo.lib | html %]
1317 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1318 [% END # /IF ( patron_attribute.use_dropdown ) %]
1319 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1320 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1321 [% IF ( patron_attribute.repeatable ) %]
1322 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1325 [% END # /FOREACH patron_attribute %]
1326 [% IF pa_loo.class %]</fieldset>[% END %]
1328 [% END # /FOREACH pa_loo %]
1329 </fieldset> <!-- /#memberentry_patron_attributes -->
1330 [% END # UNLESS ( no_patron_attribute_types ) %]
1331 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1332 [% END # IF ( step_4 ) %]
1335 [% IF ( EnhancedMessagingPreferences ) %]
1336 <fieldset class="rows" id="memberentry_messaging_prefs">
1337 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1338 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1339 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1341 <input type="hidden" name="setting_messaging_prefs" value="1" />
1342 [% INCLUDE 'messaging-preference-form.inc' %]
1343 [% IF ( SMSSendDriver ) %]
1345 <label for="SMSnumber">SMS number:</label>
1346 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1347 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1349 [% UNLESS nosms_provider_id %]
1351 <label for="sms_provider_id">SMS provider:</label>
1352 <select id="sms_provider_id" name="sms_provider_id">
1353 <option value="">Unknown</option>
1354 [% FOREACH s IN sms_providers %]
1355 [% IF s.id == sms_provider_id %]
1356 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1358 <option value="[% s.id | html %]">[% s.name | html %]</option>
1363 [% END # /UNLESS nosms_provider_id %]
1364 [% END # IF ( SMSSendDriver ) %]
1366 [% END # IF ( EnhancedMessagingPreferences ) %]
1367 [% END # /IF step_5 %]
1368 </form> <!-- /#entryform -->
1370 [% IF quickadd && opadd && !check_member %]
1371 <form id="quick_add_form" class="toggler">
1372 <fieldset class="rows quick_add"><legend>Quick add</legend>
1373 <ol id="quick_add_list">
1379 [% END # /UNLESS ( no_add ) %]
1381 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1383 [% UNLESS ( opadd ) %]
1384 <div class="col-sm-2 col-sm-pull-10">
1386 [% INCLUDE 'circ-menu.inc' %]
1388 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1390 </div> <!-- /.row -->
1392 [% MACRO jsinclude BLOCK %]
1393 [% Asset.js("lib/hc-sticky.js") | $raw %]
1394 [% INCLUDE 'calendar.inc' %]
1395 [% INCLUDE 'str/members-menu.inc' %]
1396 [% Asset.js("js/members-menu.js") | $raw %]
1398 function update_cardnumber_warning(size){
1399 var max_len = [% maxlength_cardnumber | html %];
1400 if ( size >= max_len ) {
1401 $("#cn_max").show();
1403 $("#cn_max").hide();
1407 $(document).ready(function() {
1408 $("#saverecord").css({ 'margin-left': 0 });
1410 Sticky = $("#toolbar");
1413 stickyClass: "floating"
1416 [% IF categorycode %]
1417 update_category_code( "[% categorycode | html %]" );
1419 if ( $("#categorycode_entry").length > 0 ){
1420 var category_code = $("#categorycode_entry").find("option:selected").val();
1421 update_category_code( category_code );
1425 [% IF new_guarantors %]
1426 [% FOREACH g IN new_guarantors %]
1427 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1431 $("#cn_max").hide();
1433 $("#cardnumber").on("keydown", function(e){
1434 content = $(this).val();
1436 $("#cardnumber").on("keyup", function(e){
1437 // .val() will return the value of the input after the key has been released
1438 var l = $(this).val().length;
1439 if ( l == content.length + 1 ) { l--; }
1440 update_cardnumber_warning(l);
1442 $("#cardnumber").bind("paste", function(e){
1443 var pastedData = e.originalEvent.clipboardData.getData('text');
1444 update_cardnumber_warning(pastedData.length - 1);
1446 var toggle_quick_add = $(".toggle_quick_add");
1447 $(toggle_quick_add).click(function(e){
1448 toggle_quick_add.toggle();
1451 var toggle_from = '';
1452 if( $("#entryform:visible").length ) {
1453 toggle_to = "#quick_add_form label";
1454 toggle_from = "#entryform label";
1455 $("#memberentry_guarantor").appendTo("#quick_add_form");
1457 toggle_to="#entryform label";
1458 toggle_from = "#quick_add_form label";
1459 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1461 $(toggle_from).each(function() {
1462 var input_label = $(this).attr('for');
1463 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1464 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1467 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1470 $(".toggler").toggle();
1473 $("#save_quick_add").click(function(){
1474 $("#quick_add_form").validate();
1475 if( $("#quick_add_form").valid()){
1476 $('.toggle_quick_add').click();
1477 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1478 $('#saverecord').click();
1480 else {return false;}
1483 $("#saverecord").click(function(){
1484 if( check_form_borrowers() ){
1485 $("#entryform").submit();
1489 $('#duplicate').on('click', function() {
1490 $("input[name='op']").val('modify');
1491 $("input[name='borrowernumber']").val('[% check_member | html %]');
1492 $("input[name='check_member']").val('');
1493 $('#entryform').submit();
1496 $('#not-duplicate').on('click', function() {
1497 $("input[name='nodouble']").val('1');
1498 $('#entryform').submit();
1502 var MSG_SEPARATOR = _("Separator must be / in field %s");
1503 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1504 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1505 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1506 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1507 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1508 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1509 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1510 var MSG_MONTH = _("%s month")
1511 var MSG_MONTHS = _("%s months")
1512 var MSG_YEAR = _("%s year")
1513 var MSG_YEARS = _("%s years")
1514 var LABEL_CHANGE = _("Change");
1515 var LABEL_SET_TO_PATRON = _("Set to patron");
1516 var LABEL_AGE = _("Age");
1517 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1519 [% IF quickadd && opadd && !check_member %]
1520 $(document).ready(function () {
1522 $("#entryform,#saverecord").hide();
1523 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1524 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1525 $("#entryform label").each(function () {
1526 var input_label = $(this).attr('for');
1527 if ( input_label == 'sex-female' ) {
1530 else if ( input_label == 'btitle' ) {
1531 input_label='title';
1533 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1534 $(this).parent().clone().appendTo("#quick_add_list");
1535 [% UNLESS mandatorypassword %]
1536 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1540 if ( $("#memberentry_guarantor").length ) {
1541 $("#memberentry_guarantor").appendTo("#quick_add_form");
1543 $("#quick_add_form").show();
1546 $("#guarantor_template").hide();
1549 [% Asset.js("js/members.js") | $raw %]
1550 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1551 [% PROCESS 'password_check.inc' %]
1552 [% PROCESS 'add_password_check' new_password => 'password' %]
1555 [% INCLUDE 'intranet-bottom.inc' %]