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" />
1031 <label for="protected">Protected:</label>
1032 [% IF ( patron.protected == 1 ) %]
1033 <label for="yes-protected">
1035 <input type="radio" id="yes-protected" name="protected" value="1" checked="checked" />
1037 <label for="no-protected">
1039 <input type="radio" id="no-protected" name="protected" value="0" />
1042 <label for="yes-protected">
1044 <input type="radio" id="yes-protected" name="protected" value="1" />
1046 <label for="no-protected">
1048 <input type="radio" id="no-protected" name="protected" value="0" checked="checked" />
1053 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1055 <label for="checkprevcheckout">Check for previous checkouts: </label>
1056 <select name="checkprevcheckout" id="checkprevcheckout">
1057 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1058 <option value="yes" selected="selected">Yes if settings allow it</option>
1059 <option value="no">No if settings allow it</option>
1060 <option value="inherit">Inherit from settings</option>
1061 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1062 <option value="yes">Yes if settings allow it</option>
1063 <option value="no" selected="selected">No if settings allow it</option>
1064 <option value="inherit">Inherit from settings</option>
1066 <option value="yes">Yes if settings allow it</option>
1067 <option value="no">No if settings allow it</option>
1068 <option value="inherit" selected="selected">Inherit from settings</option>
1072 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1074 [% IF Koha.Preference('TranslateNotices') %]
1076 <label for="lang">Preferred language for notices: </label>
1077 <select id="lang" name="lang">
1078 <option value="default">Default</option>
1079 [% FOR language IN languages %]
1080 [% FOR sublanguage IN language.sublanguages_loop %]
1081 [% IF language.plural %]
1082 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1083 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1085 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1088 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1089 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1091 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1093 [% END # /IF language.plural %]
1094 [% END # /FOR sublanguage %]
1095 [% END #/FOR language %]
1096 </select> <!-- /#lang -->
1098 [% END #/IF Koha.Preference('TranslateNotices') %]
1100 </fieldset> <!-- /#memberentry_library_management -->
1102 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1103 <fieldset class="rows" id="memberentry_subscription">
1104 <legend id="library_setup_lgd">Library setup</legend><ol>
1105 [% UNLESS nodateenrolled %]
1107 [% IF ( mandatorydateenrolled ) %]
1108 <label for="from" class="required">
1114 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1115 [% IF ( mandatorydateenrolled ) %]
1116 <span class="required">Required</span>
1118 [% IF ( ERROR_dateenrolled ) %]
1119 <span class="required">(Error)</span>
1121 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1123 [% END # /UNLESS nodateenrolled %]
1125 [% UNLESS nodateexpiry %]
1128 <li style="display:none">
1130 [% IF ( mandatorydateexpiry ) %]
1131 <label for="to" class="required">
1135 Expiry date (leave blank for auto calc):
1137 [% UNLESS ( opadd ) %]
1138 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1140 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1142 [% IF ( mandatorydateexpiry ) %]
1143 <span class="required">Required</span>
1145 [% IF ( ERROR_dateexpiry ) %]
1146 <span class="required">(Error)</span>
1148 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1151 [% UNLESS noopacnote %]
1153 [% IF ( mandatoryopacnote ) %]
1154 <label for="opacnote" class="required">
1156 <label for="opacnote">
1160 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1161 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1162 [% IF ( mandatoryopacnote ) %]
1163 <span class="required">Required</span>
1166 [% END # /UNLESS noopacnote %]
1168 [% UNLESS noborrowernotes %]
1170 [% IF ( mandatoryborrowernotes ) %]
1171 <label for="borrowernotes" class="required">
1173 <label for="borrowernotes">
1177 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS opduplicate %]</textarea>
1178 <div class="hint">This message displays when checking out to this patron</div>
1179 [% IF ( mandatoryborrowernotes ) %]
1180 <span class="required">Required</span>
1183 [% END # /UNLESS noborrowernotes %]
1185 </fieldset> <!-- /#memberentry_subscription -->
1186 [% END # hide fieldset %]
1188 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1189 <fieldset class="rows" id="memberentry_userid">
1190 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1192 [% UNLESS nouserid %]
1194 [% IF ( mandatoryuserid ) %]
1195 <label for="userid" class="required">
1197 <label for="userid">
1202 [% IF ( NoUpdateLogin ) %]
1203 [% IF ( opduplicate ) %]
1204 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1206 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1209 [% IF ( opduplicate ) %]
1210 <input type="text" id="userid" name="userid" size="20" value="" />
1212 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1214 [% END # /IF ( NoUpdateLogin ) %]
1216 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1217 <input type="text" disabled="disabled" style="display:none" />
1219 [% IF ( mandatoryuserid ) %]
1220 <span class="required">Required</span>
1223 [% END # /UNLESS nouserid %]
1225 [% UNLESS nopassword %]
1227 [% IF ( mandatorypassword ) %]
1228 <label for="password" class="required">
1230 <label for="password">
1235 [% IF ( NoUpdateLogin ) %]
1236 [% IF ( opduplicate ) %]
1237 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1239 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1242 [% IF ( opduplicate ) %]
1243 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1245 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1247 [% END # /IF ( NoUpdateLogin ) %]
1248 [% ELSE # IF ( opadd ) %]
1250 [% IF ( borrower_data.password ) %]
1251 [% IF ( NoUpdateLogin ) %]
1252 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1254 [% IF ( opduplicate ) %]
1255 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1257 <input type="password" id="password" name="password" size="20" value="****" />
1261 [% IF ( NoUpdateLogin ) %]
1262 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1264 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1266 [% END # /IF ( password ) %]
1267 [% END # /IF ( opadd ) %]
1268 [% IF ( mandatorypassword ) %]
1269 <span class="required">Required</span>
1271 [% IF ( ERROR_password_too_short ) %]
1272 <span class="required">Password is too short</span>
1274 [% IF ( ERROR_password_too_weak ) %]
1275 <span class="required">Password is too weak</span>
1277 [% IF ( ERROR_password_has_whitespaces ) %]
1278 <span class="required">Password has leading or trailing whitespaces</span>
1280 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1284 [% IF ( mandatorypassword ) %]
1285 <label for="password2" class="required">
1287 <label for="password2">
1292 [% IF ( NoUpdateLogin ) %]
1293 [% IF ( opduplicate ) %]
1294 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1296 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1299 [% IF ( opduplicate ) %]
1300 <input type="password" id="password2" name="password2" size="20" />
1302 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1305 [% ELSE # IF ( opadd ) %]
1306 [% IF ( borrower_data.password ) %]
1307 [% IF ( NoUpdateLogin ) %]
1308 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1310 [% IF ( opduplicate ) %]
1311 <input type="password" id="password2" name="password2" size="20" />
1313 <input type="password" id="password2" name="password2" size="20" value="****" />
1317 [% IF ( NoUpdateLogin ) %]
1318 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1320 <input type="password" id="password2" name="password2" size="20" value="" />
1323 [% END # /IF ( opadd ) %]
1325 [% IF ( mandatorypassword ) %]
1326 <span class="required">Required</span>
1328 [% IF ( ERROR_password_mismatch ) %]
1329 <span class="required">Passwords do not match</span>
1332 [% END # /UNLESS nopassword %]
1333 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1335 <label for="password_expiration_date">Password expiration date:</label>
1336 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1340 </fieldset> <!-- /#memberentry_userid -->
1341 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1343 <!--this zones are not necessary in modif mode -->
1344 [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1345 <fieldset class="rows" id="memberentry_account_flags">
1346 <legend id="account_flags_lgd">Patron account flags</legend>
1347 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1349 [% UNLESS nogonenoaddress %]
1351 [% IF mandatorygonenoaddress %]
1352 <label class="radio required" for="yesgonenoaddress">
1354 <label class="radio" for="yesgonenoaddress">
1358 [% IF CAN_user_circulate_manage_restrictions %]
1359 <label for="yesgonenoaddress">
1360 [% IF ( borrower_data.gonenoaddress ) %]
1361 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1363 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1367 <label for="nogonenoaddress">
1368 [% IF ( borrower_data.gonenoaddress ) %]
1369 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1371 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1376 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1377 [% END # /IF CAN_user_circulate_manage_restrictions %]
1378 [% IF mandatorygonenoaddress %]
1379 <span class="required">Required</span>
1383 [% END # /UNLESS nogonenoaddress %]
1386 [% IF mandatorylost %]
1387 <label class="radio required" for="yeslost">
1389 <label class="radio" for="yeslost">
1393 [% IF CAN_user_circulate_manage_restrictions %]
1394 <label for="yeslost">
1395 [% IF ( borrower_data.lost ) %]
1396 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1398 <input type="radio" id="yeslost" name="lost" value="1" />
1402 <label for="nolost">
1403 [% IF ( borrower_data.lost ) %]
1404 <input type="radio" id="nolost" name="lost" value="0" />
1406 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1411 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1412 [% END # /IF CAN_user_circulate_manage_restrictions %]
1413 [% IF mandatorylost %]
1414 <span class="required">Required</span>
1417 [% END # /UNLESS nogonenoaddress %]
1419 </fieldset> <!-- /#memberentry_account_flags -->
1421 <fieldset class="rows" id="memberentry_restrictions">
1422 <legend id="restrictions_lgd">Patron restrictions</legend>
1423 [% IF ( patron.restrictions.count ) %]
1430 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1431 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1437 [% FOREACH restriction IN patron.restrictions %]
1439 <td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
1441 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
1442 Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]
1444 [% restriction.comment | $raw %]
1448 [% IF restriction.expiration %]
1449 [% restriction.expiration | $KohaDates %]
1454 <td>[% restriction.created | $KohaDates %]</td>
1455 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1457 <input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" />
1461 [% END # /FOREACH d %]
1465 <p>Patron is currently unrestricted.</p>
1466 [% END # /IF ( patron.restrictions.count ) %]
1468 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1469 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
1470 <fieldset id="manual_restriction_form">
1471 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1472 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1474 [% IF Koha.Preference('PatronRestrictionTypes') %]
1476 <label for="debarred_type">Type:</label>
1477 <select name="debarred_type">
1478 [% FOREACH restriction_type IN restriction_types %]
1479 [% IF !restriction_type.is_system %]
1480 [% IF restriction_type.is_default %]
1481 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
1483 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
1491 <label for="debarred_comment">Comment: </label>
1492 <input type="text" id="debarred_comment" name="debarred_comment" />
1495 <label for="debarred_expiration">Expiration: </label>
1496 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1497 <a href="#" id="clear_debarred_expiration">Clear date</a>
1501 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1503 </fieldset> <!-- /#manual_restriction_form -->
1504 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1505 </fieldset> <!-- /#memberentry_restrictions -->
1506 [% END # /IF ( step_3 ) %]
1509 [% IF Koha.Preference('HouseboundModule') %]
1510 <fieldset class="rows" id="memberentry_housebound_roles">
1511 <legend id="housebound_roles">Housebound roles</legend>
1514 <label class="radio" for="housebound_chooser">
1517 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1518 <label for="yes_housebound_chooser">Yes </label>
1519 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1520 <label for="no_housebound_chooser">No </label>
1521 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1523 <label for="yes_housebound_chooser">Yes </label>
1524 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1525 <label for="no_housebound_chooser">No </label>
1526 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1530 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1531 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1532 <label for="yes_housebound_deliverer">Yes </label>
1533 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1534 <label for="no_housebound_deliverer">No </label>
1535 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1537 <label for="yes_housebound_deliverer">Yes </label>
1538 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1539 <label for="no_housebound_deliverer">No </label>
1540 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1543 </ol> <!-- /ol.radio -->
1544 </fieldset> <!-- /#memberentry_housebound_roles -->
1545 [% END # hide fieldset %]
1546 [% END # IF step_7 %]
1549 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1550 [% UNLESS ( no_patron_attribute_types ) %]
1551 <fieldset class="rows" id="memberentry_patron_attributes">
1552 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1553 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1554 [% FOREACH pa_loo IN patron_attributes %]
1555 <ol class="attributes_table">
1556 [% IF pa_loo.class %]
1557 <fieldset id="aai_[% pa_loo.class | html %]">
1558 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1560 [% FOREACH patron_attribute IN pa_loo.items %]
1561 <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1562 [% IF patron_attribute.mandatory %]
1563 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1565 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1567 [% IF ( patron_attribute.use_dropdown ) %]
1568 [% IF patron_attribute.mandatory %]
1569 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1571 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1573 <option value=""></option>
1574 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1575 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1576 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1577 [% auth_val_loo.lib | html %]
1580 <option value="[% auth_val_loo.authorised_value | html %]" >
1581 [% auth_val_loo.lib | html %]
1587 [% IF patron_attribute.mandatory %]
1588 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1590 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1592 [% END # /IF ( patron_attribute.use_dropdown ) %]
1593 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1594 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
1595 [% IF ( patron_attribute.repeatable ) %]
1596 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1598 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1600 [% END # /FOREACH patron_attribute %]
1601 [% IF pa_loo.class %]</fieldset>[% END %]
1603 [% END # /FOREACH pa_loo %]
1604 </fieldset> <!-- /#memberentry_patron_attributes -->
1605 [% END # UNLESS ( no_patron_attribute_types ) %]
1606 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1607 [% END # IF ( step_4 ) %]
1610 [% IF ( EnhancedMessagingPreferences ) %]
1611 <fieldset class="rows" id="memberentry_messaging_prefs">
1612 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1613 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1614 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1616 <input type="hidden" name="setting_messaging_prefs" value="1" />
1617 [% INCLUDE 'messaging-preference-form.inc' %]
1618 [% IF ( SMSSendDriver ) %]
1620 <label for="SMSnumber">SMS number:</label>
1621 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1622 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1624 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1626 <label for="sms_provider_id">SMS provider:</label>
1627 <select id="sms_provider_id" name="sms_provider_id">
1628 <option value="">Unknown</option>
1629 [% FOREACH s IN sms_providers %]
1630 [% IF s.id == borrower_data.sms_provider_id %]
1631 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1633 <option value="[% s.id | html %]">[% s.name | html %]</option>
1638 [% END # /UNLESS nosms_provider_id %]
1639 [% END # IF ( SMSSendDriver ) %]
1641 [% END # IF ( EnhancedMessagingPreferences ) %]
1642 [% END # /IF step_5 %]
1643 </form> <!-- /#entryform -->
1645 [% IF quickadd && opadd && !check_member %]
1646 <form id="quick_add_form" class="toggler">
1647 <fieldset class="rows quick_add"><legend>Quick add</legend>
1648 <ol id="quick_add_list">
1654 [% END # /UNLESS ( no_add ) %]
1656 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1658 [% UNLESS ( opadd ) %]
1659 <div class="col-sm-2 col-sm-pull-10">
1661 [% INCLUDE 'circ-menu.inc' %]
1663 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1665 </div> <!-- /.row -->
1667 [% MACRO jsinclude BLOCK %]
1668 [% Asset.js("lib/hc-sticky.js") | $raw %]
1669 [% INCLUDE 'calendar.inc' %]
1670 [% INCLUDE 'str/members-menu.inc' %]
1671 [% Asset.js("js/members-menu.js") | $raw %]
1673 function update_cardnumber_warning(size){
1674 var max_len = [% maxlength_cardnumber | html %];
1675 if ( size >= max_len ) {
1676 $("#cn_max").show();
1678 $("#cn_max").hide();
1682 function showHideFields(){
1683 [% UNLESS step == 1 %]
1684 [% IF fieldstohide.match('identity') %]
1685 $("#memberentry_identity").find('legend').nextAll().toggle();
1687 [% IF show_guarantor || guarantor %]
1688 [% IF fieldstohide.match('guarantor') %]
1689 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1690 $("#guarantor_template").toggle();
1693 [% IF fieldstohide.match('primary_address') %]
1694 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1696 [% IF fieldstohide.match('primary_contact') %]
1697 $("#memberentry_contact").find('legend').nextAll().toggle();
1700 [% UNLESS step == 6 %]
1701 [% IF fieldstohide.match('alt_address') %]
1702 $("#memberentry_address").find('legend').nextAll().toggle();
1705 [% UNLESS step == 2 %]
1706 [% IF fieldstohide.match('alt_contact') %]
1707 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1710 [% UNLESS step == 3 %]
1711 [% IF fieldstohide.match('lib_mgmt') %]
1712 $("#memberentry_library_management").find('legend').nextAll().toggle();
1714 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1715 [% IF fieldstohide.match('lib_setup') %]
1716 $("#memberentry_subscription").find('legend').nextAll().toggle();
1719 [% UNLESS nouserid && nopassword %]
1720 [% IF fieldstohide.match('login') %]
1721 $("#memberentry_userid").find('legend').nextAll().toggle();
1724 [% UNLESS ( opadd || opduplicate ) %]
1725 [% IF fieldstohide.match('flags') %]
1726 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1729 [% IF fieldstohide.match('debarments') %]
1730 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1733 [% UNLESS step == 7 %]
1734 [% IF Koha.Preference('HouseboundModule') %]
1735 [% IF fieldstohide.match('housebound') %]
1736 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1740 [% UNLESS step == 4 %]
1741 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1742 [% IF fieldstohide.match('additional') %]
1743 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1747 [% UNLESS step == 5 %]
1748 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1749 [% IF fieldstohide.match('messaging') %]
1750 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1751 $("#messaging_prefs_loading").toggle();
1757 $(document).ready(function() {
1759 $("#toggle_hidden_fields").change(function(){
1763 $("legend").click(function(){
1764 $(this).nextAll().toggle();
1765 $("#messaging_prefs_loading").hide();
1766 $("#guarantor_template").hide();
1769 $("#saverecord").css({ 'margin-left': 0 });
1771 Sticky = $("#toolbar");
1774 stickyClass: "floating"
1777 [% IF borrower_data.categorycode %]
1778 update_category_code( "[% borrower_data.categorycode | html %]" );
1780 if ( $("#categorycode_entry").length > 0 ){
1781 var category_code = $("#categorycode_entry").find("option:selected").val();
1782 update_category_code( category_code );
1786 [% IF new_guarantors %]
1787 [% FOREACH g IN new_guarantors %]
1788 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1792 $("#cn_max").hide();
1794 $("#cardnumber").on("keydown", function(e){
1795 content = $(this).val();
1797 $("#cardnumber").on("keyup", function(e){
1798 // .val() will return the value of the input after the key has been released
1799 var l = $(this).val().length;
1800 if ( l == content.length + 1 ) { l--; }
1801 update_cardnumber_warning(l);
1803 $("#cardnumber").bind("paste", function(e){
1804 var pastedData = e.originalEvent.clipboardData.getData('text');
1805 update_cardnumber_warning(pastedData.length - 1);
1807 var toggle_quick_add = $(".toggle_quick_add");
1808 $(toggle_quick_add).click(function(e){
1809 toggle_quick_add.toggle();
1812 var toggle_from = '';
1813 if( $("#entryform:visible").length ) {
1814 toggle_to = "#quick_add_form label";
1815 toggle_from = "#entryform label";
1816 $("#memberentry_guarantor").appendTo("#quick_add_form");
1818 toggle_to="#entryform label";
1819 toggle_from = "#quick_add_form label";
1820 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1822 $(toggle_from).each(function() {
1823 var input_label = $(this).attr('for');
1824 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1825 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1828 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1831 $(".toggler").toggle();
1834 $("#save_quick_add").click(function(){
1835 $("#quick_add_form").validate();
1836 if( $("#quick_add_form").valid()){
1837 $('.toggle_quick_add').click();
1838 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1839 $('#saverecord').click();
1841 else {return false;}
1844 $("#saverecord").click(function(){
1845 if( check_form_borrowers() ){
1846 $("#entryform").submit();
1850 $('#duplicate').on('click', function() {
1851 $("input[name='op']").val('modify');
1852 $("input[name='borrowernumber']").val('[% check_member | html %]');
1853 $("input[name='check_member']").val('');
1854 $('#entryform').submit();
1857 $('#not-duplicate').on('click', function() {
1858 $("input[name='nodouble']").val('1');
1859 $('#entryform').submit();
1862 $(".popup_patronview").on("click", function(e){
1864 var url = $(this).attr("href");
1865 openWindow( url, "patronview" );
1868 $("#dateofbirth").on("change", function(){
1872 $("#debarred_comment, #debarred_expiration").on("change", function(){
1873 $("#add_debarment").val(1);
1876 $("#clear_debarred_expiration").on("click", function(e){
1878 $('#debarred_expiration').val("");
1881 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1883 clear_entry( this );
1886 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1888 clone_entry( this );
1891 $("#categorycode_entry").on("change", function(){
1892 update_category_code(this);
1895 [% IF logged_in_user.borrowernumber == borrowernumber %]
1896 $("#userid").on("change", function(){
1897 $(this).parent().find("div.hint").remove();
1898 if ( "[% borrower_data.userid | html %]" != $(this).val() ) {
1899 $(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username")));
1906 [% IF quickadd && opadd && !check_member %]
1907 $(document).ready(function () {
1909 $("#entryform,#saverecord").hide();
1910 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1911 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1912 $("#entryform label").each(function () {
1913 var input_label = $(this).attr('for');
1914 if ( input_label == 'sex-female' ) {
1917 else if ( input_label == 'btitle' ) {
1918 input_label='title';
1920 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1921 let orig_li = $(this).parent();
1922 if( orig_li.attr('class') == 'radio' ){
1923 let new_field = orig_li.clone();
1924 new_field.children('label').each(function(){
1925 let child_input = $(this).children('input');
1926 child_input.attr("id",child_input.attr("id") + "_quick_add");
1928 new_field.appendTo("#quick_add_list");
1930 let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1931 let new_field = orig_li.clone();
1932 new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1933 new_field.appendTo("#quick_add_list");
1934 [% UNLESS mandatorypassword %]
1935 if( input_label == 'password' ){
1936 let orig_p2 = $("#entryform label[for='password2']").parent();
1937 let new_p2 = orig_p2.clone();
1938 new_p2.find('input[id="password2"]').attr("id","password2_quick_add");
1939 new_p2.appendTo("#quick_add_list");
1945 if ( $("#memberentry_guarantor").length ) {
1946 $("#memberentry_guarantor").appendTo("#quick_add_form");
1948 $("#quick_add_form").show();
1949 $("#quick_add_form").find(".flatpickr:hidden").each( (i, input) => {
1950 $(input).siblings(".flatpickr_wrapper").remove(); // Remove leftover from the previous flatpickr that has been cloned
1951 apply_flatpickr(input);
1955 $("#guarantor_template").hide();
1957 var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1958 var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1961 [% Asset.js("js/members.js") | $raw %]
1962 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1963 [% 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 %]
1966 [% INCLUDE 'intranet-bottom.inc' %]