1 [% PROCESS 'i18n.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Patrons ›
11 [% UNLESS blocking_error %]
14 [% ELSIF ( opduplicate ) %]
19 [% INCLUDE 'patron-title.inc' no_html = 1 %]
20 [% IF categoryname %]([% categoryname | html %])[% END %]
28 [% INCLUDE 'doc-head-close.inc' %]
31 <body id="pat_memberentrygen" class="pat">
32 [% INCLUDE 'header.inc' %]
33 [% INCLUDE 'patron-search.inc' %]
35 <div id="breadcrumbs">
36 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
37 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
38 [% UNLESS blocking_error %]
40 [% IF (firstname || surname ) %]
41 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
42 [% INCLUDE 'patron-title.inc' %]
48 [% ELSIF ( opduplicate ) %]
53 [% IF categoryname %]([% categoryname | html %])[% END %]
56 </div> <!-- /#breadcrumbs -->
58 <div class="main container-fluid">
61 [% FOR message IN messages %]
62 [% SWITCH message.error %]
63 [% CASE 'error_on_insert_patron' %]
64 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
65 [% CASE %]Unhandled error: [% message.error %]
70 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
72 <div class="col-sm-10 col-sm-push-2">
74 <main class="clearfix">
75 [% INCLUDE 'blocking_errors.inc' %]
78 [% IF ( error_alert == "no_email" ) %]
79 <div class="dialog alert">This member has no email</div>
81 <div class="dialog alert">[% error_alert | html %]</div>
85 <div class="dialog message">Email has been sent.</div>
88 [% INCLUDE 'noadd-warnings.inc' %]
90 [% UNLESS ( no_add ) %]
94 [% ELSIF ( opduplicate ) %]
99 [% INCLUDE 'patron-title.inc' %]
100 [% IF categoryname %]([% categoryname | html %])[% END %]
103 [% IF quickadd && opadd && !check_member %]
104 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
105 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
108 [% IF ( check_member ) %]
109 <div class="dialog alert">
110 <h3>Duplicate patron record?</h3>
111 <p><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&borrowernumber=[% check_member | uri %]"><i class="fa fa-window-restore"></i> View existing record</a></p>
112 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
113 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
118 <div class="dialog alert">
119 <p>The following fields are wrong. Please fix them.</p>
121 [% IF ( ERROR_login_exist ) %]
122 <li id="ERROR_login_exist">Username/password already exists.</li>
124 [% IF ERROR_cardnumber_already_exists %]
125 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
127 [% IF ERROR_cardnumber_length %]
128 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
130 [% IF ( ERROR_age_limitations ) %]
131 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
132 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
134 [% IF ( ERROR_branch ) %]
135 <li id="ERROR_branch">Library is invalid.</li>
137 [% IF ( ERROR_dateofbirth ) %]
138 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
140 [% IF ( ERROR_dateenrolled ) %]
141 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
143 [% IF ( ERROR_dateexpiry ) %]
144 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
146 [% IF ( ERROR_password_too_short ) %]
147 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
149 [% IF ( ERROR_password_too_weak ) %]
150 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
152 [% IF ( ERROR_password_has_whitespaces ) %]
153 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
155 [% IF ( ERROR_password_mismatch ) %]
156 <li id="ERROR_password_mismatch">Passwords do not match.</li>
158 [% IF ( ERROR_extended_unique_id_failed ) %]
159 <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>
161 [% IF ERROR_bad_email %]
162 <li id="ERROR_bad_email">The primary email is invalid.</li>
164 [% IF ERROR_bad_email_secondary %]
165 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
167 [% IF ERROR_bad_email_alternative %]
168 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
174 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
175 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
177 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
178 [% FOREACH field IN fieldstohide.split(',') %]
180 [% CASE 'identity' %] Organization/Patron identity |
181 [% CASE 'guarantor' %] Guarantor information |
182 [% CASE 'primary_address' %] Main address |
183 [% CASE 'primary_contact' %] Contact information |
184 [% CASE 'alt_address' %] Alternate address |
185 [% CASE 'alt_contact' %] Alternate contact |
186 [% CASE 'lib_mgmt' %] Library management |
187 [% CASE 'lib_setup' %] Library setup |
188 [% CASE 'login' %] OPAC/Staff login |
189 [% CASE 'flags' %] Patron account flags |
190 [% CASE 'debarments' %] Patron restrictions |
191 [% CASE 'housebound' %] Housebound roles |
192 [% CASE 'additional' %] Additional attributes and identifiers |
193 [% CASE 'messaging' %] Patron messaging preferences |
199 [% UNLESS ( check_member ) %]
200 <div id="toolbar" class="btn-toolbar">
201 [% IF quickadd && opadd %]
202 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
204 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
206 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
208 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
210 <i class="fa fa-times"></i> Cancel
215 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
216 [% UNLESS ( check_member ) %]
217 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
219 <!-- field always hidden in different form (1,2,3) -->
220 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
221 <input type="hidden" name="category_type" value="[% category_type | html %]" />
222 <input type="hidden" name="updtype" value="[% updtype | html %]" />
223 <input type="hidden" name="destination" value="[% destination | html %]" />
224 <input type="hidden" name="check_member" value="[% check_member | html %]" />
225 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
226 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
227 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
229 <input type="hidden" name="step" value="[% step | html %]" />
232 <input type="hidden" name="op" value="insert" />
233 [% ELSIF ( opduplicate ) %]
234 <input type="hidden" name="op" value="insert" />
236 <input type="hidden" name="op" value="save" />
237 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
238 [%# Only put the cardnumber if we arent showing it in the form later %]
240 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
246 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
247 <fieldset class="rows" id="memberentry_identity">
248 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
252 [% IF Koha.Preference('BorrowersTitles') %]
254 [% IF ( mandatorytitle ) %]
255 <label for="btitle" class="required">
260 <select id="btitle" name="title">
261 <option value=""></option>
262 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
264 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
266 <option value="[% t | html %]">[% t | html %]</option>
270 [% IF ( mandatorytitle ) %]
271 <span class="required">Required</span>
274 [% END # /IF Koha.Preference('BorrowersTitles') %]
275 [% END # /UNLESS notitle %]
276 [% END # /UNLESS ( I ) %]
278 [% UNLESS nosurname %]
281 <label for="surname" class="required">
285 [% IF ( mandatorysurname ) %]
286 <label for="surname" class="required">
288 <label for="surname">
293 [% IF ( uppercasesurnames ) %]
294 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
296 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
298 [% IF ( mandatorysurname ) %]
299 <span class="required">Required</span>
302 [% END # /UNLESS nosurname %]
305 [% UNLESS nofirstname %]
307 [% IF ( mandatoryfirstname ) %]
308 <label for="firstname" class="required">
310 <label for="firstname">
314 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
315 [% IF ( mandatoryfirstname ) %]
316 <span class="required">Required</span>
319 [% END #/UNLESS nofirstname %]
320 [% UNLESS nodateofbirth %]
322 [% IF ( mandatorydateofbirth ) %]
323 <label for="dateofbirth" class="required">
325 <label for="dateofbirth">
329 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
330 [% IF ( mandatorydateofbirth ) %]
331 <span class="required">Required</span>
333 [% IF ( ERROR_dateofbirth ) %]
334 <span class="required">(Error)</span>
336 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
338 [% END # /UNLESS nodateofbirth %]
339 [% UNLESS noinitials %]
341 [% IF ( mandatoryinitials ) %]
342 <label for="initials" class="required">
344 <label for="initials">
348 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
349 [% IF ( mandatoryinitials ) %]
350 <span class="required">Required</span>
353 [% END # /UNLESS noinitials %]
354 [% END #/UNLESS ( I ) %]
355 [% UNLESS noothernames %]
357 [% IF ( mandatoryothernames ) %]
358 <label for="othernames" class="required">
360 <label for="othernames">
364 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
365 [% IF ( mandatoryothernames ) %]
366 <span class="required">Required</span>
368 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
370 [% END #/UNLESS noothernames %]
375 [% UNLESS ( opduplicate ) %]
377 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
379 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
382 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
384 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
387 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
389 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
392 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
393 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
394 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
395 [% END # /UNLESS ( opduplicate )%]
397 [% END # /UNLESS nosex %]
398 [% END # /UNLESS ( I ) %]
400 </fieldset> <!-- /#memberentry_identity -->
401 [% END # hide fieldset %]
403 [% IF show_guarantor || guarantor %]
404 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
405 <span id="memberentry_guarantor_anchor">
406 <fieldset id="memberentry_guarantor" class="rows">
407 <legend>Guarantor information</legend>
409 <span id="guarantor_relationships">
410 [% FOREACH r IN relationships %]
411 <fieldset class="rows">
413 [% IF category_type == 'I' %]
414 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
415 <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 %]
419 <label for="guarantor_surname">Organization name: </label>
420 <span>[% r.guarantor.surname | html %]</span>
423 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
424 <span class="label">Patron card number:</span>
425 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
428 [% IF r.guarantor.surname %]
430 <label for="guarantor_surname">Surname: </label>
431 <span>[% r.guarantor.surname | html %]</span>
435 [% IF r.guarantor.firstname %]
437 <label for="guarantor_firstname">First name: </label>
438 <span>[% r.guarantor.firstname | html %]</span>
443 <label for="relationship">Relationship: </label>
444 <span>[% r.relationship | html %]</span>
448 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
449 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
454 [% END # END relationships foreach %]
455 [% IF guarantor && (!relationships) %]
456 <fieldset class="rows">
458 <li class="guarantor-details" data-borrowernumber="0">
459 <span class="label">Patron card number:</span>
460 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
461 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
465 <label for="guarantor_surname">Surname: </label>
466 <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
470 <label for="guarantor_firstname">First name: </label>
471 <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
475 <label for="guarantor_relationship">Relationship: </label>
476 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
477 [% FOREACH pr IN possible_relationships.split('\|') %]
478 <option value="[% pr | html %]">[% pr | html %]</option>
484 <label for="guarantor_cancel"> </label>
485 <span><a href="#" class="guarantor_cancel">Remove</a></span>
490 </span> <!-- #/guarantor_relationships -->
492 <fieldset class="rows guarantor" id="guarantor_template">
494 <li class="guarantor-details" data-borrowernumber="0">
495 <span class="label">Patron card number:</span>
496 <span class="new_guarantor_id_text"></span>
497 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
501 <label for="guarantor_surname">Surname: </label>
502 <span class="new_guarantor_surname_text"></span>
506 <label for="guarantor_firstname">First name: </label>
507 <span class="new_guarantor_firstname_text"></span>
511 <label for="guarantor_relationship">Relationship: </label>
512 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
513 [% FOREACH pr IN possible_relationships.split('\|') %]
514 <option value="[% pr | html %]">[% pr | html %]</option>
520 <label for="guarantor_cancel"> </label>
521 <span><a href="#" class="guarantor_cancel">Remove</a></span>
527 <input type="hidden" id="guarantor_id" value="" />
528 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
529 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
532 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
535 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
537 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
538 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
539 [% IF privacy_guarantor_checkouts %]
540 <option value="0">No</option>
541 <option value="1" selected>Yes</option>
543 <option value="0" selected>No</option>
544 <option value="1">Yes</option>
547 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
550 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
552 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
553 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
554 [% IF privacy_guarantor_fines %]
555 <option value="0">No</option>
556 <option value="1" selected>Yes</option>
558 <option value="0" selected>No</option>
559 <option value="1">Yes</option>
562 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
566 </fieldset> <!-- /#memberentry_guarantor -->
567 </span> <!-- #/memberentry_guarantor_anchor -->
568 [% END # /IF show_guarantor || guarantor %]
570 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
571 [% IF Koha.Preference( 'AddressFormat' ) %]
572 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
574 [% INCLUDE 'member-main-address-style-us.inc' %]
576 [% END # /UNLESS nostreet && nocity etc group%]
578 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
579 <fieldset class="rows" id="memberentry_contact">
580 <legend id="contact_lgd">Contact</legend>
582 [% UNLESS nocontactname %]
584 [% IF ( mandatorycontactname ) %]
585 <label for="contactname" class="required">
587 <label for="contactname">
591 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
592 [% IF ( mandatorycontactname ) %]
593 <span class="required">Required</span>
595 <div class="hint">Non-patron guarantor surname</div>
597 [% END # /UNLESS nocontactname %]
599 [% UNLESS nocontactfirstname %]
601 [% IF ( mandatorycontactfirstname ) %]
602 <label for="contactfirstname" class="required">
604 <label for="contactfirstname">
606 Guarantor first name:
608 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
609 [% IF ( mandatorycontactfirstname ) %]
610 <span class="required">Required</span>
612 <div class="hint">Non-patron guarantor first name</div>
614 [% END # /UNLESS noaltcontactfirstname %]
616 [% UNLESS norelationship %]
617 [% IF possible_relationships %]
619 <label for="relationship">Relationship: </label>
620 <select class="relationship" name="relationship">
621 <option value=""></option>
622 [% FOREACH pr IN possible_relationships.split('\|') %]
623 [% IF pr == relationship %]
624 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
626 <option value="[% pr | html %]">[% pr | html %]</option>
631 [% END #/IF possible_relationships %]
632 [% END # /UNLESS norelationship %]
636 [% IF ( mandatoryphone ) %]
637 <label for="phone" class="required">
643 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
644 [% IF ( mandatoryphone ) %]
645 <span class="required">Required</span>
647 <div class="hint">Shows on transit slips</div>
649 [% END # /UNLESS nophone %]
651 [% UNLESS nophonepro %]
653 [% IF ( mandatoryphonepro ) %]
654 <label for="phonepro" class="required">
656 <label for="phonepro">
660 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
661 [% IF ( mandatoryphonepro ) %]
662 <span class="required">Required</span>
665 [% END # /UNLESS nophonepro %]
667 [% UNLESS nomobile %]
669 [% IF ( mandatorymobile ) %]
670 <label for="mobile" class="required">
676 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
677 [% IF ( mandatorymobile ) %]
678 <span class="required">Required</span>
681 [% END # /UNLESS nomobile %]
685 [% IF ( mandatoryemail ) %]
686 <label for="email" class="required">
692 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
693 [% IF ( mandatoryemail ) %]
694 <span class="required">Required</span>
696 <div class="hint">Shows on transit slips</div>
698 [% END #/UNLESS noemail %]
700 [% UNLESS noemailpro %]
702 [% IF ( mandatoryemailpro ) %]
703 <label for="emailpro" class="required">
705 <label for="emailpro">
709 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
710 [% IF ( mandatoryemailpro ) %]
711 <span class="required">Required</span>
714 [% END # /UNLESS noemailpro %]
718 [% IF ( mandatoryfax ) %]
719 <label for="fax" class="required">
725 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
726 [% IF ( mandatoryfax ) %]
727 <span class="required">Required</span>
730 [% END #/UNLESS nofax %]
732 </fieldset> <!-- /#memberentry_contact -->
733 [% END # hide fieldset %]
735 <!-- ************************ STEP_1 *********************** -->
736 [% END # /IF ( step_1 ) %]
739 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
740 [% IF Koha.Preference( 'AddressFormat' ) %]
741 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
743 [% INCLUDE 'member-alt-address-style-us.inc' %]
745 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
746 [% END # /IF ( step_6 ) %]
749 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
750 [% IF Koha.Preference( 'AddressFormat' ) %]
751 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
753 [% INCLUDE 'member-alt-contact-style-us.inc' %]
755 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
756 [% END # /IF ( step_2 ) %]
759 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
760 <fieldset class="rows" id="memberentry_library_management">
761 <legend id="library_management_lgd">Library management</legend>
763 [% UNLESS nocardnumber %]
765 [% IF mandatorycardnumber %]
766 <label for="cardnumber" class="required">
768 <label for="cardnumber" class="validated">
773 <!-- NOTE: div.hint closing tag isn't on the same line -->
774 [% IF minlength_cardnumber == maxlength_cardnumber %]
775 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
776 [% IF mandatorycardnumber %]
777 <span class="required">Required</span>
779 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
780 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
781 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
782 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
783 [% IF mandatorycardnumber %]
784 <span class="required">Required</span>
786 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
787 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
788 [% ELSIF maxlength_cardnumber %]
789 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
790 [% IF mandatorycardnumber %]
791 <span class="required">Required</span>
793 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
794 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
796 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
797 [% IF mandatorycardnumber %]
798 <span class="required">Required</span>
800 <div class="hint">There is no minimum or maximum character length.
802 [% IF autoMemberNum %]
803 [% IF mandatorycardnumber %]
804 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
806 <br/>Leave blank for auto calc during registration
809 </div><!--/div.hint -->
811 [% END # /UNLESS nocardnumber %]
813 [% UNLESS nobranchcode %]
815 <label for="libraries" class="required">Library:</label>
816 <select name="branchcode" size="1" id="libraries">
817 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
819 <span class="required">Required</span>
824 <label for="categorycode_entry" class="required">Category: </label>
825 <select id="categorycode_entry" name="categorycode">
826 [% FOREACH typeloo IN typeloop %]
827 [% FOREACH categoryloo IN typeloo.categoryloop %]
828 [% IF ( loop.first ) %]
829 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
830 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
831 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
832 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
833 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
834 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
836 [% IF ( categoryloo.categorycodeselected ) %]
837 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
839 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
841 [% IF ( loop.last ) %]
844 [% END # /FOREACH categoryloo %]
845 [% END # /FOREACH typeloo %]
847 <span class="required">Required</span>
852 [% IF ( mandatorysort1 ) %]
853 <label for="sort1" class="required">
859 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
860 [% IF ( mandatorysort1 ) %]
861 <span class="required">Required</span>
864 [% END # /UNLESS nosort1 %]
868 [% IF ( mandatorysort2 ) %]
869 <label for="sort2" class="required">
875 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
876 [% IF ( mandatorysort2 ) %]
877 <span class="required">Required</span>
880 [% END # /UNLESS nosort2 %]
882 [% UNLESS noautorenew_checkouts %]
884 <label for="yes-autorenew_checkouts">
885 Allow auto-renewal of items:
887 [% IF ( autorenew_checkouts || opadd ) %]
888 <label for="yes-autorenew_checkouts">
890 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
892 <label for="no-autorenew_checkouts">
894 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
897 <label for="yes-autorenew_checkouts">
899 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
901 <label for="no-autorenew_checkouts">
903 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
909 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
911 <label for="checkprevcheckout">Check for previous checkouts: </label>
912 <select name="checkprevcheckout" id="checkprevcheckout">
913 [% IF ( checkprevcheckout == 'yes' ) %]
914 <option value="yes" selected="selected">Yes if settings allow it</option>
915 <option value="no">No if settings allow it</option>
916 <option value="inherit">Inherit from settings</option>
917 [% ELSIF ( checkprevcheckout == 'no' ) %]
918 <option value="yes">Yes if settings allow it</option>
919 <option value="no" selected="selected">No if settings allow it</option>
920 <option value="inherit">Inherit from settings</option>
922 <option value="yes">Yes if settings allow it</option>
923 <option value="no">No if settings allow it</option>
924 <option value="inherit" selected="selected">Inherit from settings</option>
928 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
930 [% IF Koha.Preference('TranslateNotices') %]
932 <label for="lang">Preferred language for notices: </label>
933 <select id="lang" name="lang">
934 <option value="default">Default</option>
935 [% FOR language IN languages %]
936 [% FOR sublanguage IN language.sublanguages_loop %]
937 [% IF language.plural %]
938 [% IF sublanguage.rfc4646_subtag == lang %]
939 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
941 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
944 [% IF sublanguage.rfc4646_subtag == lang %]
945 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
947 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
949 [% END # /IF language.plural %]
950 [% END # /FOR sublanguage %]
951 [% END #/FOR language %]
952 </select> <!-- /#lang -->
954 [% END #/IF Koha.Preference('TranslateNotices') %]
956 </fieldset> <!-- /#memberentry_library_management -->
958 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
959 <fieldset class="rows" id="memberentry_subscription">
960 <legend id="library_setup_lgd">Library set-up</legend><ol>
961 [% UNLESS nodateenrolled %]
963 [% IF ( mandatorydateenrolled ) %]
964 <label for="from" class="required">
970 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
971 [% IF ( mandatorydateenrolled ) %]
972 <span class="required">Required</span>
974 [% IF ( ERROR_dateenrolled ) %]
975 <span class="required">(Error)</span>
977 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
979 [% END # /UNLESS nodateenrolled %]
981 [% UNLESS nodateexpiry %]
984 <li style="display:none">
986 [% IF ( mandatorydateexpiry ) %]
987 <label for="to" class="required">
991 Expiry date (leave blank for auto calc):
993 [% UNLESS ( opadd ) %]
994 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
996 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
998 [% IF ( mandatorydateexpiry ) %]
999 <span class="required">Required</span>
1001 [% IF ( ERROR_dateexpiry ) %]
1002 <span class="required">(Error)</span>
1004 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1007 [% UNLESS noopacnote %]
1009 [% IF ( mandatoryopacnote ) %]
1010 <label for="opacnote" class="required">
1012 <label for="opacnote">
1016 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1017 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1018 [% IF ( mandatoryopacnote ) %]
1019 <span class="required">Required</span>
1022 [% END # /UNLESS noopacnote %]
1024 [% UNLESS noborrowernotes %]
1026 [% IF ( mandatoryborrowernotes ) %]
1027 <label for="borrowernotes" class="required">
1029 <label for="borrowernotes">
1033 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1034 <div class="hint">This message displays when checking out to this patron</div>
1035 [% IF ( mandatoryborrowernotes ) %]
1036 <span class="required">Required</span>
1039 [% END # /UNLESS noborrowernotes %]
1041 </fieldset> <!-- /#memberentry_subscription -->
1042 [% END # hide fieldset %]
1044 [% UNLESS nouserid && nopassword %]
1045 <fieldset class="rows" id="memberentry_userid">
1046 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1048 [% UNLESS nouserid %]
1050 [% IF ( mandatoryuserid ) %]
1051 <label for="userid" class="required">
1053 <label for="userid">
1058 [% IF ( NoUpdateLogin ) %]
1059 [% IF ( opduplicate ) %]
1060 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1062 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1065 [% IF ( opduplicate ) %]
1066 <input type="text" id="userid" name="userid" size="20" value="" />
1068 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1070 [% END # /IF ( NoUpdateLogin ) %]
1072 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1073 <input type="text" disabled="disabled" style="display:none" />
1075 [% IF ( mandatoryuserid ) %]
1076 <span class="required">Required</span>
1079 [% END # /UNLESS nouserid %]
1081 [% UNLESS nopassword %]
1083 [% IF ( mandatorypassword ) %]
1084 <label for="password" class="required">
1086 <label for="password">
1091 [% IF ( NoUpdateLogin ) %]
1092 [% IF ( opduplicate ) %]
1093 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1095 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1098 [% IF ( opduplicate ) %]
1099 <input type="password" id="password" name="password" size="20" />
1101 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1103 [% END # /IF ( NoUpdateLogin ) %]
1104 [% ELSE # IF ( opadd ) %]
1106 [% IF ( password ) %]
1107 [% IF ( NoUpdateLogin ) %]
1108 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1110 [% IF ( opduplicate ) %]
1111 <input type="password" id="password" name="password" size="20" />
1113 <input type="password" id="password" name="password" size="20" value="****" />
1117 [% IF ( NoUpdateLogin ) %]
1118 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1120 <input type="password" id="password" name="password" size="20" value="" />
1122 [% END # /IF ( password ) %]
1123 [% END # /IF ( opadd ) %]
1124 [% IF ( mandatorypassword ) %]
1125 <span class="required">Required</span>
1127 [% IF ( ERROR_password_too_short ) %]
1128 <span class="required">Password is too short</span>
1130 [% IF ( ERROR_password_too_weak ) %]
1131 <span class="required">Password is too weak</span>
1133 [% IF ( ERROR_password_has_whitespaces ) %]
1134 <span class="required">Password has leading or trailing whitespaces</span>
1136 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1140 [% IF ( mandatorypassword ) %]
1141 <label for="password2" class="required">
1143 <label for="password2">
1148 [% IF ( NoUpdateLogin ) %]
1149 [% IF ( opduplicate ) %]
1150 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1152 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1155 [% IF ( opduplicate ) %]
1156 <input type="password" id="password2" name="password2" size="20" />
1158 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1161 [% ELSE # IF ( opadd ) %]
1162 [% IF ( password ) %]
1163 [% IF ( NoUpdateLogin ) %]
1164 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1166 [% IF ( opduplicate ) %]
1167 <input type="password" id="password2" name="password2" size="20" />
1169 <input type="password" id="password2" name="password2" size="20" value="****" />
1173 [% IF ( NoUpdateLogin ) %]
1174 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1176 <input type="password" id="password2" name="password2" size="20" value="" />
1179 [% END # /IF ( opadd ) %]
1181 [% IF ( mandatorypassword ) %]
1182 <span class="required">Required</span>
1184 [% IF ( ERROR_password_mismatch ) %]
1185 <span class="required">Passwords do not match</span>
1188 [% END # /UNLESS nopassword %]
1190 </fieldset> <!-- /#memberentry_userid -->
1191 [% END # UNLESS nouserid && nopassword %]
1193 <!--this zones are not necessary in modif mode -->
1194 [% UNLESS ( opadd || opduplicate ) %]
1195 <fieldset class="rows" id="memberentry_account_flags">
1196 <legend id="account_flags_lgd">Patron account flags</legend>
1198 [% FOREACH flagloo IN flagloop %]
1200 <label class="radio" for="yes[% flagloo.name | html %]">
1201 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1202 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1204 [% IF CAN_user_circulate_manage_restrictions %]
1205 <label for="yes[% flagloo.name | html %]">
1206 [% IF ( flagloo.yes ) %]
1207 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1209 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1213 <label for="no[% flagloo.name | html %]">
1214 [% IF ( flagloo.no ) %]
1215 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1217 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1222 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1223 [% END # /IF CAN_user_circulate_manage_restrictions %]
1225 [% END # /FOREACH flagloo %]
1227 </fieldset> <!-- /#memberentry_account_flags -->
1229 <fieldset class="rows" id="memberentry_restrictions">
1230 <legend id="restrictions_lgd">Patron restrictions</legend>
1231 [% IF ( debarments ) %]
1238 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1239 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1245 [% FOREACH d IN debarments %]
1247 <td>[% d.type | html %]</td>
1249 [% IF d.comment.search('OVERDUES_PROCESS') %]
1250 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1252 [% d.comment | $raw %]
1256 [% IF d.expiration %]
1257 [% d.expiration | $KohaDates %]
1262 <td>[% d.created | $KohaDates %]</td>
1263 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1265 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1269 [% END # /FOREACH d %]
1273 <p>Patron is currently unrestricted.</p>
1274 [% END # /IF ( debarments ) %]
1276 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1277 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1278 <fieldset id="manual_restriction_form">
1279 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1280 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1283 <label for="debarred_comment">Comment: </label>
1284 <input type="text" id="debarred_comment" name="debarred_comment" />
1287 <label for="debarred_expiration">Expiration: </label>
1288 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1289 <a href="#" id="clear_debarred_expiration">Clear date</a>
1293 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1295 </fieldset> <!-- /#manual_restriction_form -->
1296 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1297 </fieldset> <!-- /#memberentry_restrictions -->
1298 [% END # /UNLESS ( opadd || opduplicate ) %]
1299 [% END # /IF ( step_3 ) %]
1302 [% IF Koha.Preference('HouseboundModule') %]
1303 <fieldset class="rows" id="memberentry_housebound_roles">
1304 <legend id="housebound_roles">Housebound roles</legend>
1307 <label class="radio" for="housebound_chooser">
1310 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1311 <label for="yes_housebound_chooser">Yes </label>
1312 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1313 <label for="no_housebound_chooser">No </label>
1314 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1316 <label for="yes_housebound_chooser">Yes </label>
1317 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1318 <label for="no_housebound_chooser">No </label>
1319 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1323 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1324 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1325 <label for="yes_housebound_deliverer">Yes </label>
1326 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1327 <label for="no_housebound_deliverer">No </label>
1328 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1330 <label for="yes_housebound_deliverer">Yes </label>
1331 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1332 <label for="no_housebound_deliverer">No </label>
1333 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1336 </ol> <!-- /ol.radio -->
1337 </fieldset> <!-- /#memberentry_housebound_roles -->
1338 [% END # hide fieldset %]
1339 [% END # IF step_7 %]
1342 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1343 [% UNLESS ( no_patron_attribute_types ) %]
1344 <fieldset class="rows" id="memberentry_patron_attributes">
1345 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1346 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1347 [% FOREACH pa_loo IN patron_attributes %]
1348 <ol class="attributes_table">
1349 [% IF pa_loo.class %]
1350 <fieldset id="aai_[% pa_loo.class | html %]">
1351 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1353 [% FOREACH patron_attribute IN pa_loo.items %]
1354 <li data-category_code="[% patron_attribute.category_code | html %]">
1355 <label for="[% patron_attribute.form_id | html %]">
1356 [% patron_attribute.description | html %]:
1358 [% IF ( patron_attribute.use_dropdown ) %]
1359 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1360 <option value=""></option>
1361 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1362 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1363 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1364 [% auth_val_loo.lib | html %]
1367 <option value="[% auth_val_loo.authorised_value | html %]" >
1368 [% auth_val_loo.lib | html %]
1374 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1375 [% END # /IF ( patron_attribute.use_dropdown ) %]
1376 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1377 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1378 [% IF ( patron_attribute.repeatable ) %]
1379 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1382 [% END # /FOREACH patron_attribute %]
1383 [% IF pa_loo.class %]</fieldset>[% END %]
1385 [% END # /FOREACH pa_loo %]
1386 </fieldset> <!-- /#memberentry_patron_attributes -->
1387 [% END # UNLESS ( no_patron_attribute_types ) %]
1388 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1389 [% END # IF ( step_4 ) %]
1392 [% IF ( EnhancedMessagingPreferences ) %]
1393 <fieldset class="rows" id="memberentry_messaging_prefs">
1394 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1395 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1396 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1398 <input type="hidden" name="setting_messaging_prefs" value="1" />
1399 [% INCLUDE 'messaging-preference-form.inc' %]
1400 [% IF ( SMSSendDriver ) %]
1402 <label for="SMSnumber">SMS number:</label>
1403 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1404 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1406 [% UNLESS nosms_provider_id %]
1408 <label for="sms_provider_id">SMS provider:</label>
1409 <select id="sms_provider_id" name="sms_provider_id">
1410 <option value="">Unknown</option>
1411 [% FOREACH s IN sms_providers %]
1412 [% IF s.id == sms_provider_id %]
1413 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1415 <option value="[% s.id | html %]">[% s.name | html %]</option>
1420 [% END # /UNLESS nosms_provider_id %]
1421 [% END # IF ( SMSSendDriver ) %]
1423 [% END # IF ( EnhancedMessagingPreferences ) %]
1424 [% END # /IF step_5 %]
1425 </form> <!-- /#entryform -->
1427 [% IF quickadd && opadd && !check_member %]
1428 <form id="quick_add_form" class="toggler">
1429 <fieldset class="rows quick_add"><legend>Quick add</legend>
1430 <ol id="quick_add_list">
1436 [% END # /UNLESS ( no_add ) %]
1438 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1440 [% UNLESS ( opadd ) %]
1441 <div class="col-sm-2 col-sm-pull-10">
1443 [% INCLUDE 'circ-menu.inc' %]
1445 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1447 </div> <!-- /.row -->
1449 [% MACRO jsinclude BLOCK %]
1450 [% Asset.js("lib/hc-sticky.js") | $raw %]
1451 [% INCLUDE 'calendar.inc' %]
1452 [% INCLUDE 'str/members-menu.inc' %]
1453 [% Asset.js("js/members-menu.js") | $raw %]
1455 function update_cardnumber_warning(size){
1456 var max_len = [% maxlength_cardnumber | html %];
1457 if ( size >= max_len ) {
1458 $("#cn_max").show();
1460 $("#cn_max").hide();
1464 function showHideFields(){
1465 [% UNLESS step == 1 %]
1466 [% IF fieldstohide.match('identity') %]
1467 $("#memberentry_identity").find('legend').nextAll().toggle();
1469 [% IF show_guarantor || guarantor %]
1470 [% IF fieldstohide.match('guarantor') %]
1471 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1472 $("#guarantor_template").toggle();
1475 [% IF fieldstohide.match('primary_address') %]
1476 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1478 [% IF fieldstohide.match('primary_contact') %]
1479 $("#memberentry_contact").find('legend').nextAll().toggle();
1482 [% UNLESS step == 6 %]
1483 [% IF fieldstohide.match('alt_address') %]
1484 $("#memberentry_address").find('legend').nextAll().toggle();
1487 [% UNLESS step == 2 %]
1488 [% IF fieldstohide.match('alt_contact') %]
1489 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1492 [% UNLESS step == 3 %]
1493 [% IF fieldstohide.match('lib_mgmt') %]
1494 $("#memberentry_library_management").find('legend').nextAll().toggle();
1496 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1497 [% IF fieldstohide.match('lib_setup') %]
1498 $("#memberentry_subscription").find('legend').nextAll().toggle();
1501 [% UNLESS nouserid && nopassword %]
1502 [% IF fieldstohide.match('login') %]
1503 $("#memberentry_userid").find('legend').nextAll().toggle();
1506 [% UNLESS ( opadd || opduplicate ) %]
1507 [% IF fieldstohide.match('flags') %]
1508 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1511 [% IF fieldstohide.match('debarments') %]
1512 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1515 [% UNLESS step == 7 %]
1516 [% IF Koha.Preference('HouseboundModule') %]
1517 [% IF fieldstohide.match('housebound') %]
1518 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1522 [% UNLESS step == 4 %]
1523 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1524 [% IF fieldstohide.match('additional') %]
1525 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1529 [% UNLESS step == 5 %]
1530 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1531 [% IF fieldstohide.match('messaging') %]
1532 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1533 $("#messaging_prefs_loading").toggle();
1539 $(document).ready(function() {
1541 $("#toggle_hidden_fields").change(function(){
1545 $("legend").click(function(){
1546 $(this).nextAll().toggle();
1547 $("#messaging_prefs_loading").hide();
1550 $("#saverecord").css({ 'margin-left': 0 });
1552 Sticky = $("#toolbar");
1555 stickyClass: "floating"
1558 [% IF categorycode %]
1559 update_category_code( "[% categorycode | html %]" );
1561 if ( $("#categorycode_entry").length > 0 ){
1562 var category_code = $("#categorycode_entry").find("option:selected").val();
1563 update_category_code( category_code );
1567 [% IF new_guarantors %]
1568 [% FOREACH g IN new_guarantors %]
1569 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1573 $("#cn_max").hide();
1575 $("#cardnumber").on("keydown", function(e){
1576 content = $(this).val();
1578 $("#cardnumber").on("keyup", function(e){
1579 // .val() will return the value of the input after the key has been released
1580 var l = $(this).val().length;
1581 if ( l == content.length + 1 ) { l--; }
1582 update_cardnumber_warning(l);
1584 $("#cardnumber").bind("paste", function(e){
1585 var pastedData = e.originalEvent.clipboardData.getData('text');
1586 update_cardnumber_warning(pastedData.length - 1);
1588 var toggle_quick_add = $(".toggle_quick_add");
1589 $(toggle_quick_add).click(function(e){
1590 toggle_quick_add.toggle();
1593 var toggle_from = '';
1594 if( $("#entryform:visible").length ) {
1595 toggle_to = "#quick_add_form label";
1596 toggle_from = "#entryform label";
1597 $("#memberentry_guarantor").appendTo("#quick_add_form");
1599 toggle_to="#entryform label";
1600 toggle_from = "#quick_add_form label";
1601 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1603 $(toggle_from).each(function() {
1604 var input_label = $(this).attr('for');
1605 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1606 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1609 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1612 $(".toggler").toggle();
1615 $("#save_quick_add").click(function(){
1616 $("#quick_add_form").validate();
1617 if( $("#quick_add_form").valid()){
1618 $('.toggle_quick_add').click();
1619 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1620 $('#saverecord').click();
1622 else {return false;}
1625 $("#saverecord").click(function(){
1626 if( check_form_borrowers() ){
1627 $("#entryform").submit();
1631 $('#duplicate').on('click', function() {
1632 $("input[name='op']").val('modify');
1633 $("input[name='borrowernumber']").val('[% check_member | html %]');
1634 $("input[name='check_member']").val('');
1635 $('#entryform').submit();
1638 $('#not-duplicate').on('click', function() {
1639 $("input[name='nodouble']").val('1');
1640 $('#entryform').submit();
1643 $(".popup_patronview").on("click", function(e){
1645 var url = $(this).attr("href");
1646 openWindow( url, "patronview" );
1649 $("#dateofbirth").on("change", function(){
1653 $("#debarred_comment, #debarred_expiration").on("change", function(){
1654 $("#add_debarment").val(1);
1657 $("#clear_debarred_expiration").on("click", function(e){
1659 $('#debarred_expiration').val("");
1662 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1664 clear_entry( this );
1667 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1669 clone_entry( this );
1672 $("#categorycode_entry").on("change", function(){
1673 update_category_code(this);
1677 var MSG_SEPARATOR = _("Separator must be / in field %s");
1678 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1679 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1680 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1681 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1682 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1683 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1684 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1685 var MSG_MONTH = _("%s month")
1686 var MSG_MONTHS = _("%s months")
1687 var MSG_YEAR = _("%s year")
1688 var MSG_YEARS = _("%s years")
1689 var LABEL_CHANGE = _("Change");
1690 var LABEL_SET_TO_PATRON = _("Set to patron");
1691 var LABEL_AGE = _("Age");
1692 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1694 [% IF quickadd && opadd && !check_member %]
1695 $(document).ready(function () {
1697 $("#entryform,#saverecord").hide();
1698 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1699 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1700 $("#entryform label").each(function () {
1701 var input_label = $(this).attr('for');
1702 if ( input_label == 'sex-female' ) {
1705 else if ( input_label == 'btitle' ) {
1706 input_label='title';
1708 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1709 $(this).parent().clone().appendTo("#quick_add_list");
1710 [% UNLESS mandatorypassword %]
1711 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1715 if ( $("#memberentry_guarantor").length ) {
1716 $("#memberentry_guarantor").appendTo("#quick_add_form");
1718 $("#quick_add_form").show();
1721 $("#guarantor_template").hide();
1724 [% Asset.js("js/members.js") | $raw %]
1725 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1726 [% PROCESS 'password_check.inc' %]
1727 [% PROCESS 'add_password_check' new_password => 'password' %]
1730 [% INCLUDE 'intranet-bottom.inc' %]