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>
190 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
191 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
193 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
194 [% FOREACH field IN fieldstohide.split(',') %]
196 [% CASE 'identity' %] <span>Patron identity</span> |
197 [% CASE 'guarantor' %] <span>Guarantor information</span> |
198 [% CASE 'primary_address' %] <span>Main address</span> |
199 [% CASE 'primary_contact' %] <span>Contact information</span> |
200 [% CASE 'alt_address' %] <span>Alternate address</span> |
201 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
202 [% CASE 'lib_mgmt' %] <span>Library management</span> |
203 [% CASE 'lib_setup' %] <span>Library setup</span> |
204 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
205 [% CASE 'flags' %] <span>Patron account flags</span> |
206 [% CASE 'debarments' %] <span>Patron restrictions</span> |
207 [% CASE 'housebound' %] <span>Housebound roles</span> |
208 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
209 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
215 [% UNLESS ( check_member ) %]
216 <div id="toolbar" class="btn-toolbar">
217 [% IF quickadd && opadd %]
218 <button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
220 <button class="btn btn-primary toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
222 <a class="btn btn-link" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
224 <a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
226 <i class="fa fa-times"></i> Cancel
231 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
232 [% UNLESS ( check_member ) %]
233 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
235 <!-- field always hidden in different form (1,2,3) -->
236 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
237 <input type="hidden" name="updtype" value="[% updtype | html %]" />
238 <input type="hidden" name="destination" value="[% destination | html %]" />
239 <input type="hidden" name="check_member" value="[% check_member | html %]" />
240 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
241 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
242 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
244 <input type="hidden" name="step" value="[% step | html %]" />
247 <input type="hidden" name="op" value="insert" />
248 [% ELSIF ( opduplicate ) %]
249 <input type="hidden" name="op" value="insert" />
251 <input type="hidden" name="op" value="save" />
252 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
253 [%# Only put the card number if we arent showing it in the form later %]
254 [% IF borrower_data.cardnumber %]
255 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
261 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
262 <fieldset class="rows" id="memberentry_identity">
263 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span></legend>
265 [% UNLESS ( patron_category.category_type == 'I' ) %]
267 [% IF Koha.Preference('BorrowersTitles') %]
269 [% IF ( mandatorytitle ) %]
270 <label for="btitle" class="required">
275 <select id="btitle" name="title">
276 <option value=""></option>
277 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
279 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
281 <option value="[% t | html %]">[% t | html %]</option>
285 [% IF ( mandatorytitle ) %]
286 <span class="required">Required</span>
289 [% END # /IF Koha.Preference('BorrowersTitles') %]
290 [% END # /UNLESS notitle %]
291 [% END # /UNLESS ( I ) %]
293 [% UNLESS nosurname %]
295 [% IF ( patron_category.category_type == 'I' ) %]
296 <label for="surname" class="required">
300 [% IF ( mandatorysurname ) %]
301 <label for="surname" class="required">
303 <label for="surname">
308 [% IF ( uppercasesurnames ) %]
309 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
311 <input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
313 [% IF ( mandatorysurname ) %]
314 <span class="required">Required</span>
317 [% END # /UNLESS nosurname %]
319 [% UNLESS ( patron_category.category_type == 'I' ) %]
320 [% UNLESS nofirstname %]
322 [% IF ( mandatoryfirstname ) %]
323 <label for="firstname" class="required">
325 <label for="firstname">
329 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
330 [% IF ( mandatoryfirstname ) %]
331 <span class="required">Required</span>
334 [% END #/UNLESS nofirstname %]
335 [% UNLESS nomiddle_name %]
337 [% IF ( mandatorymiddle_name ) %]
338 <label for="middle_name" class="required">
340 <label for="middle_name">
344 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
345 [% IF ( mandatorymiddle_name ) %]
346 <span class="required">Required</span>
349 [% END #/UNLESS nomiddle_name %]
350 [% UNLESS nodateofbirth %]
352 [% IF ( mandatorydateofbirth ) %]
353 <label for="dateofbirth" class="required">
355 <label for="dateofbirth">
359 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
360 [% IF ( mandatorydateofbirth ) %]
361 <span class="required">Required</span>
363 [% IF ( ERROR_dateofbirth ) %]
364 <span class="required">(Error)</span>
366 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
368 [% END # /UNLESS nodateofbirth %]
369 [% UNLESS noinitials %]
371 [% IF ( mandatoryinitials ) %]
372 <label for="initials" class="required">
374 <label for="initials">
378 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
379 [% IF ( mandatoryinitials ) %]
380 <span class="required">Required</span>
383 [% END # /UNLESS noinitials %]
384 [% UNLESS nopronouns %]
386 [% IF ( mandatorypronouns ) %]
387 <label for="pronouns" class="required">
389 <label for="pronouns">
393 <input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS opduplicate %]" />
394 [% IF ( mandatorypronouns ) %]
395 <span class="required">Required</span>
398 [% END # /UNLESS nopronouns %]
399 [% END #/UNLESS ( I ) %]
400 [% UNLESS noothernames %]
402 [% IF ( mandatoryothernames ) %]
403 <label for="othernames" class="required">
405 <label for="othernames">
409 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
410 [% IF ( mandatoryothernames ) %]
411 <span class="required">Required</span>
413 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
415 [% END #/UNLESS noothernames %]
417 [% UNLESS ( patron_category.category_type == 'I' ) %]
420 [% UNLESS ( opduplicate ) %]
422 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
424 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
427 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
429 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
432 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
434 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
437 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
439 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
442 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
443 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
444 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
445 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
446 [% END # /UNLESS ( opduplicate )%]
448 [% END # /UNLESS nosex %]
449 [% END # /UNLESS ( I ) %]
451 </fieldset> <!-- /#memberentry_identity -->
452 [% END # hide fieldset %]
454 [% IF show_guarantor || guarantor %]
455 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
456 <div id="memberentry_guarantor_anchor">
457 <fieldset id="memberentry_guarantor" class="rows">
458 <legend>Patron guarantor</legend>
460 <div id="guarantor_relationships">
461 [% FOREACH r IN relationships %]
464 [% IF patron_category.category_type == 'I' %]
465 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
466 <span class="label">Organization:</span>
467 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
470 <span class="label">Relationship:</span>
471 <span>[% r.relationship | html %]</span>
474 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
475 <span class="label">Guarantor:</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>
484 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
485 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
490 [% END # END relationships foreach %]
491 [% IF guarantor && (!relationships) %]
492 <fieldset class="guarantor">
494 <li class="guarantor-details" data-borrowernumber="0">
495 <span class="label">Guarantor:</span>
496 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
497 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
500 [% IF possible_relationships %]
502 [% UNLESS empty_relationship_allowed %]
503 <label for="guarantor_relationship" class="required">Relationship: </label>
504 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
506 <label for="guarantor_relationship">Relationship: </label>
507 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
509 <option value="" selected>Empty option</option>
510 [% FOREACH pr IN possible_relationships.split('\|') %]
512 <option value="[% pr | html %]">[% pr | html %]</option>
516 [% UNLESS empty_relationship_allowed %]
517 <span class="required">Required</span>
521 <input type="hidden" name="new_guarantor_relationship" value="" />
525 <label for="guarantor_cancel"> </label>
526 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can" aria-hidden="true"></i> Remove</a></span>
531 </div> <!-- #/guarantor_relationships -->
533 <fieldset class="guarantor" id="guarantor_template">
535 <li class="guarantor-details" data-borrowernumber="0">
536 <span class="label">Guarantor:</span>
537 <a class="new_guarantor_link" href="#" target="blank">
538 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
539 (<span class="new_guarantor_id_text"></span>)
541 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
544 [% IF possible_relationships %]
546 [% UNLESS empty_relationship_allowed %]
547 <label for="guarantor_relationship" class="required">Relationship: </label>
548 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
550 <label for="guarantor_relationship">Relationship: </label>
551 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
553 <option value="" selected></option>
554 [% FOREACH pr IN possible_relationships.split('\|') %]
556 <option value="[% pr | html %]">[% pr | html %]</option>
560 [% UNLESS empty_relationship_allowed %]
561 <span class="required">Required</span>
565 <input type="hidden" name="new_guarantor_relationship" value="" />
569 <label for="guarantor_cancel"> </label>
570 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can"></i> Remove</a></span>
576 <input type="hidden" id="guarantor_id" value="" />
577 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
578 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
581 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
584 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
586 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors:</label>
587 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
588 [% IF borrower_data.privacy_guarantor_checkouts %]
589 <option value="0">No</option>
590 <option value="1" selected>Yes</option>
592 <option value="0" selected>No</option>
593 <option value="1">Yes</option>
596 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
599 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
601 <label for="privacy_guarantor_fines">Show charges to guarantors:</label>
602 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
603 [% IF borrower_data.privacy_guarantor_fines %]
604 <option value="0">No</option>
605 <option value="1" selected>Yes</option>
607 <option value="0" selected>No</option>
608 <option value="1">Yes</option>
611 <div class="hint">Allow guarantors of this patron to view this patron's charges from the OPAC</div>
615 </fieldset> <!-- /#memberentry_guarantor -->
616 </div> <!-- #/memberentry_guarantor_anchor -->
618 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
619 <fieldset class="rows" id="non_patron_guarantor">
620 <legend>Non-patron guarantor</legend>
622 [% UNLESS nocontactname %]
624 [% IF ( mandatorycontactname ) %]
625 <label for="contactname" class="required">
627 <label for="contactname">
631 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
632 [% IF ( mandatorycontactname ) %]
633 <span class="required">Required</span>
635 <div class="hint">Non-patron guarantor surname</div>
637 [% END # /UNLESS nocontactname %]
639 [% UNLESS nocontactfirstname %]
641 [% IF ( mandatorycontactfirstname ) %]
642 <label for="contactfirstname" class="required">
644 <label for="contactfirstname">
646 Guarantor first name:
648 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
649 [% IF ( mandatorycontactfirstname ) %]
650 <span class="required">Required</span>
652 <div class="hint">Non-patron guarantor first name</div>
654 [% END # /UNLESS noaltcontactfirstname %]
656 [% UNLESS norelationship %]
657 [% IF possible_relationships %]
659 <label for="relationship">Relationship: </label>
660 <select class="relationship" name="relationship">
661 <option value=""></option>
662 [% FOREACH pr IN possible_relationships.split('\|') %]
663 [% IF pr == borrower_data.relationship %]
664 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
666 <option value="[% pr | html %]">[% pr | html %]</option>
671 [% END #/IF possible_relationships %]
672 [% END # /UNLESS norelationship %]
674 </fieldset> <!-- /#non_patron_guarantor -->
675 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
676 [% END # /IF show_guarantor || guarantor %]
678 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
679 [% PROCESS 'main-address-style' %]
680 [% END # /UNLESS nostreet && nocity etc group%]
682 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
683 <fieldset class="rows" id="memberentry_contact">
684 <legend id="contact_lgd">Contact information</legend>
688 [% IF ( mandatoryphone ) %]
689 <label for="phone" class="required">
695 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
696 [% IF ( mandatoryphone ) %]
697 <span class="required">Required</span>
699 <div class="hint">Shows on transit slips</div>
701 [% END # /UNLESS nophone %]
703 [% UNLESS nophonepro %]
705 [% IF ( mandatoryphonepro ) %]
706 <label for="phonepro" class="required">
708 <label for="phonepro">
712 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
713 [% IF ( mandatoryphonepro ) %]
714 <span class="required">Required</span>
717 [% END # /UNLESS nophonepro %]
719 [% UNLESS nomobile %]
721 [% IF ( mandatorymobile ) %]
722 <label for="mobile" class="required">
728 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
729 [% IF ( mandatorymobile ) %]
730 <span class="required">Required</span>
733 [% END # /UNLESS nomobile %]
737 [% IF ( mandatoryemail ) %]
738 <label for="email" class="required">
744 [% IF ( NoUpdateEmail ) %]
745 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
747 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
749 [% IF ( mandatoryemail ) %]
750 <span class="required">Required</span>
752 <div class="hint">Shows on transit slips</div>
754 [% END #/UNLESS noemail %]
756 [% UNLESS noemailpro %]
758 [% IF ( mandatoryemailpro ) %]
759 <label for="emailpro" class="required">
761 <label for="emailpro">
765 [% IF ( NoUpdateEmail ) %]
766 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
768 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
770 [% IF ( mandatoryemailpro ) %]
771 <span class="required">Required</span>
774 [% END #/UNLESS noemailpro %]
778 [% IF ( mandatoryfax ) %]
779 <label for="fax" class="required">
785 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
786 [% IF ( mandatoryfax ) %]
787 <span class="required">Required</span>
790 [% END #/UNLESS nofax %]
792 [% UNLESS noprimary_contact_method %]
794 [% IF mandatoryprimary_contact_method %]
795 <label for="primary_contact_method" class="required">
797 <label for="primary_contact_method">
799 Main contact method: </label>
801 <select id="primary_contact_method" name="primary_contact_method">
802 <option value=""></option>
804 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
805 <option value="phone" selected="selected">Primary phone</option>
807 <option value="phone">Primary phone</option>
810 [% UNLESS nophonepro %]
811 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
812 <option value="phonepro" selected="selected">Secondary phone</option>
814 <option value="phonepro">Secondary phone</option>
817 [% UNLESS nomobile %]
818 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
819 <option value="mobile" selected="selected">Other phone</option>
821 <option value="mobile">Other phone</option>
825 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
826 <option value="email" selected="selected">Primary email</option>
828 <option value="email">Primary email</option>
831 [% UNLESS noemailpro %]
832 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
833 <option value="emailpro" selected="selected">Secondary email</option>
835 <option value="emailpro">Secondary email</option>
839 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
840 <option value="fax" selected="selected">Fax</option>
842 <option value="fax">Fax</option>
846 [% IF mandatoryprimary_contact_method %]
847 <span class="required">Required</span>
852 </fieldset> <!-- /#memberentry_contact -->
853 [% END # hide fieldset %]
855 <!-- ************************ STEP_1 *********************** -->
856 [% END # /IF ( step_1 ) %]
859 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
860 [% PROCESS 'alt-address-style' %]
861 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
862 [% END # /IF ( step_6 ) %]
865 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
866 [% PROCESS 'alt-contact-style' %]
867 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
868 [% END # /IF ( step_2 ) %]
871 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
872 <fieldset class="rows" id="memberentry_library_management">
873 <legend id="library_management_lgd">Library management</legend>
875 [% UNLESS nocardnumber %]
877 [% IF mandatorycardnumber %]
878 <label for="cardnumber" class="required">
880 <label for="cardnumber" class="validated">
885 <!-- NOTE: div.hint closing tag isn't on the same line -->
886 [% IF minlength_cardnumber == maxlength_cardnumber %]
887 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
888 [% IF mandatorycardnumber %]
889 <span class="required">Required</span>
891 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
892 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
893 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
894 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
895 [% IF mandatorycardnumber %]
896 <span class="required">Required</span>
898 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
899 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
900 [% ELSIF maxlength_cardnumber %]
901 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
902 [% IF mandatorycardnumber %]
903 <span class="required">Required</span>
905 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
906 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
908 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
909 [% IF mandatorycardnumber %]
910 <span class="required">Required</span>
912 <div class="hint">There is no minimum or maximum character length.
914 [% IF autoMemberNum %]
915 [% IF mandatorycardnumber %]
916 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
918 <br/>Leave blank for auto calc during registration
921 </div><!--/div.hint -->
923 [% END # /UNLESS nocardnumber %]
925 [% UNLESS nobranchcode %]
927 <label for="libraries" class="required">Library:</label>
928 <select name="branchcode" id="libraries">
929 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
931 <span class="required">Required</span>
936 <label for="categorycode_entry" class="required">Category: </label>
937 <select id="categorycode_entry" name="categorycode">
938 [% FOREACH category_type IN patron_categories.keys %]
939 [% SWITCH category_type %]
941 <optgroup label="Child">
943 <optgroup label="Adult">
945 <optgroup label="Staff">
947 <optgroup label="Organization">
949 <optgroup label="Professional">
951 <optgroup label="Statistical">
953 <optgroup label="Unknown">
955 [% FOREACH category IN patron_categories.$category_type %]
956 [% IF category.categorycode == patron_category.categorycode %]
957 <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>
959 <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>
965 [% IF limited_category %]
966 <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>
968 <span class="required">Required</span>
973 [% IF ( mandatorysort1 ) %]
974 <label for="sort1" class="required">
980 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
981 [% IF ( mandatorysort1 ) %]
982 <span class="required">Required</span>
985 [% END # /UNLESS nosort1 %]
989 [% IF ( mandatorysort2 ) %]
990 <label for="sort2" class="required">
996 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
997 [% IF ( mandatorysort2 ) %]
998 <span class="required">Required</span>
1001 [% END # /UNLESS nosort2 %]
1003 [% UNLESS noautorenew_checkouts %]
1005 <label for="yes-autorenew_checkouts">
1006 Allow auto-renewal of items:
1008 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
1009 <label for="yes-autorenew_checkouts">
1011 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1013 <label for="no-autorenew_checkouts">
1015 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1018 <label for="yes-autorenew_checkouts">
1020 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1022 <label for="no-autorenew_checkouts">
1024 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1030 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1032 <label for="checkprevcheckout">Check for previous checkouts: </label>
1033 <select name="checkprevcheckout" id="checkprevcheckout">
1034 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1035 <option value="yes" selected="selected">Yes if settings allow it</option>
1036 <option value="no">No if settings allow it</option>
1037 <option value="inherit">Inherit from settings</option>
1038 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1039 <option value="yes">Yes if settings allow it</option>
1040 <option value="no" selected="selected">No if settings allow it</option>
1041 <option value="inherit">Inherit from settings</option>
1043 <option value="yes">Yes if settings allow it</option>
1044 <option value="no">No if settings allow it</option>
1045 <option value="inherit" selected="selected">Inherit from settings</option>
1049 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1051 [% IF Koha.Preference('TranslateNotices') %]
1053 <label for="lang">Preferred language for notices: </label>
1054 <select id="lang" name="lang">
1055 <option value="default">Default</option>
1056 [% FOR language IN languages %]
1057 [% FOR sublanguage IN language.sublanguages_loop %]
1058 [% IF language.plural %]
1059 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1060 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1062 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1065 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1066 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1068 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1070 [% END # /IF language.plural %]
1071 [% END # /FOR sublanguage %]
1072 [% END #/FOR language %]
1073 </select> <!-- /#lang -->
1075 [% END #/IF Koha.Preference('TranslateNotices') %]
1077 </fieldset> <!-- /#memberentry_library_management -->
1079 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1080 <fieldset class="rows" id="memberentry_subscription">
1081 <legend id="library_setup_lgd">Library setup</legend><ol>
1082 [% UNLESS nodateenrolled %]
1084 [% IF ( mandatorydateenrolled ) %]
1085 <label for="from" class="required">
1091 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1092 [% IF ( mandatorydateenrolled ) %]
1093 <span class="required">Required</span>
1095 [% IF ( ERROR_dateenrolled ) %]
1096 <span class="required">(Error)</span>
1098 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1100 [% END # /UNLESS nodateenrolled %]
1102 [% UNLESS nodateexpiry %]
1105 <li style="display:none">
1107 [% IF ( mandatorydateexpiry ) %]
1108 <label for="to" class="required">
1112 Expiry date (leave blank for auto calc):
1114 [% UNLESS ( opadd ) %]
1115 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1117 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1119 [% IF ( mandatorydateexpiry ) %]
1120 <span class="required">Required</span>
1122 [% IF ( ERROR_dateexpiry ) %]
1123 <span class="required">(Error)</span>
1125 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1128 [% UNLESS noopacnote %]
1130 [% IF ( mandatoryopacnote ) %]
1131 <label for="opacnote" class="required">
1133 <label for="opacnote">
1137 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1138 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1139 [% IF ( mandatoryopacnote ) %]
1140 <span class="required">Required</span>
1143 [% END # /UNLESS noopacnote %]
1145 [% UNLESS noborrowernotes %]
1147 [% IF ( mandatoryborrowernotes ) %]
1148 <label for="borrowernotes" class="required">
1150 <label for="borrowernotes">
1154 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS opduplicate %]</textarea>
1155 <div class="hint">This message displays when checking out to this patron</div>
1156 [% IF ( mandatoryborrowernotes ) %]
1157 <span class="required">Required</span>
1160 [% END # /UNLESS noborrowernotes %]
1162 </fieldset> <!-- /#memberentry_subscription -->
1163 [% END # hide fieldset %]
1165 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1166 <fieldset class="rows" id="memberentry_userid">
1167 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1169 [% UNLESS nouserid %]
1171 [% IF ( mandatoryuserid ) %]
1172 <label for="userid" class="required">
1174 <label for="userid">
1179 [% IF ( NoUpdateLogin ) %]
1180 [% IF ( opduplicate ) %]
1181 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1183 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1186 [% IF ( opduplicate ) %]
1187 <input type="text" id="userid" name="userid" size="20" value="" />
1189 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1191 [% END # /IF ( NoUpdateLogin ) %]
1193 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1194 <input type="text" disabled="disabled" style="display:none" />
1196 [% IF ( mandatoryuserid ) %]
1197 <span class="required">Required</span>
1200 [% END # /UNLESS nouserid %]
1202 [% UNLESS nopassword %]
1204 [% IF ( mandatorypassword ) %]
1205 <label for="password" class="required">
1207 <label for="password">
1212 [% IF ( NoUpdateLogin ) %]
1213 [% IF ( opduplicate ) %]
1214 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1216 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1219 [% IF ( opduplicate ) %]
1220 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1222 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1224 [% END # /IF ( NoUpdateLogin ) %]
1225 [% ELSE # IF ( opadd ) %]
1227 [% IF ( borrower_data.password ) %]
1228 [% IF ( NoUpdateLogin ) %]
1229 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1231 [% IF ( opduplicate ) %]
1232 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1234 <input type="password" id="password" name="password" size="20" value="****" />
1238 [% IF ( NoUpdateLogin ) %]
1239 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1241 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1243 [% END # /IF ( password ) %]
1244 [% END # /IF ( opadd ) %]
1245 [% IF ( mandatorypassword ) %]
1246 <span class="required">Required</span>
1248 [% IF ( ERROR_password_too_short ) %]
1249 <span class="required">Password is too short</span>
1251 [% IF ( ERROR_password_too_weak ) %]
1252 <span class="required">Password is too weak</span>
1254 [% IF ( ERROR_password_has_whitespaces ) %]
1255 <span class="required">Password has leading or trailing whitespaces</span>
1257 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1261 [% IF ( mandatorypassword ) %]
1262 <label for="password2" class="required">
1264 <label for="password2">
1269 [% IF ( NoUpdateLogin ) %]
1270 [% IF ( opduplicate ) %]
1271 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1273 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1276 [% IF ( opduplicate ) %]
1277 <input type="password" id="password2" name="password2" size="20" />
1279 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1282 [% ELSE # IF ( opadd ) %]
1283 [% IF ( borrower_data.password ) %]
1284 [% IF ( NoUpdateLogin ) %]
1285 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1287 [% IF ( opduplicate ) %]
1288 <input type="password" id="password2" name="password2" size="20" />
1290 <input type="password" id="password2" name="password2" size="20" value="****" />
1294 [% IF ( NoUpdateLogin ) %]
1295 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1297 <input type="password" id="password2" name="password2" size="20" value="" />
1300 [% END # /IF ( opadd ) %]
1302 [% IF ( mandatorypassword ) %]
1303 <span class="required">Required</span>
1305 [% IF ( ERROR_password_mismatch ) %]
1306 <span class="required">Passwords do not match</span>
1309 [% END # /UNLESS nopassword %]
1310 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1312 <label for="password_expiration_date">Password expiration date:</label>
1313 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1317 </fieldset> <!-- /#memberentry_userid -->
1318 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1320 <!--this zones are not necessary in modif mode -->
1321 [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1322 <fieldset class="rows" id="memberentry_account_flags">
1323 <legend id="account_flags_lgd">Patron account flags</legend>
1324 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1326 [% UNLESS nogonenoaddress %]
1328 [% IF mandatorygonenoaddress %]
1329 <label class="radio required" for="yesgonenoaddress">
1331 <label class="radio" for="yesgonenoaddress">
1335 [% IF CAN_user_circulate_manage_restrictions %]
1336 <label for="yesgonenoaddress">
1337 [% IF ( borrower_data.gonenoaddress ) %]
1338 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1340 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1344 <label for="nogonenoaddress">
1345 [% IF ( borrower_data.gonenoaddress ) %]
1346 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1348 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1353 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1354 [% END # /IF CAN_user_circulate_manage_restrictions %]
1355 [% IF mandatorygonenoaddress %]
1356 <span class="required">Required</span>
1360 [% END # /UNLESS nogonenoaddress %]
1363 [% IF mandatorylost %]
1364 <label class="radio required" for="yeslost">
1366 <label class="radio" for="yeslost">
1370 [% IF CAN_user_circulate_manage_restrictions %]
1371 <label for="yeslost">
1372 [% IF ( borrower_data.lost ) %]
1373 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1375 <input type="radio" id="yeslost" name="lost" value="1" />
1379 <label for="nolost">
1380 [% IF ( borrower_data.lost ) %]
1381 <input type="radio" id="nolost" name="lost" value="0" />
1383 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1388 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1389 [% END # /IF CAN_user_circulate_manage_restrictions %]
1390 [% IF mandatorylost %]
1391 <span class="required">Required</span>
1394 [% END # /UNLESS nogonenoaddress %]
1396 </fieldset> <!-- /#memberentry_account_flags -->
1398 <fieldset class="rows" id="memberentry_restrictions">
1399 <legend id="restrictions_lgd">Patron restrictions</legend>
1400 [% IF ( patron.restrictions.count ) %]
1407 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1408 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1414 [% FOREACH restriction IN patron.restrictions %]
1416 <td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
1418 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
1419 Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]
1421 [% restriction.comment | $raw %]
1425 [% IF restriction.expiration %]
1426 [% restriction.expiration | $KohaDates %]
1431 <td>[% restriction.created | $KohaDates %]</td>
1432 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1434 <input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" />
1438 [% END # /FOREACH d %]
1442 <p>Patron is currently unrestricted.</p>
1443 [% END # /IF ( patron.restrictions.count ) %]
1445 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1446 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
1447 <fieldset id="manual_restriction_form">
1448 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1449 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1451 [% IF Koha.Preference('PatronRestrictionTypes') %]
1453 <label for="debarred_type">Type:</label>
1454 <select name="debarred_type">
1455 [% FOREACH restriction_type IN restriction_types %]
1456 [% IF !restriction_type.is_system %]
1457 [% IF restriction_type.is_default %]
1458 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
1460 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
1468 <label for="debarred_comment">Comment: </label>
1469 <input type="text" id="debarred_comment" name="debarred_comment" />
1472 <label for="debarred_expiration">Expiration: </label>
1473 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1474 <a href="#" id="clear_debarred_expiration">Clear date</a>
1478 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1480 </fieldset> <!-- /#manual_restriction_form -->
1481 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1482 </fieldset> <!-- /#memberentry_restrictions -->
1483 [% END # /UNLESS ( opadd || opduplicate ) %]
1484 [% END # /IF ( step_3 ) %]
1487 [% IF Koha.Preference('HouseboundModule') %]
1488 <fieldset class="rows" id="memberentry_housebound_roles">
1489 <legend id="housebound_roles">Housebound roles</legend>
1492 <label class="radio" for="housebound_chooser">
1495 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1496 <label for="yes_housebound_chooser">Yes </label>
1497 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1498 <label for="no_housebound_chooser">No </label>
1499 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1501 <label for="yes_housebound_chooser">Yes </label>
1502 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1503 <label for="no_housebound_chooser">No </label>
1504 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1508 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1509 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1510 <label for="yes_housebound_deliverer">Yes </label>
1511 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1512 <label for="no_housebound_deliverer">No </label>
1513 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1515 <label for="yes_housebound_deliverer">Yes </label>
1516 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1517 <label for="no_housebound_deliverer">No </label>
1518 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1521 </ol> <!-- /ol.radio -->
1522 </fieldset> <!-- /#memberentry_housebound_roles -->
1523 [% END # hide fieldset %]
1524 [% END # IF step_7 %]
1527 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1528 [% UNLESS ( no_patron_attribute_types ) %]
1529 <fieldset class="rows" id="memberentry_patron_attributes">
1530 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1531 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1532 [% FOREACH pa_loo IN patron_attributes %]
1533 <ol class="attributes_table">
1534 [% IF pa_loo.class %]
1535 <fieldset id="aai_[% pa_loo.class | html %]">
1536 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1538 [% FOREACH patron_attribute IN pa_loo.items %]
1539 <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1540 [% IF patron_attribute.mandatory %]
1541 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1543 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1545 [% IF ( patron_attribute.use_dropdown ) %]
1546 [% IF patron_attribute.mandatory %]
1547 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1549 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1551 <option value=""></option>
1552 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1553 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1554 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1555 [% auth_val_loo.lib | html %]
1558 <option value="[% auth_val_loo.authorised_value | html %]" >
1559 [% auth_val_loo.lib | html %]
1565 [% IF patron_attribute.mandatory %]
1566 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1568 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1570 [% END # /IF ( patron_attribute.use_dropdown ) %]
1571 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1572 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
1573 [% IF ( patron_attribute.repeatable ) %]
1574 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1576 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1578 [% END # /FOREACH patron_attribute %]
1579 [% IF pa_loo.class %]</fieldset>[% END %]
1581 [% END # /FOREACH pa_loo %]
1582 </fieldset> <!-- /#memberentry_patron_attributes -->
1583 [% END # UNLESS ( no_patron_attribute_types ) %]
1584 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1585 [% END # IF ( step_4 ) %]
1588 [% IF ( EnhancedMessagingPreferences ) %]
1589 <fieldset class="rows" id="memberentry_messaging_prefs">
1590 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1591 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1592 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1594 <input type="hidden" name="setting_messaging_prefs" value="1" />
1595 [% INCLUDE 'messaging-preference-form.inc' %]
1596 [% IF ( SMSSendDriver ) %]
1598 <label for="SMSnumber">SMS number:</label>
1599 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1600 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1602 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1604 <label for="sms_provider_id">SMS provider:</label>
1605 <select id="sms_provider_id" name="sms_provider_id">
1606 <option value="">Unknown</option>
1607 [% FOREACH s IN sms_providers %]
1608 [% IF s.id == borrower_data.sms_provider_id %]
1609 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1611 <option value="[% s.id | html %]">[% s.name | html %]</option>
1616 [% END # /UNLESS nosms_provider_id %]
1617 [% END # IF ( SMSSendDriver ) %]
1619 [% END # IF ( EnhancedMessagingPreferences ) %]
1620 [% END # /IF step_5 %]
1621 </form> <!-- /#entryform -->
1623 [% IF quickadd && opadd && !check_member %]
1624 <form id="quick_add_form" class="toggler">
1625 <fieldset class="rows quick_add"><legend>Quick add</legend>
1626 <ol id="quick_add_list">
1632 [% END # /UNLESS ( no_add ) %]
1634 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1636 [% UNLESS ( opadd ) %]
1637 <div class="col-sm-2 col-sm-pull-10">
1639 [% INCLUDE 'circ-menu.inc' %]
1641 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1643 </div> <!-- /.row -->
1645 [% MACRO jsinclude BLOCK %]
1646 [% Asset.js("lib/hc-sticky.js") | $raw %]
1647 [% INCLUDE 'calendar.inc' %]
1648 [% INCLUDE 'str/members-menu.inc' %]
1649 [% Asset.js("js/members-menu.js") | $raw %]
1651 function update_cardnumber_warning(size){
1652 var max_len = [% maxlength_cardnumber | html %];
1653 if ( size >= max_len ) {
1654 $("#cn_max").show();
1656 $("#cn_max").hide();
1660 function showHideFields(){
1661 [% UNLESS step == 1 %]
1662 [% IF fieldstohide.match('identity') %]
1663 $("#memberentry_identity").find('legend').nextAll().toggle();
1665 [% IF show_guarantor || guarantor %]
1666 [% IF fieldstohide.match('guarantor') %]
1667 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1668 $("#guarantor_template").toggle();
1671 [% IF fieldstohide.match('primary_address') %]
1672 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1674 [% IF fieldstohide.match('primary_contact') %]
1675 $("#memberentry_contact").find('legend').nextAll().toggle();
1678 [% UNLESS step == 6 %]
1679 [% IF fieldstohide.match('alt_address') %]
1680 $("#memberentry_address").find('legend').nextAll().toggle();
1683 [% UNLESS step == 2 %]
1684 [% IF fieldstohide.match('alt_contact') %]
1685 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1688 [% UNLESS step == 3 %]
1689 [% IF fieldstohide.match('lib_mgmt') %]
1690 $("#memberentry_library_management").find('legend').nextAll().toggle();
1692 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1693 [% IF fieldstohide.match('lib_setup') %]
1694 $("#memberentry_subscription").find('legend').nextAll().toggle();
1697 [% UNLESS nouserid && nopassword %]
1698 [% IF fieldstohide.match('login') %]
1699 $("#memberentry_userid").find('legend').nextAll().toggle();
1702 [% UNLESS ( opadd || opduplicate ) %]
1703 [% IF fieldstohide.match('flags') %]
1704 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1707 [% IF fieldstohide.match('debarments') %]
1708 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1711 [% UNLESS step == 7 %]
1712 [% IF Koha.Preference('HouseboundModule') %]
1713 [% IF fieldstohide.match('housebound') %]
1714 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1718 [% UNLESS step == 4 %]
1719 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1720 [% IF fieldstohide.match('additional') %]
1721 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1725 [% UNLESS step == 5 %]
1726 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1727 [% IF fieldstohide.match('messaging') %]
1728 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1729 $("#messaging_prefs_loading").toggle();
1735 $(document).ready(function() {
1737 $("#toggle_hidden_fields").change(function(){
1741 $("legend").click(function(){
1742 $(this).nextAll().toggle();
1743 $("#messaging_prefs_loading").hide();
1744 $("#guarantor_template").hide();
1747 $("#saverecord").css({ 'margin-left': 0 });
1749 Sticky = $("#toolbar");
1752 stickyClass: "floating"
1755 [% IF borrower_data.categorycode %]
1756 update_category_code( "[% borrower_data.categorycode | html %]" );
1758 if ( $("#categorycode_entry").length > 0 ){
1759 var category_code = $("#categorycode_entry").find("option:selected").val();
1760 update_category_code( category_code );
1764 [% IF new_guarantors %]
1765 [% FOREACH g IN new_guarantors %]
1766 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1770 $("#cn_max").hide();
1772 $("#cardnumber").on("keydown", function(e){
1773 content = $(this).val();
1775 $("#cardnumber").on("keyup", function(e){
1776 // .val() will return the value of the input after the key has been released
1777 var l = $(this).val().length;
1778 if ( l == content.length + 1 ) { l--; }
1779 update_cardnumber_warning(l);
1781 $("#cardnumber").bind("paste", function(e){
1782 var pastedData = e.originalEvent.clipboardData.getData('text');
1783 update_cardnumber_warning(pastedData.length - 1);
1785 var toggle_quick_add = $(".toggle_quick_add");
1786 $(toggle_quick_add).click(function(e){
1787 toggle_quick_add.toggle();
1790 var toggle_from = '';
1791 if( $("#entryform:visible").length ) {
1792 toggle_to = "#quick_add_form label";
1793 toggle_from = "#entryform label";
1794 $("#memberentry_guarantor").appendTo("#quick_add_form");
1796 toggle_to="#entryform label";
1797 toggle_from = "#quick_add_form label";
1798 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1800 $(toggle_from).each(function() {
1801 var input_label = $(this).attr('for');
1802 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1803 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1806 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1809 $(".toggler").toggle();
1812 $("#save_quick_add").click(function(){
1813 $("#quick_add_form").validate();
1814 if( $("#quick_add_form").valid()){
1815 $('.toggle_quick_add').click();
1816 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1817 $('#saverecord').click();
1819 else {return false;}
1822 $("#saverecord").click(function(){
1823 if( check_form_borrowers() ){
1824 $("#entryform").submit();
1828 $('#duplicate').on('click', function() {
1829 $("input[name='op']").val('modify');
1830 $("input[name='borrowernumber']").val('[% check_member | html %]');
1831 $("input[name='check_member']").val('');
1832 $('#entryform').submit();
1835 $('#not-duplicate').on('click', function() {
1836 $("input[name='nodouble']").val('1');
1837 $('#entryform').submit();
1840 $(".popup_patronview").on("click", function(e){
1842 var url = $(this).attr("href");
1843 openWindow( url, "patronview" );
1846 $("#dateofbirth").on("change", function(){
1850 $("#debarred_comment, #debarred_expiration").on("change", function(){
1851 $("#add_debarment").val(1);
1854 $("#clear_debarred_expiration").on("click", function(e){
1856 $('#debarred_expiration').val("");
1859 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1861 clear_entry( this );
1864 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1866 clone_entry( this );
1869 $("#categorycode_entry").on("change", function(){
1870 update_category_code(this);
1873 [% IF logged_in_user.borrowernumber == borrowernumber %]
1874 $("#userid").on("change", function(){
1875 $(this).parent().find("div.hint").remove();
1876 if ( "[% borrower_data.userid | html %]" != $(this).val() ) {
1877 $(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username")));
1884 [% IF quickadd && opadd && !check_member %]
1885 $(document).ready(function () {
1887 $("#entryform,#saverecord").hide();
1888 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1889 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1890 $("#entryform label").each(function () {
1891 var input_label = $(this).attr('for');
1892 if ( input_label == 'sex-female' ) {
1895 else if ( input_label == 'btitle' ) {
1896 input_label='title';
1898 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1899 let orig_li = $(this).parent();
1900 if( orig_li.attr('class') == 'radio' ){
1901 let new_field = orig_li.clone();
1902 new_field.children('label').each(function(){
1903 let child_input = $(this).children('input');
1904 child_input.attr("id",child_input.attr("id") + "_quick_add");
1906 new_field.appendTo("#quick_add_list");
1908 let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1909 let new_field = orig_li.clone();
1910 new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1911 new_field.appendTo("#quick_add_list");
1912 [% UNLESS mandatorypassword %]
1913 if( input_label == 'password' ){
1914 let orig_p2 = $("#entryform label[for='password2']").parent();
1915 let new_p2 = orig_p2.clone();
1916 new_p2.find('input[id="password2"]').attr("id","password2_quick_add");
1917 new_p2.appendTo("#quick_add_list");
1923 if ( $("#memberentry_guarantor").length ) {
1924 $("#memberentry_guarantor").appendTo("#quick_add_form");
1926 $("#quick_add_form").show();
1927 $("#quick_add_form").find(".flatpickr:hidden").each( (i, input) => {
1928 $(input).siblings(".flatpickr_wrapper").remove(); // Remove leftover from the previous flatpickr that has been cloned
1929 apply_flatpickr(input);
1933 $("#guarantor_template").hide();
1935 var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1936 var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1939 [% Asset.js("js/members.js") | $raw %]
1940 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1941 [% 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 %]
1944 [% INCLUDE 'intranet-bottom.inc' %]