7 [% PROCESS 'member-main-address-style.inc' %]
8 [% PROCESS 'member-alt-address-style.inc' %]
9 [% PROCESS 'member-alt-contact-style.inc' %]
10 [% PROCESS 'restriction-types.inc' %]
11 [% PROCESS 'i18n.inc' %]
12 [% SET footerjs = 1 %]
13 [% INCLUDE 'doc-head-open.inc' %]
14 <title>[% FILTER collapse %]
15 [% UNLESS blocking_error %]
17 [% t("Add patron") | html %]
19 [% t("Modify patron") | html %]
21 [% INCLUDE 'patron-title.inc' no_html = 1 %]
22 [% IF patron_category %]([% patron_category.description | html %])[% END %]
24 [% t("Patrons") | html %] ›
25 [% t("Koha") | html %]
32 [% INCLUDE 'doc-head-close.inc' %]
35 <body id="pat_memberentrygen" class="pat">
36 [% WRAPPER 'header.inc' %]
37 [% INCLUDE 'patron-search-header.inc' %]
40 [% WRAPPER 'sub-header.inc' %]
41 [% WRAPPER breadcrumbs %]
42 [% WRAPPER breadcrumb_item %]
43 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
45 [% UNLESS blocking_error %]
47 [% IF (borrower_data.firstname || borrower_data.surname ) %]
48 [% WRAPPER breadcrumb_item %]
49 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
50 [% INCLUDE 'patron-title.inc' %]
56 [% WRAPPER breadcrumb_item bc_active= 1 %]
58 <span>Add patron</span>
60 <span>Modify patron</span>
62 [% IF patron_category %]
63 ([% patron_category.description | html %])
66 [% END #/ WRAPPER breadcrumbs %]
67 [% END #/ WRAPPER sub-header.inc %]
69 <div class="main container-fluid">
71 [% IF borrower_data.messages %]
72 [% FOR message IN borrower_data.messages %]
73 [% SWITCH message.error %]
74 [% CASE 'error_on_insert_patron' %]
75 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
76 [% CASE 'error_on_update_patron' %]
77 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
78 [% CASE %]<div class="dialog alert">Unhandled error: [% message.error | html %]</div>
83 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
85 <div class="col-sm-10 col-sm-push-2">
87 <main class="clearfix">
88 [% INCLUDE 'blocking_errors.inc' %]
91 [% IF ( error_alert == "no_email" ) %]
92 <div class="dialog alert">This member has no email</div>
94 <div class="dialog alert">[% error_alert | html %]</div>
98 <div class="dialog message">Email has been sent.</div>
101 [% INCLUDE 'noadd-warnings.inc' %]
103 [% UNLESS ( no_add ) %]
106 <span>Add patron</span>
107 [% ELSIF ( opduplicate ) %]
108 <span>Duplicate patron</span>
110 <span>Modify patron</span>
112 [% INCLUDE 'patron-title.inc' %]
113 [% IF patron_category %]([% patron_category.description | html %])[% END %]
116 [% IF quickadd && opadd && !check_member %]
117 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
118 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
121 [% IF ( check_member ) %]
122 <div class="dialog alert">
123 <h3>Duplicate patron record?</h3>
124 <p><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&borrowernumber=[% check_member | uri %]"><i class="fa-solid fa-window-restore"></i> View existing record</a></p>
125 <button id="duplicate" type="submit" class="new"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> It is a duplicate. Edit existing record </button>
126 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
131 <div class="dialog alert">
132 <p>The following fields are wrong. Please fix them.</p>
134 [% IF ( ERROR_login_exist ) %]
135 <li id="ERROR_login_exist">Username already exists or could not create unique new one.</li>
137 [% IF ERROR_cardnumber_already_exists %]
138 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
140 [% IF ERROR_cardnumber_length %]
141 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
143 [% IF ( ERROR_age_limitations ) %]
144 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
145 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
147 [% IF ( ERROR_branch ) %]
148 <li id="ERROR_branch">Library is invalid.</li>
150 [% IF ( ERROR_dateofbirth ) %]
151 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
153 [% IF ( ERROR_dateenrolled ) %]
154 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
156 [% IF ( ERROR_dateexpiry ) %]
157 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
159 [% IF ( ERROR_password_too_short ) %]
160 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
162 [% IF ( ERROR_password_too_weak ) %]
163 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
165 [% IF ( ERROR_password_has_whitespaces ) %]
166 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
168 [% IF ( ERROR_password_mismatch ) %]
169 <li id="ERROR_password_mismatch">Passwords do not match.</li>
171 [% IF ( ERROR_password_expiration_date ) %]
172 <li id="ERROR_dateexpiry">Password expiration date is invalid.</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>
186 [% IF ( ERROR_child_no_guarantor ) %]
187 <li id="ERROR_child_no_guarantor">A child patron needs a guarantor.</li>
189 [% IF ( ERROR_guarantor_is_guarantee ) %]
190 <li id="ERROR_guarantor_is_guarantee">A guarantor cannot be a guarantee.</li>
192 [% IF ( ERROR_cannot_delete_guarantor ) %]
193 <li id="ERROR_cannot_delete_guarantor">Cannot delete guarantor(s). A child patron needs a guarantor.</li>
199 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
200 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
202 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
203 [% FOREACH field IN fieldstohide.split(',') %]
205 [% CASE 'identity' %] <span>Patron identity</span> |
206 [% CASE 'guarantor' %] <span>Guarantor information</span> |
207 [% CASE 'primary_address' %] <span>Main address</span> |
208 [% CASE 'primary_contact' %] <span>Contact information</span> |
209 [% CASE 'alt_address' %] <span>Alternate address</span> |
210 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
211 [% CASE 'lib_mgmt' %] <span>Library management</span> |
212 [% CASE 'lib_setup' %] <span>Library setup</span> |
213 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
214 [% CASE 'flags' %] <span>Patron account flags</span> |
215 [% CASE 'debarments' %] <span>Patron restrictions</span> |
216 [% CASE 'housebound' %] <span>Housebound roles</span> |
217 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
218 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
224 [% UNLESS ( check_member ) %]
225 <div id="toolbar" class="btn-toolbar">
226 [% IF quickadd && opadd %]
227 <button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
229 <button class="btn btn-primary toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
231 <a class="btn btn-link" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
233 <a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
235 <i class="fa fa-times"></i> Cancel
240 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
241 [% UNLESS ( check_member ) %]
242 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
244 <!-- field always hidden in different form (1,2,3) -->
245 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
246 <input type="hidden" name="updtype" value="[% updtype | html %]" />
247 <input type="hidden" name="destination" value="[% destination | html %]" />
248 <input type="hidden" name="check_member" value="[% check_member | html %]" />
249 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
250 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
251 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
253 <input type="hidden" name="step" value="[% step | html %]" />
256 <input type="hidden" name="op" value="insert" />
257 [% ELSIF ( opduplicate ) %]
258 <input type="hidden" name="op" value="insert" />
260 <input type="hidden" name="op" value="save" />
261 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
262 [%# Only put the card number if we arent showing it in the form later %]
263 [% IF borrower_data.cardnumber %]
264 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
270 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
271 <fieldset class="rows" id="memberentry_identity">
272 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span></legend>
274 [% UNLESS ( patron_category.category_type == 'I' ) %]
276 [% IF Koha.Preference('BorrowersTitles') %]
278 [% IF ( mandatorytitle ) %]
279 <label for="btitle" class="required">
284 <select id="btitle" name="title">
285 <option value=""></option>
286 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
288 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
290 <option value="[% t | html %]">[% t | html %]</option>
294 [% IF ( mandatorytitle ) %]
295 <span class="required">Required</span>
298 [% END # /IF Koha.Preference('BorrowersTitles') %]
299 [% END # /UNLESS notitle %]
300 [% END # /UNLESS ( I ) %]
302 [% UNLESS nosurname %]
304 [% IF ( patron_category.category_type == 'I' ) %]
305 <label for="surname" class="required">
309 [% IF ( mandatorysurname ) %]
310 <label for="surname" class="required">
312 <label for="surname">
317 [% IF ( uppercasesurnames ) %]
318 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
320 <input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
322 [% IF ( mandatorysurname ) %]
323 <span class="required">Required</span>
326 [% END # /UNLESS nosurname %]
328 [% UNLESS ( patron_category.category_type == 'I' ) %]
329 [% UNLESS nofirstname %]
331 [% IF ( mandatoryfirstname ) %]
332 <label for="firstname" class="required">
334 <label for="firstname">
338 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
339 [% IF ( mandatoryfirstname ) %]
340 <span class="required">Required</span>
343 [% END #/UNLESS nofirstname %]
344 [% UNLESS nomiddle_name %]
346 [% IF ( mandatorymiddle_name ) %]
347 <label for="middle_name" class="required">
349 <label for="middle_name">
353 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
354 [% IF ( mandatorymiddle_name ) %]
355 <span class="required">Required</span>
358 [% END #/UNLESS nomiddle_name %]
359 [% UNLESS nodateofbirth %]
361 [% IF ( mandatorydateofbirth ) %]
362 <label for="dateofbirth" class="required">
364 <label for="dateofbirth">
368 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
369 [% IF ( mandatorydateofbirth ) %]
370 <span class="required">Required</span>
372 [% IF ( ERROR_dateofbirth ) %]
373 <span class="required">(Error)</span>
375 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
377 [% END # /UNLESS nodateofbirth %]
378 [% UNLESS noinitials %]
380 [% IF ( mandatoryinitials ) %]
381 <label for="initials" class="required">
383 <label for="initials">
387 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
388 [% IF ( mandatoryinitials ) %]
389 <span class="required">Required</span>
392 [% END # /UNLESS noinitials %]
393 [% UNLESS nopronouns %]
395 [% IF ( mandatorypronouns ) %]
396 <label for="pronouns" class="required">
398 <label for="pronouns">
402 <input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS opduplicate %]" />
403 [% IF ( mandatorypronouns ) %]
404 <span class="required">Required</span>
407 [% END # /UNLESS nopronouns %]
408 [% END #/UNLESS ( I ) %]
409 [% UNLESS noothernames %]
411 [% IF ( mandatoryothernames ) %]
412 <label for="othernames" class="required">
414 <label for="othernames">
418 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
419 [% IF ( mandatoryothernames ) %]
420 <span class="required">Required</span>
422 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
424 [% END #/UNLESS noothernames %]
426 [% UNLESS ( patron_category.category_type == 'I' ) %]
429 [% UNLESS ( opduplicate ) %]
431 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
433 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
436 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
438 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
441 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
443 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
446 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
448 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
451 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
452 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
453 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
454 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
455 [% END # /UNLESS ( opduplicate )%]
457 [% END # /UNLESS nosex %]
458 [% END # /UNLESS ( I ) %]
460 </fieldset> <!-- /#memberentry_identity -->
461 [% END # hide fieldset %]
463 [% IF show_guarantor || guarantor %]
464 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
465 <div id="memberentry_guarantor_anchor">
466 <fieldset id="memberentry_guarantor" class="rows">
467 <legend>Patron guarantor</legend>
469 <div id="guarantor_relationships">
470 [% FOREACH r IN relationships %]
473 [% IF patron_category.category_type == 'I' %]
474 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
475 <span class="label">Organization:</span>
476 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
479 <span class="label">Relationship:</span>
480 <span>[% r.relationship | html %]</span>
483 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
484 <span class="label">Guarantor:</span>
485 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
488 <span class="label">Relationship:</span>
489 <span>[% r.relationship | html %]</span>
493 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
494 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
499 [% END # END relationships foreach %]
500 [% IF guarantor && (!relationships) %]
501 <fieldset class="guarantor">
503 <li class="guarantor-details" data-borrowernumber="0">
504 <span class="label">Guarantor:</span>
505 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
506 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
509 [% IF possible_relationships %]
511 [% UNLESS empty_relationship_allowed %]
512 <label for="guarantor_relationship" class="required">Relationship: </label>
513 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
515 <label for="guarantor_relationship">Relationship: </label>
516 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
518 <option value="" selected>Empty option</option>
519 [% FOREACH pr IN possible_relationships.split('\|') %]
521 <option value="[% pr | html %]">[% pr | html %]</option>
525 [% UNLESS empty_relationship_allowed %]
526 <span class="required">Required</span>
530 <input type="hidden" name="new_guarantor_relationship" value="" />
534 <label for="guarantor_cancel"> </label>
535 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can" aria-hidden="true"></i> Remove</a></span>
540 </div> <!-- #/guarantor_relationships -->
542 <fieldset class="guarantor" id="guarantor_template">
544 <li class="guarantor-details" data-borrowernumber="0">
545 <span class="label">Guarantor:</span>
546 <a class="new_guarantor_link" href="#" target="blank">
547 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
548 (<span class="new_guarantor_id_text"></span>)
550 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
553 [% IF possible_relationships %]
555 [% UNLESS empty_relationship_allowed %]
556 <label for="guarantor_relationship" class="required">Relationship: </label>
557 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
559 <label for="guarantor_relationship">Relationship: </label>
560 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
562 <option value="" selected></option>
563 [% FOREACH pr IN possible_relationships.split('\|') %]
565 <option value="[% pr | html %]">[% pr | html %]</option>
569 [% UNLESS empty_relationship_allowed %]
570 <span class="required">Required</span>
574 <input type="hidden" name="new_guarantor_relationship" value="" />
578 <label for="guarantor_cancel"> </label>
579 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can"></i> Remove</a></span>
585 <input type="hidden" id="guarantor_id" value="" />
586 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
587 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
590 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
593 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
595 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors:</label>
596 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
597 [% IF borrower_data.privacy_guarantor_checkouts %]
598 <option value="0">No</option>
599 <option value="1" selected>Yes</option>
601 <option value="0" selected>No</option>
602 <option value="1">Yes</option>
605 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
608 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
610 <label for="privacy_guarantor_fines">Show charges to guarantors:</label>
611 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
612 [% IF borrower_data.privacy_guarantor_fines %]
613 <option value="0">No</option>
614 <option value="1" selected>Yes</option>
616 <option value="0" selected>No</option>
617 <option value="1">Yes</option>
620 <div class="hint">Allow guarantors of this patron to view this patron's charges from the OPAC</div>
624 </fieldset> <!-- /#memberentry_guarantor -->
625 </div> <!-- #/memberentry_guarantor_anchor -->
627 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
628 <fieldset class="rows" id="non_patron_guarantor">
629 <legend>Non-patron guarantor</legend>
631 [% UNLESS nocontactname %]
633 [% IF ( mandatorycontactname ) %]
634 <label for="contactname" class="required">
636 <label for="contactname">
640 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
641 [% IF ( mandatorycontactname ) %]
642 <span class="required">Required</span>
644 <div class="hint">Non-patron guarantor surname</div>
646 [% END # /UNLESS nocontactname %]
648 [% UNLESS nocontactfirstname %]
650 [% IF ( mandatorycontactfirstname ) %]
651 <label for="contactfirstname" class="required">
653 <label for="contactfirstname">
655 Guarantor first name:
657 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
658 [% IF ( mandatorycontactfirstname ) %]
659 <span class="required">Required</span>
661 <div class="hint">Non-patron guarantor first name</div>
663 [% END # /UNLESS noaltcontactfirstname %]
665 [% UNLESS norelationship %]
666 [% IF possible_relationships %]
668 <label for="relationship">Relationship: </label>
669 <select class="relationship" name="relationship">
670 <option value=""></option>
671 [% FOREACH pr IN possible_relationships.split('\|') %]
672 [% IF pr == borrower_data.relationship %]
673 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
675 <option value="[% pr | html %]">[% pr | html %]</option>
680 [% END #/IF possible_relationships %]
681 [% END # /UNLESS norelationship %]
683 </fieldset> <!-- /#non_patron_guarantor -->
684 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
685 [% END # /IF show_guarantor || guarantor %]
687 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
688 [% PROCESS 'main-address-style' %]
689 [% END # /UNLESS nostreet && nocity etc group%]
691 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
692 <fieldset class="rows" id="memberentry_contact">
693 <legend id="contact_lgd">Contact information</legend>
697 [% IF ( mandatoryphone ) %]
698 <label for="phone" class="required">
704 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
705 [% IF ( mandatoryphone ) %]
706 <span class="required">Required</span>
708 <div class="hint">Shows on transit slips</div>
710 [% END # /UNLESS nophone %]
712 [% UNLESS nophonepro %]
714 [% IF ( mandatoryphonepro ) %]
715 <label for="phonepro" class="required">
717 <label for="phonepro">
721 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
722 [% IF ( mandatoryphonepro ) %]
723 <span class="required">Required</span>
726 [% END # /UNLESS nophonepro %]
728 [% UNLESS nomobile %]
730 [% IF ( mandatorymobile ) %]
731 <label for="mobile" class="required">
737 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
738 [% IF ( mandatorymobile ) %]
739 <span class="required">Required</span>
742 [% END # /UNLESS nomobile %]
746 [% IF ( mandatoryemail ) %]
747 <label for="email" class="required">
753 [% IF ( NoUpdateEmail ) %]
754 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
756 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
758 [% IF ( mandatoryemail ) %]
759 <span class="required">Required</span>
761 <div class="hint">Shows on transit slips</div>
763 [% END #/UNLESS noemail %]
765 [% UNLESS noemailpro %]
767 [% IF ( mandatoryemailpro ) %]
768 <label for="emailpro" class="required">
770 <label for="emailpro">
774 [% IF ( NoUpdateEmail ) %]
775 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
777 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
779 [% IF ( mandatoryemailpro ) %]
780 <span class="required">Required</span>
783 [% END #/UNLESS noemailpro %]
787 [% IF ( mandatoryfax ) %]
788 <label for="fax" class="required">
794 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
795 [% IF ( mandatoryfax ) %]
796 <span class="required">Required</span>
799 [% END #/UNLESS nofax %]
801 [% UNLESS noprimary_contact_method %]
803 [% IF mandatoryprimary_contact_method %]
804 <label for="primary_contact_method" class="required">
806 <label for="primary_contact_method">
808 Main contact method: </label>
810 <select id="primary_contact_method" name="primary_contact_method">
811 <option value=""></option>
813 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
814 <option value="phone" selected="selected">Primary phone</option>
816 <option value="phone">Primary phone</option>
819 [% UNLESS nophonepro %]
820 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
821 <option value="phonepro" selected="selected">Secondary phone</option>
823 <option value="phonepro">Secondary phone</option>
826 [% UNLESS nomobile %]
827 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
828 <option value="mobile" selected="selected">Other phone</option>
830 <option value="mobile">Other phone</option>
834 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
835 <option value="email" selected="selected">Primary email</option>
837 <option value="email">Primary email</option>
840 [% UNLESS noemailpro %]
841 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
842 <option value="emailpro" selected="selected">Secondary email</option>
844 <option value="emailpro">Secondary email</option>
848 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
849 <option value="fax" selected="selected">Fax</option>
851 <option value="fax">Fax</option>
855 [% IF mandatoryprimary_contact_method %]
856 <span class="required">Required</span>
861 </fieldset> <!-- /#memberentry_contact -->
862 [% END # hide fieldset %]
864 <!-- ************************ STEP_1 *********************** -->
865 [% END # /IF ( step_1 ) %]
868 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
869 [% PROCESS 'alt-address-style' %]
870 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
871 [% END # /IF ( step_6 ) %]
874 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
875 [% PROCESS 'alt-contact-style' %]
876 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
877 [% END # /IF ( step_2 ) %]
880 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
881 <fieldset class="rows" id="memberentry_library_management">
882 <legend id="library_management_lgd">Library management</legend>
884 [% UNLESS nocardnumber %]
886 [% IF mandatorycardnumber %]
887 <label for="cardnumber" class="required">
889 <label for="cardnumber" class="validated">
894 <!-- NOTE: div.hint closing tag isn't on the same line -->
895 [% IF minlength_cardnumber == maxlength_cardnumber %]
896 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
897 [% IF mandatorycardnumber %]
898 <span class="required">Required</span>
900 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
901 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
902 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
903 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
904 [% IF mandatorycardnumber %]
905 <span class="required">Required</span>
907 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
908 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
909 [% ELSIF maxlength_cardnumber %]
910 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
911 [% IF mandatorycardnumber %]
912 <span class="required">Required</span>
914 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
915 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
917 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
918 [% IF mandatorycardnumber %]
919 <span class="required">Required</span>
921 <div class="hint">There is no minimum or maximum character length.
923 [% IF autoMemberNum %]
924 [% IF mandatorycardnumber %]
925 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
927 <br/>Leave blank for auto calc during registration
930 </div><!--/div.hint -->
932 [% END # /UNLESS nocardnumber %]
934 [% UNLESS nobranchcode %]
936 <label for="libraries" class="required">Library:</label>
937 <select name="branchcode" id="libraries">
938 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
940 <span class="required">Required</span>
945 <label for="categorycode_entry" class="required">Category: </label>
946 <select id="categorycode_entry" name="categorycode">
947 [% FOREACH category_type IN patron_categories.keys %]
948 [% SWITCH category_type %]
950 <optgroup label="Child">
952 <optgroup label="Adult">
954 <optgroup label="Staff">
956 <optgroup label="Organization">
958 <optgroup label="Professional">
960 <optgroup label="Statistical">
962 <optgroup label="Unknown">
964 [% FOREACH category IN patron_categories.$category_type %]
965 [% IF category.categorycode == patron_category.categorycode %]
966 <option value="[% category.categorycode | html %]" selected="selected" data-pwd-length="[% category.effective_min_password_length | html %]" data-pwd-strong="[% category.effective_require_strong_password | html %]" data-typename="[% category_type | html %]">[% category.description | html %]</option>
968 <option value="[% category.categorycode | html %]" data-pwd-length="[% category.effective_min_password_length | html %]" data-pwd-strong="[% category.effective_require_strong_password | html %]" data-typename="[% category_type | html %]">[% category.description | html %]</option>
974 [% IF limited_category %]
975 <span style="float:right;" title="The patron's current category ([% patron_category.description | html %]) is limited to other libraries"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></span>
977 <span class="required">Required</span>
982 [% IF ( mandatorysort1 ) %]
983 <label for="sort1" class="required">
989 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
990 [% IF ( mandatorysort1 ) %]
991 <span class="required">Required</span>
994 [% END # /UNLESS nosort1 %]
998 [% IF ( mandatorysort2 ) %]
999 <label for="sort2" class="required">
1005 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
1006 [% IF ( mandatorysort2 ) %]
1007 <span class="required">Required</span>
1010 [% END # /UNLESS nosort2 %]
1012 [% UNLESS noautorenew_checkouts %]
1014 <label for="yes-autorenew_checkouts">
1015 Allow auto-renewal of items:
1017 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
1018 <label for="yes-autorenew_checkouts">
1020 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1022 <label for="no-autorenew_checkouts">
1024 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1027 <label for="yes-autorenew_checkouts">
1029 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1031 <label for="no-autorenew_checkouts">
1033 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1040 <label for="protected">Protected:</label>
1041 [% IF ( patron.protected == 1 ) %]
1042 <label for="yes-protected">
1044 <input type="radio" id="yes-protected" name="protected" value="1" checked="checked" />
1046 <label for="no-protected">
1048 <input type="radio" id="no-protected" name="protected" value="0" />
1051 <label for="yes-protected">
1053 <input type="radio" id="yes-protected" name="protected" value="1" />
1055 <label for="no-protected">
1057 <input type="radio" id="no-protected" name="protected" value="0" checked="checked" />
1062 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1064 <label for="checkprevcheckout">Check for previous checkouts: </label>
1065 <select name="checkprevcheckout" id="checkprevcheckout">
1066 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1067 <option value="yes" selected="selected">Yes if settings allow it</option>
1068 <option value="no">No if settings allow it</option>
1069 <option value="inherit">Inherit from settings</option>
1070 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1071 <option value="yes">Yes if settings allow it</option>
1072 <option value="no" selected="selected">No if settings allow it</option>
1073 <option value="inherit">Inherit from settings</option>
1075 <option value="yes">Yes if settings allow it</option>
1076 <option value="no">No if settings allow it</option>
1077 <option value="inherit" selected="selected">Inherit from settings</option>
1081 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1083 [% IF Koha.Preference('TranslateNotices') %]
1085 <label for="lang">Preferred language for notices: </label>
1086 <select id="lang" name="lang">
1087 <option value="default">Default</option>
1088 [% FOR language IN languages %]
1089 [% FOR sublanguage IN language.sublanguages_loop %]
1090 [% IF language.plural %]
1091 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1092 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1094 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1097 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1098 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1100 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1102 [% END # /IF language.plural %]
1103 [% END # /FOR sublanguage %]
1104 [% END #/FOR language %]
1105 </select> <!-- /#lang -->
1107 [% END #/IF Koha.Preference('TranslateNotices') %]
1109 </fieldset> <!-- /#memberentry_library_management -->
1111 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1112 <fieldset class="rows" id="memberentry_subscription">
1113 <legend id="library_setup_lgd">Library setup</legend><ol>
1114 [% UNLESS nodateenrolled %]
1116 [% IF ( mandatorydateenrolled ) %]
1117 <label for="from" class="required">
1123 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1124 [% IF ( mandatorydateenrolled ) %]
1125 <span class="required">Required</span>
1127 [% IF ( ERROR_dateenrolled ) %]
1128 <span class="required">(Error)</span>
1130 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1132 [% END # /UNLESS nodateenrolled %]
1134 [% UNLESS nodateexpiry %]
1137 <li style="display:none">
1139 [% IF ( mandatorydateexpiry ) %]
1140 <label for="to" class="required">
1144 Expiry date (leave blank for auto calc):
1146 [% UNLESS ( opadd ) %]
1147 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1149 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1151 [% IF ( mandatorydateexpiry ) %]
1152 <span class="required">Required</span>
1154 [% IF ( ERROR_dateexpiry ) %]
1155 <span class="required">(Error)</span>
1157 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1160 [% UNLESS noopacnote %]
1162 [% IF ( mandatoryopacnote ) %]
1163 <label for="opacnote" class="required">
1165 <label for="opacnote">
1169 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1170 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1171 [% IF ( mandatoryopacnote ) %]
1172 <span class="required">Required</span>
1175 [% END # /UNLESS noopacnote %]
1177 [% UNLESS noborrowernotes %]
1179 [% IF ( mandatoryborrowernotes ) %]
1180 <label for="borrowernotes" class="required">
1182 <label for="borrowernotes">
1186 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS opduplicate %]</textarea>
1187 <div class="hint">This message displays when checking out to this patron</div>
1188 [% IF ( mandatoryborrowernotes ) %]
1189 <span class="required">Required</span>
1192 [% END # /UNLESS noborrowernotes %]
1194 </fieldset> <!-- /#memberentry_subscription -->
1195 [% END # hide fieldset %]
1197 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1198 <fieldset class="rows" id="memberentry_userid">
1199 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1201 [% UNLESS nouserid %]
1203 [% IF ( mandatoryuserid ) %]
1204 <label for="userid" class="required">
1206 <label for="userid">
1211 [% IF ( NoUpdateLogin ) %]
1212 [% IF ( opduplicate ) %]
1213 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1215 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1218 [% IF ( opduplicate ) %]
1219 <input type="text" id="userid" name="userid" size="20" value="" />
1221 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1223 [% END # /IF ( NoUpdateLogin ) %]
1225 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1226 <input type="text" disabled="disabled" style="display:none" />
1228 [% IF ( mandatoryuserid ) %]
1229 <span class="required">Required</span>
1232 [% END # /UNLESS nouserid %]
1234 [% UNLESS nopassword %]
1236 [% IF ( mandatorypassword ) %]
1237 <label for="password" class="required">
1239 <label for="password">
1244 [% IF ( NoUpdateLogin ) %]
1245 [% IF ( opduplicate ) %]
1246 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1248 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1251 [% IF ( opduplicate ) %]
1252 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1254 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1256 [% END # /IF ( NoUpdateLogin ) %]
1257 [% ELSE # IF ( opadd ) %]
1259 [% IF ( borrower_data.password ) %]
1260 [% IF ( NoUpdateLogin ) %]
1261 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1263 [% IF ( opduplicate ) %]
1264 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1266 <input type="password" id="password" name="password" size="20" value="****" />
1270 [% IF ( NoUpdateLogin ) %]
1271 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1273 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1275 [% END # /IF ( password ) %]
1276 [% END # /IF ( opadd ) %]
1277 [% IF ( mandatorypassword ) %]
1278 <span class="required">Required</span>
1280 [% IF ( ERROR_password_too_short ) %]
1281 <span class="required">Password is too short</span>
1283 [% IF ( ERROR_password_too_weak ) %]
1284 <span class="required">Password is too weak</span>
1286 [% IF ( ERROR_password_has_whitespaces ) %]
1287 <span class="required">Password has leading or trailing whitespaces</span>
1289 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1293 [% IF ( mandatorypassword ) %]
1294 <label for="password2" class="required">
1296 <label for="password2">
1301 [% IF ( NoUpdateLogin ) %]
1302 [% IF ( opduplicate ) %]
1303 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1305 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1308 [% IF ( opduplicate ) %]
1309 <input type="password" id="password2" name="password2" size="20" />
1311 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1314 [% ELSE # IF ( opadd ) %]
1315 [% IF ( borrower_data.password ) %]
1316 [% IF ( NoUpdateLogin ) %]
1317 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1319 [% IF ( opduplicate ) %]
1320 <input type="password" id="password2" name="password2" size="20" />
1322 <input type="password" id="password2" name="password2" size="20" value="****" />
1326 [% IF ( NoUpdateLogin ) %]
1327 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1329 <input type="password" id="password2" name="password2" size="20" value="" />
1332 [% END # /IF ( opadd ) %]
1334 [% IF ( mandatorypassword ) %]
1335 <span class="required">Required</span>
1337 [% IF ( ERROR_password_mismatch ) %]
1338 <span class="required">Passwords do not match</span>
1341 [% END # /UNLESS nopassword %]
1342 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1344 <label for="password_expiration_date">Password expiration date:</label>
1345 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1349 </fieldset> <!-- /#memberentry_userid -->
1350 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1352 <!--this zones are not necessary in modif mode -->
1353 [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1354 <fieldset class="rows" id="memberentry_account_flags">
1355 <legend id="account_flags_lgd">Patron account flags</legend>
1356 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1358 [% UNLESS nogonenoaddress %]
1360 [% IF mandatorygonenoaddress %]
1361 <label class="radio required" for="yesgonenoaddress">
1363 <label class="radio" for="yesgonenoaddress">
1367 [% IF CAN_user_circulate_manage_restrictions %]
1368 <label for="yesgonenoaddress">
1369 [% IF ( borrower_data.gonenoaddress ) %]
1370 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1372 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1376 <label for="nogonenoaddress">
1377 [% IF ( borrower_data.gonenoaddress ) %]
1378 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1380 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1385 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1386 [% END # /IF CAN_user_circulate_manage_restrictions %]
1387 [% IF mandatorygonenoaddress %]
1388 <span class="required">Required</span>
1392 [% END # /UNLESS nogonenoaddress %]
1395 [% IF mandatorylost %]
1396 <label class="radio required" for="yeslost">
1398 <label class="radio" for="yeslost">
1402 [% IF CAN_user_circulate_manage_restrictions %]
1403 <label for="yeslost">
1404 [% IF ( borrower_data.lost ) %]
1405 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1407 <input type="radio" id="yeslost" name="lost" value="1" />
1411 <label for="nolost">
1412 [% IF ( borrower_data.lost ) %]
1413 <input type="radio" id="nolost" name="lost" value="0" />
1415 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1420 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1421 [% END # /IF CAN_user_circulate_manage_restrictions %]
1422 [% IF mandatorylost %]
1423 <span class="required">Required</span>
1426 [% END # /UNLESS nogonenoaddress %]
1428 </fieldset> <!-- /#memberentry_account_flags -->
1430 <fieldset class="rows" id="memberentry_restrictions">
1431 <legend id="restrictions_lgd">Patron restrictions</legend>
1432 [% IF ( patron.restrictions.count ) %]
1439 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1440 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1446 [% FOREACH restriction IN patron.restrictions %]
1448 <td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
1450 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
1451 Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]
1453 [% restriction.comment | $raw %]
1457 [% IF restriction.expiration %]
1458 [% restriction.expiration | $KohaDates %]
1463 <td>[% restriction.created | $KohaDates %]</td>
1464 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1466 <input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" />
1470 [% END # /FOREACH d %]
1474 <p>Patron is currently unrestricted.</p>
1475 [% END # /IF ( patron.restrictions.count ) %]
1477 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1478 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
1479 <fieldset id="manual_restriction_form">
1480 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1481 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1483 [% IF Koha.Preference('PatronRestrictionTypes') %]
1485 <label for="debarred_type">Type:</label>
1486 <select name="debarred_type">
1487 [% FOREACH restriction_type IN restriction_types %]
1488 [% IF !restriction_type.is_system %]
1489 [% IF restriction_type.is_default %]
1490 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
1492 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
1500 <label for="debarred_comment">Comment: </label>
1501 <input type="text" id="debarred_comment" name="debarred_comment" />
1504 <label for="debarred_expiration">Expiration: </label>
1505 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1506 <a href="#" id="clear_debarred_expiration">Clear date</a>
1510 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1512 </fieldset> <!-- /#manual_restriction_form -->
1513 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1514 </fieldset> <!-- /#memberentry_restrictions -->
1515 [% END # /IF ( step_3 ) %]
1518 [% IF Koha.Preference('HouseboundModule') %]
1519 <fieldset class="rows" id="memberentry_housebound_roles">
1520 <legend id="housebound_roles">Housebound roles</legend>
1523 <label class="radio" for="housebound_chooser">
1526 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1527 <label for="yes_housebound_chooser">Yes </label>
1528 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1529 <label for="no_housebound_chooser">No </label>
1530 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1532 <label for="yes_housebound_chooser">Yes </label>
1533 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1534 <label for="no_housebound_chooser">No </label>
1535 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1539 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1540 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1541 <label for="yes_housebound_deliverer">Yes </label>
1542 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1543 <label for="no_housebound_deliverer">No </label>
1544 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1546 <label for="yes_housebound_deliverer">Yes </label>
1547 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1548 <label for="no_housebound_deliverer">No </label>
1549 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1552 </ol> <!-- /ol.radio -->
1553 </fieldset> <!-- /#memberentry_housebound_roles -->
1554 [% END # hide fieldset %]
1555 [% END # IF step_7 %]
1558 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1559 [% UNLESS ( no_patron_attribute_types ) %]
1560 <fieldset class="rows" id="memberentry_patron_attributes">
1561 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1562 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1563 [% FOREACH pa_loo IN patron_attributes %]
1564 <ol class="attributes_table">
1565 [% IF pa_loo.class %]
1566 <div id="aai_[% pa_loo.class | html %]">
1567 <h3 id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</h3>
1569 [% FOREACH patron_attribute IN pa_loo.items %]
1570 <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1571 [% IF patron_attribute.mandatory %]
1572 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1574 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1576 [% IF ( patron_attribute.use_dropdown ) %]
1577 [% IF patron_attribute.mandatory %]
1578 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1580 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1582 <option value=""></option>
1583 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1584 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1585 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1586 [% auth_val_loo.lib | html %]
1589 <option value="[% auth_val_loo.authorised_value | html %]" >
1590 [% auth_val_loo.lib | html %]
1596 [% IF patron_attribute.mandatory %]
1597 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1599 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1601 [% END # /IF ( patron_attribute.use_dropdown ) %]
1602 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1603 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
1604 [% IF ( patron_attribute.repeatable ) %]
1605 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1607 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1609 [% END # /FOREACH patron_attribute %]
1610 [% IF pa_loo.class %]</div>[% END %]
1612 [% END # /FOREACH pa_loo %]
1613 </fieldset> <!-- /#memberentry_patron_attributes -->
1614 [% END # UNLESS ( no_patron_attribute_types ) %]
1615 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1616 [% END # IF ( step_4 ) %]
1619 [% IF ( EnhancedMessagingPreferences ) %]
1620 <fieldset class="rows" id="memberentry_messaging_prefs">
1621 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1622 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1623 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1625 <input type="hidden" name="setting_messaging_prefs" value="1" />
1626 [% INCLUDE 'messaging-preference-form.inc' %]
1627 [% IF ( SMSSendDriver ) %]
1628 [% IF !nosmsalertnumber %]
1630 <label for="SMSnumber">SMS number:</label>
1631 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1632 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1635 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1637 <label for="sms_provider_id">SMS provider:</label>
1638 <select id="sms_provider_id" name="sms_provider_id">
1639 <option value="">Unknown</option>
1640 [% FOREACH s IN sms_providers %]
1641 [% IF s.id == borrower_data.sms_provider_id %]
1642 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1644 <option value="[% s.id | html %]">[% s.name | html %]</option>
1649 [% END # /UNLESS nosms_provider_id %]
1650 [% END # IF ( SMSSendDriver ) %]
1652 [% END # IF ( EnhancedMessagingPreferences ) %]
1653 [% END # /IF step_5 %]
1654 </form> <!-- /#entryform -->
1656 [% IF quickadd && opadd && !check_member %]
1657 <form id="quick_add_form" class="toggler">
1658 <fieldset class="rows quick_add"><legend>Quick add</legend>
1659 <ol id="quick_add_list">
1665 [% END # /UNLESS ( no_add ) %]
1667 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1669 [% UNLESS ( opadd ) %]
1670 <div class="col-sm-2 col-sm-pull-10">
1672 [% INCLUDE 'circ-menu.inc' %]
1674 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1676 </div> <!-- /.row -->
1678 [% MACRO jsinclude BLOCK %]
1679 [% Asset.js("lib/hc-sticky.js") | $raw %]
1680 [% INCLUDE 'calendar.inc' %]
1681 [% INCLUDE 'str/members-menu.inc' %]
1682 [% Asset.js("js/members-menu.js") | $raw %]
1684 function update_cardnumber_warning(size){
1685 var max_len = [% maxlength_cardnumber | html %];
1686 if ( size >= max_len ) {
1687 $("#cn_max").show();
1689 $("#cn_max").hide();
1693 function showHideFields(){
1694 [% UNLESS step == 1 %]
1695 [% IF fieldstohide.match('identity') %]
1696 $("#memberentry_identity").find('legend').nextAll().toggle();
1698 [% IF show_guarantor || guarantor %]
1699 [% IF fieldstohide.match('guarantor') %]
1700 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1701 $("#guarantor_template").toggle();
1704 [% IF fieldstohide.match('primary_address') %]
1705 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1707 [% IF fieldstohide.match('primary_contact') %]
1708 $("#memberentry_contact").find('legend').nextAll().toggle();
1711 [% UNLESS step == 6 %]
1712 [% IF fieldstohide.match('alt_address') %]
1713 $("#memberentry_address").find('legend').nextAll().toggle();
1716 [% UNLESS step == 2 %]
1717 [% IF fieldstohide.match('alt_contact') %]
1718 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1721 [% UNLESS step == 3 %]
1722 [% IF fieldstohide.match('lib_mgmt') %]
1723 $("#memberentry_library_management").find('legend').nextAll().toggle();
1725 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1726 [% IF fieldstohide.match('lib_setup') %]
1727 $("#memberentry_subscription").find('legend').nextAll().toggle();
1730 [% UNLESS nouserid && nopassword %]
1731 [% IF fieldstohide.match('login') %]
1732 $("#memberentry_userid").find('legend').nextAll().toggle();
1735 [% UNLESS ( opadd || opduplicate ) %]
1736 [% IF fieldstohide.match('flags') %]
1737 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1740 [% IF fieldstohide.match('debarments') %]
1741 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1744 [% UNLESS step == 7 %]
1745 [% IF Koha.Preference('HouseboundModule') %]
1746 [% IF fieldstohide.match('housebound') %]
1747 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1751 [% UNLESS step == 4 %]
1752 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1753 [% IF fieldstohide.match('additional') %]
1754 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1758 [% UNLESS step == 5 %]
1759 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1760 [% IF fieldstohide.match('messaging') %]
1761 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1762 $("#messaging_prefs_loading").toggle();
1768 $(document).ready(function() {
1770 $("#toggle_hidden_fields").change(function(){
1774 $("legend").click(function(){
1775 $(this).nextAll().toggle();
1776 $("#messaging_prefs_loading").hide();
1777 $("#guarantor_template").hide();
1780 $("#saverecord").css({ 'margin-left': 0 });
1782 Sticky = $("#toolbar");
1785 stickyClass: "floating"
1788 [% IF borrower_data.categorycode %]
1789 update_category_code( "[% borrower_data.categorycode | html %]" );
1791 if ( $("#categorycode_entry").length > 0 ){
1792 var category_code = $("#categorycode_entry").find("option:selected").val();
1793 update_category_code( category_code );
1797 [% IF new_guarantors %]
1798 [% FOREACH g IN new_guarantors %]
1799 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1803 $("#cn_max").hide();
1805 $("#cardnumber").on("keydown", function(e){
1806 content = $(this).val();
1808 $("#cardnumber").on("keyup", function(e){
1809 // .val() will return the value of the input after the key has been released
1810 var l = $(this).val().length;
1811 if ( l == content.length + 1 ) { l--; }
1812 update_cardnumber_warning(l);
1814 $("#cardnumber").bind("paste", function(e){
1815 var pastedData = e.originalEvent.clipboardData.getData('text');
1816 update_cardnumber_warning(pastedData.length - 1);
1818 var toggle_quick_add = $(".toggle_quick_add");
1819 $(toggle_quick_add).click(function(e){
1820 toggle_quick_add.toggle();
1823 var toggle_from = '';
1824 if( $("#entryform:visible").length ) {
1825 toggle_to = "#quick_add_form label";
1826 toggle_from = "#entryform label";
1827 $("#memberentry_guarantor").appendTo("#quick_add_form");
1829 toggle_to="#entryform label";
1830 toggle_from = "#quick_add_form label";
1831 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1833 $(toggle_from).each(function() {
1834 var input_label = $(this).attr('for');
1835 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1836 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1839 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1842 $(".toggler").toggle();
1845 $("#save_quick_add").click(function(){
1846 $("#quick_add_form").validate();
1847 if( $("#quick_add_form").valid()){
1848 $('.toggle_quick_add').click();
1849 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1850 $('#saverecord').click();
1852 else {return false;}
1855 $("#saverecord").click(function(){
1856 if( check_form_borrowers() ){
1857 $("#entryform").submit();
1861 $('#duplicate').on('click', function() {
1862 $("input[name='op']").val('modify');
1863 $("input[name='borrowernumber']").val('[% check_member | html %]');
1864 $("input[name='check_member']").val('');
1865 $('#entryform').submit();
1868 $('#not-duplicate').on('click', function() {
1869 $("input[name='nodouble']").val('1');
1870 $('#entryform').submit();
1873 $(".popup_patronview").on("click", function(e){
1875 var url = $(this).attr("href");
1876 openWindow( url, "patronview" );
1879 $("#dateofbirth").on("change", function(){
1883 $("#debarred_comment, #debarred_expiration").on("change", function(){
1884 $("#add_debarment").val(1);
1887 $("#clear_debarred_expiration").on("click", function(e){
1889 $('#debarred_expiration').val("");
1892 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1894 clear_entry( this );
1897 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1899 clone_entry( this );
1902 $("#categorycode_entry").on("change", function(){
1903 update_category_code(this);
1906 [% IF logged_in_user.borrowernumber == borrowernumber %]
1907 $("#userid").on("change", function(){
1908 $(this).parent().find("div.hint").remove();
1909 if ( "[% borrower_data.userid | html %]" != $(this).val() ) {
1910 $(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username")));
1917 [% IF quickadd && opadd && !check_member %]
1918 $(document).ready(function () {
1920 $("#entryform,#saverecord").hide();
1921 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1922 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1923 $("#entryform label").each(function () {
1924 var input_label = $(this).attr('for');
1925 if ( input_label == 'sex-female' ) {
1928 else if ( input_label == 'btitle' ) {
1929 input_label='title';
1931 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1932 let orig_li = $(this).parent();
1933 if( orig_li.attr('class') == 'radio' ){
1934 let new_field = orig_li.clone();
1935 new_field.children('label').each(function(){
1936 let child_input = $(this).children('input');
1937 child_input.attr("id",child_input.attr("id") + "_quick_add");
1939 new_field.appendTo("#quick_add_list");
1941 let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1942 let new_field = orig_li.clone();
1943 new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1944 new_field.appendTo("#quick_add_list");
1945 [% UNLESS mandatorypassword %]
1946 if( input_label == 'password' ){
1947 let orig_p2 = $("#entryform label[for='password2']").parent();
1948 let new_p2 = orig_p2.clone();
1949 new_p2.find('input[id="password2"]').attr("id","password2_quick_add");
1950 new_p2.appendTo("#quick_add_list");
1956 if ( $("#memberentry_guarantor").length ) {
1957 $("#memberentry_guarantor").appendTo("#quick_add_form");
1959 $("#quick_add_form").show();
1960 $("#quick_add_form").find(".flatpickr:hidden").each( (i, input) => {
1961 $(input).siblings(".flatpickr_wrapper").remove(); // Remove leftover from the previous flatpickr that has been cloned
1962 apply_flatpickr(input);
1966 $("#guarantor_template").hide();
1968 var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1969 var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1972 [% Asset.js("js/members.js") | $raw %]
1973 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1974 [% PROCESS 'password_check.inc' new_password => 'password', category_selector => '#categorycode_entry', minPasswordLength => patron.category.effective_min_password_length, RequireStrongPassword => patron.category.effective_require_strong_password %]
1977 [% INCLUDE 'intranet-bottom.inc' %]