8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Patrons ›
10 [% UNLESS blocking_error %]
13 [% ELSIF ( opduplicate ) %]
18 [% IF (firstname) %][% firstname | html %] [% END %]
19 [% IF (surname) %][% surname | html %] [% END %]
20 ([% IF categoryname -%]
21 [%- categoryname | html -%]
23 [%- IF ( I ) %]Organization[% END -%]
24 [%- IF ( A ) %]Adult[% END -%]
25 [%- IF ( C ) %]Child[% END -%]
26 [%- IF ( P ) %]Professional[% END -%]
27 [%- IF ( S ) %]Staff[% END -%]
31 [% INCLUDE 'doc-head-close.inc' %]
34 <body id="pat_memberentrygen" class="pat">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'patron-search.inc' %]
38 <div id="breadcrumbs">
39 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
40 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
41 [% UNLESS blocking_error %]
43 [% IF (firstname || surname ) %]
44 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
45 [% IF (firstname) %][% firstname | html %] [% END %]
46 [% IF (surname) %][% surname | html %] [% END %]
52 [% ELSIF ( opduplicate ) %]
58 [% categoryname | html %]
60 [% IF ( I ) %] Organization [% END %]
61 [% IF ( A ) %] Adult [% END %]
62 [% IF ( C ) %] Child [% END %]
63 [% IF ( P ) %] Professional [% END %]
64 [% IF ( S ) %] Staff [% END %]
68 </div> <!-- /#breadcrumbs -->
70 <div class="main container-fluid">
73 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
75 <div class="col-sm-10 col-sm-push-2">
77 <main class="clearfix">
78 [% INCLUDE 'blocking_errors.inc' %]
81 [% IF ( error_alert == "no_email" ) %]
82 <div class="dialog alert">This member has no email</div>
84 <div class="dialog alert">[% error_alert | html %]</div>
88 <div class="dialog message">Email has been sent.</div>
91 [% INCLUDE 'noadd-warnings.inc' %]
93 [% UNLESS ( no_add ) %]
97 [% ELSIF ( opduplicate ) %]
102 [% IF (firstname) %][% firstname | html %] [% END %]
103 [% IF (surname) %][% surname | html %] [% END %]
104 ([%IF categoryname %]
105 [% categoryname | html %]
107 [% IF ( I ) %] Organization [% END %]
108 [% IF ( A ) %] Adult [% END %]
109 [% IF ( C ) %] Child [% END %]
110 [% IF ( P ) %] Professional [% END %]
111 [% IF ( S ) %] Staff [% END %]
115 [% IF quickadd && opadd && !check_member %]
116 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
117 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
120 [% IF ( check_member ) %]
121 <div class="dialog alert">
122 <h3>Duplicate patron record?</h3>
123 <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>
124 <button id="duplicate" type="submit" class="new">
125 <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record
127 <button type="submit" id="not-duplicate" class="new">
128 <i class="fa fa-plus"></i> Not a duplicate. Save as new record
134 <div class="dialog alert">
135 <p>The following fields are wrong. Please fix them.</p>
137 [% IF ( ERROR_login_exist ) %]
138 <li id="ERROR_login_exist">Username/password already exists.</li>
140 [% IF ERROR_cardnumber_already_exists %]
141 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
143 [% IF ERROR_cardnumber_length %]
144 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
146 [% IF ( ERROR_age_limitations ) %]
147 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
148 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
150 [% IF ( ERROR_branch ) %]
151 <li id="ERROR_branch">Library is invalid.</li>
153 [% IF ( ERROR_dateofbirth ) %]
154 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
156 [% IF ( ERROR_dateenrolled ) %]
157 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
159 [% IF ( ERROR_dateexpiry ) %]
160 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
162 [% IF ( ERROR_password_too_short ) %]
163 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
165 [% IF ( ERROR_password_too_weak ) %]
166 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
168 [% IF ( ERROR_password_has_whitespaces ) %]
169 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
171 [% IF ( ERROR_password_mismatch ) %]
172 <li id="ERROR_password_mismatch">Passwords do not match.</li>
174 [% IF ( ERROR_extended_unique_id_failed ) %]
175 <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>
177 [% IF ERROR_bad_email %]
178 <li id="ERROR_bad_email">The primary email is invalid.</li>
180 [% IF ERROR_bad_email_secondary %]
181 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
183 [% IF ERROR_bad_email_alternative %]
184 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
190 <div id="toolbar" class="btn-toolbar">
191 [% UNLESS ( check_member ) %]
192 [% IF quickadd && opadd %]
193 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
195 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
197 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
199 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
201 <i class="fa fa-times"></i> Cancel
206 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
207 [% UNLESS ( check_member ) %]
208 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
210 <!-- field always hidden in different form (1,2,3) -->
211 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
212 <input type="hidden" name="category_type" value="[% category_type | html %]" />
213 <input type="hidden" name="updtype" value="[% updtype | html %]" />
214 <input type="hidden" name="destination" value="[% destination | html %]" />
215 <input type="hidden" name="check_member" value="[% check_member | html %]" />
216 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
217 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
218 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
220 <input type="hidden" name="step" value="[% step | html %]" />
223 <input type="hidden" name="op" value="insert" />
224 [% ELSIF ( opduplicate ) %]
225 <input type="hidden" name="op" value="insert" />
227 <input type="hidden" name="op" value="save" />
228 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
229 [%# Only put the cardnumber if we arent showing it in the form later %]
231 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
237 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
238 <fieldset class="rows" id="memberentry_identity">
239 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
243 [% IF Koha.Preference('BorrowersTitles') %]
245 [% IF ( mandatorytitle ) %]
246 <label for="btitle" class="required">
251 <select id="btitle" name="title">
252 <option value=""></option>
253 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
255 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
257 <option value="[% t | html %]">[% t | html %]</option>
261 [% IF ( mandatorytitle ) %]
262 <span class="required">Required</span>
265 [% END # /IF Koha.Preference('BorrowersTitles') %]
266 [% END # /UNLESS notitle %]
267 [% END # /UNLESS ( I ) %]
269 [% UNLESS nosurname %]
272 <label for="surname" class="required">
276 [% IF ( mandatorysurname ) %]
277 <label for="surname" class="required">
279 <label for="surname">
284 [% IF ( uppercasesurnames ) %]
285 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
287 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
289 [% IF ( mandatorysurname ) %]
290 <span class="required">Required</span>
293 [% END # /UNLESS nosurname %]
296 [% UNLESS nofirstname %]
298 [% IF ( mandatoryfirstname ) %]
299 <label for="firstname" class="required">
301 <label for="firstname">
305 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
306 [% IF ( mandatoryfirstname ) %]
307 <span class="required">Required</span>
310 [% END #/UNLESS nofirstname %]
311 [% UNLESS nodateofbirth %]
313 [% IF ( mandatorydateofbirth ) %]
314 <label for="dateofbirth" class="required">
316 <label for="dateofbirth">
320 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
321 [% IF ( mandatorydateofbirth ) %]
322 <span class="required">Required</span>
324 [% IF ( ERROR_dateofbirth ) %]
325 <span class="required">(Error)</span>
327 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
329 [% END # /UNLESS nodateofbirth %]
330 [% UNLESS noinitials %]
332 [% IF ( mandatoryinitials ) %]
333 <label for="initials" class="required">
335 <label for="initials">
339 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
340 [% IF ( mandatoryinitials ) %]
341 <span class="required">Required</span>
344 [% END # /UNLESS noinitials %]
345 [% END #/UNLESS ( I ) %]
346 [% UNLESS noothernames %]
348 [% IF ( mandatoryothernames ) %]
349 <label for="othernames" class="required">
351 <label for="othernames">
355 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
356 [% IF ( mandatoryothernames ) %]
357 <span class="required">Required</span>
359 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
361 [% END #/UNLESS noothernames %]
366 [% UNLESS ( opduplicate ) %]
368 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
370 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
373 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
375 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
378 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
380 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
383 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
384 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
385 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
386 [% END # /UNLESS ( opduplicate )%]
388 [% END # /UNLESS nosex %]
389 [% END # /UNLESS ( I ) %]
391 </fieldset> <!-- /#memberentry_identity -->
392 [% END # hide fieldset %]
394 [% IF show_guarantor || guarantor %]
395 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
396 <span id="memberentry_guarantor_anchor">
397 <fieldset id="memberentry_guarantor" class="rows">
398 <legend>Guarantor information</legend>
400 <span id="guarantor_relationships">
401 [% FOREACH r IN relationships %]
402 <fieldset class="rows">
404 [% IF category_type == 'I' %]
405 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
406 <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 %]
410 <label for="guarantor_surname">Organization name: </label>
411 <span>[% r.guarantor.surname | html %]</span>
414 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
415 <span class="label">Patron #:</span>
416 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>
419 [% IF r.guarantor.surname %]
421 <label for="guarantor_surname">Surname: </label>
422 <span>[% r.guarantor.surname | html %]</span>
426 [% IF r.guarantor.firstname %]
428 <label for="guarantor_firstname">First name: </label>
429 <span>[% r.guarantor.firstname | html %]</span>
434 <label for="relationship">Relationship: </label>
435 <span>[% r.relationship | html %]</span>
439 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
440 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
445 [% END # END relationships foreach %]
446 </span> <!-- #/guarantor_relationships -->
448 <fieldset class="rows guarantor" id="guarantor_template">
450 <li class="guarantor-details" data-borrowernumber="0">
451 <span class="label">Patron #:</span>
452 <span class="new_guarantor_id_text"></span>
453 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
457 <label for="guarantor_surname">Surname: </label>
458 <span class="new_guarantor_surname_text"></span>
462 <label for="guarantor_firstname">First name: </label>
463 <span class="new_guarantor_firstname_text"></span>
467 <label for="guarantor_relationship">Relationship: </label>
468 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
469 [% FOREACH pr IN possible_relationships.split('\|') %]
470 <option value="[% pr | html %]">[% pr | html %]</option>
476 <label for="guarantor_cancel"> </label>
477 <span><a href="#" class="guarantor_cancel">Remove</a></span>
483 <input type="hidden" id="guarantor_id" value="" />
484 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
485 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
488 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
491 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
493 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
494 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
495 [% IF privacy_guarantor_checkouts %]
496 <option value="0">No</option>
497 <option value="1" selected>Yes</option>
499 <option value="0" selected>No</option>
500 <option value="1">Yes</option>
503 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
506 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
508 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
509 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
510 [% IF privacy_guarantor_fines %]
511 <option value="0">No</option>
512 <option value="1" selected>Yes</option>
514 <option value="0" selected>No</option>
515 <option value="1">Yes</option>
518 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
522 </fieldset> <!-- /#memberentry_guarantor -->
523 </span> <!-- #/memberentry_guarantor_anchor -->
524 [% END # /IF show_guarantor || guarantor %]
527 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
528 [% IF Koha.Preference( 'AddressFormat' ) %]
529 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
531 [% END # /UNLESS nostreet && nocity etc group%]
533 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
534 <fieldset class="rows" id="memberentry_contact">
535 <legend id="contact_lgd">Contact</legend>
537 [% UNLESS nocontactname %]
539 [% IF ( mandatorycontactname ) %]
540 <label for="contactname" class="required">
542 <label for="contactname">
546 <input type="text" id="contactname" name="contactname" value="[% contactname | html %]" />
547 [% IF ( mandatorycontactname ) %]
548 <span class="required">Required</span>
550 <div class="hint">Non-patron guarantor surname</div>
552 [% END # /UNLESS nocontactname %]
554 [% UNLESS nocontactfirstname %]
556 [% IF ( mandatorycontactfirstname ) %]
557 <label for="contactfirstname" class="required">
559 <label for="contactfirstname">
561 Guarantor first name:
563 <input type="text" id="contactfirstname" name="contactfirstname" value="[% contactfirstname | html %]" />
564 [% IF ( mandatorycontactfirstname ) %]
565 <span class="required">Required</span>
567 <div class="hint">Non-patron guarantor first name</div>
569 [% END # /UNLESS noaltcontactfirstname %]
571 [% UNLESS norelationship %]
572 [% IF possible_relationships %]
574 <label for="relationship">Relationship: </label>
575 <select class="relationship" name="relationship">
576 <option value=""></option>
577 [% FOREACH pr IN possible_relationships.split('\|') %]
578 [% IF pr == relationship %]
579 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
581 <option value="[% pr | html %]">[% pr | html %]</option>
586 [% END #/IF possible_relationships %]
587 [% END # /UNLESS norelationship %]
591 [% IF ( mandatoryphone ) %]
592 <label for="phone" class="required">
598 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
599 [% IF ( mandatoryphone ) %]
600 <span class="required">Required</span>
602 <div class="hint">Shows on transit slips</div>
604 [% END # /UNLESS nophone %]
606 [% UNLESS nophonepro %]
608 [% IF ( mandatoryphonepro ) %]
609 <label for="phonepro" class="required">
611 <label for="phonepro">
615 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
616 [% IF ( mandatoryphonepro ) %]
617 <span class="required">Required</span>
620 [% END # /UNLESS nophonepro %]
622 [% UNLESS nomobile %]
624 [% IF ( mandatorymobile ) %]
625 <label for="mobile" class="required">
631 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
632 [% IF ( mandatorymobile ) %]
633 <span class="required">Required</span>
636 [% END # /UNLESS nomobile %]
640 [% IF ( mandatoryemail ) %]
641 <label for="email" class="required">
647 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
648 [% IF ( mandatoryemail ) %]
649 <span class="required">Required</span>
651 <div class="hint">Shows on transit slips</div>
653 [% END #/UNLESS noemail %]
655 [% UNLESS noemailpro %]
657 [% IF ( mandatoryemailpro ) %]
658 <label for="emailpro" class="required">
660 <label for="emailpro">
664 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
665 [% IF ( mandatoryemailpro ) %]
666 <span class="required">Required</span>
669 [% END # /UNLESS noemailpro %]
673 [% IF ( mandatoryfax ) %]
674 <label for="fax" class="required">
680 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
681 [% IF ( mandatoryfax ) %]
682 <span class="required">Required</span>
685 [% END #/UNLESS nofax %]
687 </fieldset> <!-- /#memberentry_contact -->
688 [% END # hide fieldset %]
690 <!-- ************************ STEP_1 *********************** -->
691 [% END # /IF ( step_1 ) %]
694 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
695 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
697 [% INCLUDE 'member-alt-address-style-de.inc' %]
699 [% INCLUDE 'member-alt-address-style-us.inc' %]
701 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
702 [% END # /IF ( step_6 ) %]
705 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
706 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
708 [% INCLUDE 'member-alt-contact-style-de.inc' %]
710 [% INCLUDE 'member-alt-contact-style-us.inc' %]
712 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
713 [% END # /IF ( step_2 ) %]
716 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
717 <fieldset class="rows" id="memberentry_library_management">
718 <legend id="library_management_lgd">Library management</legend>
720 [% UNLESS nocardnumber %]
722 [% IF mandatorycardnumber %]
723 <label for="cardnumber" class="required">
725 <label for="cardnumber" class="validated">
730 <!-- NOTE: div.hint closing tag isn't on the same line -->
731 [% IF minlength_cardnumber == maxlength_cardnumber %]
732 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
733 [% IF mandatorycardnumber %]
734 <span class="required">Required</span>
736 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
737 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
738 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
739 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
740 [% IF mandatorycardnumber %]
741 <span class="required">Required</span>
743 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
744 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
745 [% ELSIF maxlength_cardnumber %]
746 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
747 [% IF mandatorycardnumber %]
748 <span class="required">Required</span>
750 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
751 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
753 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
754 [% IF mandatorycardnumber %]
755 <span class="required">Required</span>
757 <div class="hint">There is no minimum or maximum character length.
759 [% IF autoMemberNum %]
760 [% IF mandatorycardnumber %]
761 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
763 <br/>Leave blank for auto calc during registration
766 </div><!--/div.hint -->
768 [% END # /UNLESS nocardnumber %]
770 [% UNLESS nobranchcode %]
772 <label for="libraries" class="required">Library:</label>
773 <select name="branchcode" size="1" id="libraries">
774 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
776 <span class="required">Required</span>
781 <label for="categorycode_entry" class="required">Category: </label>
782 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
783 [% FOREACH typeloo IN typeloop %]
784 [% FOREACH categoryloo IN typeloo.categoryloop %]
785 [% IF ( loop.first ) %]
786 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
787 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
788 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
789 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
790 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
791 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
793 [% IF ( categoryloo.categorycodeselected ) %]
794 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
796 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
798 [% IF ( loop.last ) %]
801 [% END # /FOREACH categoryloo %]
802 [% END # /FOREACH typeloo %]
804 <span class="required">Required</span>
809 [% IF ( mandatorysort1 ) %]
810 <label for="sort1" class="required">
816 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
817 [% IF ( mandatorysort1 ) %]
818 <span class="required">Required</span>
821 [% END # /UNLESS nosort1 %]
825 [% IF ( mandatorysort2 ) %]
826 <label for="sort2" class="required">
832 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
833 [% IF ( mandatorysort2 ) %]
834 <span class="required">Required</span>
837 [% END # /UNLESS nosort2 %]
839 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
841 <label for="checkprevcheckout">Check for previous checkouts: </label>
842 <select name="checkprevcheckout" id="checkprevcheckout">
843 [% IF ( checkprevcheckout == 'yes' ) %]
844 <option value="yes" selected="selected">Yes if settings allow it</option>
845 <option value="no">No if settings allow it</option>
846 <option value="inherit">Inherit from settings</option>
847 [% ELSIF ( checkprevcheckout == 'no' ) %]
848 <option value="yes">Yes if settings allow it</option>
849 <option value="no" selected="selected">No if settings allow it</option>
850 <option value="inherit">Inherit from settings</option>
852 <option value="yes">Yes if settings allow it</option>
853 <option value="no">No if settings allow it</option>
854 <option value="inherit" selected="selected">Inherit from settings</option>
858 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
860 [% IF Koha.Preference('TranslateNotices') %]
862 <label for="lang">Preferred language for notices: </label>
863 <select id="lang" name="lang">
864 <option value="default">Default</option>
865 [% FOR language IN languages %]
866 [% FOR sublanguage IN language.sublanguages_loop %]
867 [% IF language.plural %]
868 [% IF sublanguage.rfc4646_subtag == lang %]
869 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
871 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
874 [% IF sublanguage.rfc4646_subtag == lang %]
875 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
877 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
879 [% END # /IF language.plural %]
880 [% END # /FOR sublanguage %]
881 [% END #/FOR language %]
882 </select> <!-- /#lang -->
884 [% END #/IF Koha.Preference('TranslateNotices') %]
886 </fieldset> <!-- /#memberentry_library_management -->
888 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
889 <fieldset class="rows" id="memberentry_subscription">
890 <legend id="library_setup_lgd">Library set-up</legend><ol>
891 [% UNLESS nodateenrolled %]
893 [% IF ( mandatorydateenrolled ) %]
894 <label for="from" class="required">
900 [% IF ( dateformat == "metric" ) %]
901 <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" />
903 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
905 [% IF ( mandatorydateenrolled ) %]
906 <span class="required">Required</span>
908 [% IF ( ERROR_dateenrolled ) %]
909 <span class="required">(Error)</span>
911 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
913 [% END # /UNLESS nodateenrolled %]
915 [% UNLESS nodateexpiry %]
918 <li style="display:none">
920 [% IF ( mandatorydateexpiry ) %]
921 <label for="to" class="required">
925 Expiry date (leave blank for auto calc):
927 [% IF ( dateformat == "metric" ) %]
928 [% UNLESS ( opadd ) %]
929 <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" />
931 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
934 [% UNLESS ( opadd ) %]
935 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
937 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
939 [% END # /IF ( dateformat == "metric" ) %]
940 [% IF ( mandatorydateexpiry ) %]
941 <span class="required">Required</span>
943 [% IF ( ERROR_dateexpiry ) %]
944 <span class="required">(Error)</span>
946 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
949 [% UNLESS noopacnote %]
951 [% IF ( mandatoryopacnote ) %]
952 <label for="opacnote" class="required">
954 <label for="opacnote">
958 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
959 <div class="hint">This message appears on this patron's user page in the OPAC</div>
960 [% IF ( mandatoryopacnote ) %]
961 <span class="required">Required</span>
964 [% END # /UNLESS noopacnote %]
966 [% UNLESS noborrowernotes %]
968 [% IF ( mandatoryborrowernotes ) %]
969 <label for="borrowernotes" class="required">
971 <label for="borrowernotes">
975 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
976 <div class="hint">This message displays when checking out to this patron</div>
977 [% IF ( mandatoryborrowernotes ) %]
978 <span class="required">Required</span>
981 [% END # /UNLESS noborrowernotes %]
983 </fieldset> <!-- /#memberentry_subscription -->
984 [% END # hide fieldset %]
986 [% UNLESS nouserid && nopassword %]
987 <fieldset class="rows" id="memberentry_userid">
988 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
990 [% UNLESS nouserid %]
992 [% IF ( mandatoryuserid ) %]
993 <label for="userid" class="required">
1000 [% IF ( NoUpdateLogin ) %]
1001 [% IF ( opduplicate ) %]
1002 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1004 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1007 [% IF ( opduplicate ) %]
1008 <input type="text" id="userid" name="userid" size="20" value="" />
1010 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1012 [% END # /IF ( NoUpdateLogin ) %]
1014 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1015 <input type="text" disabled="disabled" style="display:none" />
1017 [% IF ( mandatoryuserid ) %]
1018 <span class="required">Required</span>
1021 [% END # /UNLESS nouserid %]
1023 [% UNLESS nopassword %]
1025 [% IF ( mandatorypassword ) %]
1026 <label for="password" class="required">
1028 <label for="password">
1033 [% IF ( NoUpdateLogin ) %]
1034 [% IF ( opduplicate ) %]
1035 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1037 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1040 [% IF ( opduplicate ) %]
1041 <input type="password" id="password" name="password" size="20" />
1043 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1045 [% END # /IF ( NoUpdateLogin ) %]
1046 [% ELSE # IF ( opadd ) %]
1048 [% IF ( password ) %]
1049 [% IF ( NoUpdateLogin ) %]
1050 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1052 [% IF ( opduplicate ) %]
1053 <input type="password" id="password" name="password" size="20" />
1055 <input type="password" id="password" name="password" size="20" value="****" />
1059 [% IF ( NoUpdateLogin ) %]
1060 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1062 <input type="password" id="password" name="password" size="20" value="" />
1064 [% END # /IF ( password ) %]
1065 [% END # /IF ( opadd ) %]
1066 [% IF ( mandatorypassword ) %]
1067 <span class="required">Required</span>
1069 [% IF ( ERROR_password_too_short ) %]
1070 <span class="required">Password is too short</span>
1072 [% IF ( ERROR_password_too_weak ) %]
1073 <span class="required">Password is too weak</span>
1075 [% IF ( ERROR_password_has_whitespaces ) %]
1076 <span class="required">Password has leading or trailing whitespaces</span>
1078 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1082 [% IF ( mandatorypassword ) %]
1083 <label for="password2" class="required">
1085 <label for="password2">
1090 [% IF ( NoUpdateLogin ) %]
1091 [% IF ( opduplicate ) %]
1092 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1094 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1097 [% IF ( opduplicate ) %]
1098 <input type="password" id="password2" name="password2" size="20" />
1100 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1103 [% ELSE # IF ( opadd ) %]
1104 [% IF ( password ) %]
1105 [% IF ( NoUpdateLogin ) %]
1106 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1108 [% IF ( opduplicate ) %]
1109 <input type="password" id="password2" name="password2" size="20" />
1111 <input type="password" id="password2" name="password2" size="20" value="****" />
1115 [% IF ( NoUpdateLogin ) %]
1116 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1118 <input type="password" id="password2" name="password2" size="20" value="" />
1121 [% END # /IF ( opadd ) %]
1123 [% IF ( mandatorypassword ) %]
1124 <span class="required">Required</span>
1126 [% IF ( ERROR_password_mismatch ) %]
1127 <span class="required">Passwords do not match</span>
1130 [% END # /UNLESS nopassword %]
1132 </fieldset> <!-- /#memberentry_userid -->
1133 [% END # UNLESS nouserid && nopassword %]
1135 <!--this zones are not necessary in modif mode -->
1136 [% UNLESS ( opadd || opduplicate ) %]
1137 <fieldset class="rows" id="memberentry_account_flags">
1138 <legend id="account_flags_lgd">Patron account flags</legend>
1140 [% FOREACH flagloo IN flagloop %]
1142 <label class="radio" for="yes[% flagloo.name | html %]">
1143 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1144 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1146 [% IF CAN_user_circulate_manage_restrictions %]
1147 <label for="yes[% flagloo.name | html %]">
1148 [% IF ( flagloo.yes ) %]
1149 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1151 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1155 <label for="no[% flagloo.name | html %]">
1156 [% IF ( flagloo.no ) %]
1157 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1159 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1164 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1165 [% END # /IF CAN_user_circulate_manage_restrictions %]
1167 [% END # /FOREACH flagloo %]
1169 </fieldset> <!-- /#memberentry_account_flags -->
1171 <fieldset class="rows" id="memberentry_restrictions">
1172 <legend id="restrictions_lgd">Patron restrictions</legend>
1173 [% IF ( debarments ) %]
1181 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1187 [% FOREACH d IN debarments %]
1189 <td>[% d.type | html %]</td>
1191 [% IF d.comment.search('OVERDUES_PROCESS') %]
1192 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1194 [% d.comment | $raw %]
1198 [% IF d.expiration %]
1199 [% d.expiration | $KohaDates %]
1204 <td>[% d.created | $KohaDates %]</td>
1205 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1207 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1211 [% END # /FOREACH d %]
1215 <p>Patron is currently unrestricted.</p>
1216 [% END # /IF ( debarments ) %]
1218 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1219 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1220 <fieldset id="manual_restriction_form">
1221 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1222 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1225 <label for="debarred_comment">Comment: </label>
1226 <input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" />
1229 <label for="debarred_expiration">Expiration: </label>
1230 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" type="text" />
1231 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a>
1235 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1237 </fieldset> <!-- /#manual_restriction_form -->
1238 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1239 </fieldset> <!-- /#memberentry_restrictions -->
1240 [% END # /UNLESS ( opadd || opduplicate ) %]
1241 [% END # /IF ( step_3 ) %]
1244 [% IF Koha.Preference('HouseboundModule') %]
1245 <fieldset class="rows" id="memberentry_housebound_roles">
1246 <legend id="housebound_roles">Housebound roles</legend>
1249 <label class="radio" for="housebound_chooser">
1252 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1253 <label for="yes_housebound_chooser">Yes </label>
1254 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1255 <label for="no_housebound_chooser">No </label>
1256 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1258 <label for="yes_housebound_chooser">Yes </label>
1259 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1260 <label for="no_housebound_chooser">No </label>
1261 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1265 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1266 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1267 <label for="yes_housebound_deliverer">Yes </label>
1268 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1269 <label for="no_housebound_deliverer">No </label>
1270 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1272 <label for="yes_housebound_deliverer">Yes </label>
1273 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1274 <label for="no_housebound_deliverer">No </label>
1275 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1278 </ol> <!-- /ol.radio -->
1279 </fieldset> <!-- /#memberentry_housebound_roles -->
1280 [% END # hide fieldset %]
1281 [% END # IF step_7 %]
1284 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1285 [% UNLESS ( no_patron_attribute_types ) %]
1286 <fieldset class="rows" id="memberentry_patron_attributes">
1287 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1288 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1289 [% FOREACH pa_loo IN patron_attributes %]
1290 <ol class="attributes_table">
1291 [% IF pa_loo.class %]
1292 <fieldset id="aai_[% pa_loo.class | html %]">
1293 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1295 [% FOREACH patron_attribute IN pa_loo.items %]
1296 <li data-category_code="[% patron_attribute.category_code | html %]">
1297 <label for="[% patron_attribute.form_id | html %]">
1298 [% patron_attribute.description | html %]:
1300 [% IF ( patron_attribute.use_dropdown ) %]
1301 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1302 <option value=""></option>
1303 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1304 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1305 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1306 [% auth_val_loo.lib | html %]
1309 <option value="[% auth_val_loo.authorised_value | html %]" >
1310 [% auth_val_loo.lib | html %]
1316 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1317 [% END # /IF ( patron_attribute.use_dropdown ) %]
1318 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1319 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1320 [% IF ( patron_attribute.repeatable ) %]
1321 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1324 [% END # /FOREACH patron_attribute %]
1325 [% IF pa_loo.class %]</fieldset>[% END %]
1327 [% END # /FOREACH pa_loo %]
1328 </fieldset> <!-- /#memberentry_patron_attributes -->
1329 [% END # UNLESS ( no_patron_attribute_types ) %]
1330 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1331 [% END # IF ( step_4 ) %]
1334 [% IF ( EnhancedMessagingPreferences ) %]
1335 <fieldset class="rows" id="memberentry_messaging_prefs">
1336 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1337 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1338 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1340 <input type="hidden" name="setting_messaging_prefs" value="1" />
1341 [% INCLUDE 'messaging-preference-form.inc' %]
1342 [% IF ( SMSSendDriver ) %]
1344 <label for="SMSnumber">SMS number:</label>
1345 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1346 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1348 [% UNLESS nosms_provider_id %]
1350 <label for="sms_provider_id">SMS provider:</label>
1351 <select id="sms_provider_id" name="sms_provider_id">
1352 <option value="">Unknown</option>
1353 [% FOREACH s IN sms_providers %]
1354 [% IF s.id == sms_provider_id %]
1355 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1357 <option value="[% s.id | html %]">[% s.name | html %]</option>
1362 [% END # /UNLESS nosms_provider_id %]
1363 [% END # IF ( SMSSendDriver ) %]
1365 [% END # IF ( EnhancedMessagingPreferences ) %]
1366 [% END # /IF step_5 %]
1367 </form> <!-- /#entryform -->
1369 [% IF quickadd && opadd && !check_member %]
1370 <form id="quick_add_form" class="toggler">
1371 <fieldset class="rows quick_add"><legend>Quick add</legend>
1372 <ol id="quick_add_list">
1378 [% END # /UNLESS ( no_add ) %]
1380 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1382 [% UNLESS ( opadd ) %]
1383 <div class="col-sm-2 col-sm-pull-10">
1385 [% INCLUDE 'circ-menu.inc' %]
1387 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1389 </div> <!-- /.row -->
1391 [% MACRO jsinclude BLOCK %]
1392 [% Asset.js("lib/hc-sticky.js") | $raw %]
1393 [% INCLUDE 'calendar.inc' %]
1394 [% INCLUDE 'str/members-menu.inc' %]
1395 [% Asset.js("js/members-menu.js") | $raw %]
1397 function update_cardnumber_warning(size){
1398 var max_len = [% maxlength_cardnumber | html %];
1399 if ( size >= max_len ) {
1400 $("#cn_max").show();
1402 $("#cn_max").hide();
1406 $(document).ready(function() {
1407 $("#saverecord").css({ 'margin-left': 0 });
1409 Sticky = $("#toolbar");
1412 stickyClass: "floating"
1415 [% IF categorycode %]
1416 update_category_code( "[% categorycode | html %]" );
1418 if ( $("#categorycode_entry").length > 0 ){
1419 var category_code = $("#categorycode_entry").find("option:selected").val();
1420 update_category_code( category_code );
1424 [% IF new_guarantors %]
1425 [% FOREACH g IN new_guarantors %]
1426 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1430 $("#cn_max").hide();
1432 $("#cardnumber").on("keydown", function(e){
1433 content = $(this).val();
1435 $("#cardnumber").on("keyup", function(e){
1436 // .val() will return the value of the input after the key has been released
1437 var l = $(this).val().length;
1438 if ( l == content.length + 1 ) { l--; }
1439 update_cardnumber_warning(l);
1441 $("#cardnumber").bind("paste", function(e){
1442 var pastedData = e.originalEvent.clipboardData.getData('text');
1443 update_cardnumber_warning(pastedData.length - 1);
1445 var toggle_quick_add = $(".toggle_quick_add");
1446 $(toggle_quick_add).click(function(e){
1447 toggle_quick_add.toggle();
1450 var toggle_from = '';
1451 if( $("#entryform:visible").length ) {
1452 toggle_to = "#quick_add_form label";
1453 toggle_from = "#entryform label";
1454 $("#memberentry_guarantor").appendTo("#quick_add_form");
1456 toggle_to="#entryform label";
1457 toggle_from = "#quick_add_form label";
1458 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1460 $(toggle_from).each(function() {
1461 var input_label = $(this).attr('for');
1462 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1463 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1466 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1469 $(".toggler").toggle();
1472 $("#save_quick_add").click(function(){
1473 $("#quick_add_form").validate();
1474 if( $("#quick_add_form").valid()){
1475 $('.toggle_quick_add').click();
1476 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1477 $('#saverecord').click();
1479 else {return false;}
1482 $("#saverecord").click(function(){
1483 if( check_form_borrowers() ){
1484 $("#entryform").submit();
1488 $('#duplicate').on('click', function() {
1489 $("input[name='op']").val('modify');
1490 $("input[name='borrowernumber']").val('[% check_member | html %]');
1491 $("input[name='check_member']").val('');
1492 $('#entryform').submit();
1495 $('#not-duplicate').on('click', function() {
1496 $("input[name='nodouble']").val('1');
1497 $('#entryform').submit();
1501 var MSG_SEPARATOR = _("Separator must be / in field %s");
1502 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1503 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1504 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1505 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1506 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1507 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1508 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1509 var MSG_MONTH = _("%s month")
1510 var MSG_MONTHS = _("%s months")
1511 var MSG_YEAR = _("%s year")
1512 var MSG_YEARS = _("%s years")
1513 var LABEL_CHANGE = _("Change");
1514 var LABEL_SET_TO_PATRON = _("Set to patron");
1515 var LABEL_AGE = _("Age");
1516 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1518 [% IF quickadd && opadd && !check_member %]
1519 $(document).ready(function () {
1521 $("#entryform,#saverecord").hide();
1522 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1523 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1524 $("#entryform label").each(function () {
1525 var input_label = $(this).attr('for');
1526 if ( input_label == 'sex-female' ) {
1529 else if ( input_label == 'btitle' ) {
1530 input_label='title';
1532 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1533 $(this).parent().clone().appendTo("#quick_add_list");
1534 [% UNLESS mandatorypassword %]
1535 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1539 if ( $("#memberentry_guarantor").length ) {
1540 $("#memberentry_guarantor").appendTo("#quick_add_form");
1542 $("#quick_add_form").show();
1545 $("#guarantor_template").hide();
1548 [% Asset.js("js/members.js") | $raw %]
1549 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1550 [% PROCESS 'password_check.inc' %]
1551 [% PROCESS 'add_password_check' new_password => 'password' %]
1554 [% INCLUDE 'intranet-bottom.inc' %]