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 [% PROCESS 'patron-search.inc' %]
14 [% INCLUDE 'doc-head-open.inc' %]
15 <title>[% FILTER collapse %]
16 [% UNLESS blocking_error %]
17 [% IF ( op == 'add_form' ) %]
18 [% t("Add patron") | html %]
20 [% t("Modify patron") | html %]
22 [% INCLUDE 'patron-title.inc' no_html = 1 %]
23 [% IF patron_category %]([% patron_category.description | html %])[% END %]
25 [% t("Patrons") | html %] ›
26 [% t("Koha") | html %]
33 [% INCLUDE 'doc-head-close.inc' %]
36 <body id="pat_memberentrygen" class="pat">
37 [% WRAPPER 'header.inc' %]
38 [% INCLUDE 'patron-search-header.inc' %]
41 [% WRAPPER 'sub-header.inc' %]
42 [% WRAPPER breadcrumbs %]
43 [% WRAPPER breadcrumb_item %]
44 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
46 [% UNLESS blocking_error %]
47 [% UNLESS op == 'add_form' %]
48 [% IF (borrower_data.firstname || borrower_data.surname ) %]
49 [% WRAPPER breadcrumb_item %]
50 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
51 [% INCLUDE 'patron-title.inc' %]
57 [% WRAPPER breadcrumb_item bc_active= 1 %]
58 [% IF ( op == 'add_form' ) %]
59 <span>Add patron</span>
61 <span>Modify patron</span>
63 [% IF patron_category %]
64 ([% patron_category.description | html %])
67 [% END #/ WRAPPER breadcrumbs %]
68 [% END #/ WRAPPER sub-header.inc %]
70 <div class="main container-fluid">
72 [% IF borrower_data.messages %]
73 [% FOR message IN borrower_data.messages %]
74 [% SWITCH message.error %]
75 [% CASE 'error_on_insert_patron' %]
76 <div class="dialog alert">Something went wrong when creating the patron. Check the logs for details.</div>
77 [% CASE 'error_on_update_patron' %]
78 <div class="dialog alert">Something went wrong when updating the patron. Check the logs for details.</div>
79 [% CASE %]<div class="dialog alert">Unhandled error: [% message.error | html %]</div>
83 [% IF ( op == 'add_form' ) %]
84 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
86 <div class="col-sm-10 col-sm-push-2">
88 <main class="clearfix">
89 [% INCLUDE 'messages.inc' %]
92 [% IF ( error_alert == "no_email" ) %]
93 <div class="dialog alert">This member has no email</div>
95 <div class="dialog alert">[% error_alert | html %]</div>
99 <div class="dialog message">Email has been sent.</div>
102 [% INCLUDE 'noadd-warnings.inc' %]
104 [% UNLESS ( no_add ) %]
106 [% IF ( op == 'add_form' ) %]
107 <span>Add patron</span>
108 [% ELSIF ( op == 'duplicate' ) %]
109 <span>Duplicate patron</span>
111 <span>Modify patron</span>
113 [% INCLUDE 'patron-title.inc' %]
114 [% IF patron_category %]([% patron_category.description | html %])[% END %]
117 [% IF quickadd && op == 'add_form' && !check_member %]
118 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
119 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
122 [% IF ( check_member ) %]
123 <div class="dialog alert">
124 <h3>Duplicate patron record?</h3>
125 <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>
126 <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>
127 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
132 <div class="dialog alert">
133 <p>The following fields are wrong. Please fix them.</p>
135 [% IF ( ERROR_login_exist ) %]
136 <li id="ERROR_login_exist">Username already exists or could not create unique new one.</li>
138 [% IF ERROR_cardnumber_already_exists %]
139 <li id="ERROR_cardnumber">Card number already in use.</li>
141 [% IF ERROR_cardnumber_length %]
142 <li id="ERROR_cardnumber">Card number length is incorrect.</li>
144 [% IF ( ERROR_age_limitations ) %]
145 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
146 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
148 [% IF ( ERROR_branch ) %]
149 <li id="ERROR_branch">Library is invalid.</li>
151 [% IF ( ERROR_dateofbirth ) %]
152 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
154 [% IF ( ERROR_dateenrolled ) %]
155 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
157 [% IF ( ERROR_dateexpiry ) %]
158 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
160 [% IF ( ERROR_password_too_short ) %]
161 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
163 [% IF ( ERROR_password_too_weak ) %]
164 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
166 [% IF ( ERROR_password_has_whitespaces ) %]
167 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
169 [% IF ( ERROR_password_mismatch ) %]
170 <li id="ERROR_password_mismatch">Passwords do not match.</li>
172 [% IF ( ERROR_password_expiration_date ) %]
173 <li id="ERROR_dateexpiry">Password expiration date is invalid.</li>
175 [% IF ( ERROR_extended_unique_id_failed ) %]
176 <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>
178 [% IF ERROR_bad_email %]
179 <li id="ERROR_bad_email">The primary email is invalid.</li>
181 [% IF ERROR_bad_email_secondary %]
182 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
184 [% IF ERROR_bad_email_alternative %]
185 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
187 [% IF ( ERROR_child_no_guarantor ) %]
188 <li id="ERROR_child_no_guarantor">A child patron needs a guarantor.</li>
190 [% IF ( ERROR_guarantor_is_guarantee ) %]
191 <li id="ERROR_guarantor_is_guarantee">A guarantor cannot be a guarantee.</li>
193 [% IF ( ERROR_cannot_delete_guarantor ) %]
194 <li id="ERROR_cannot_delete_guarantor">Cannot delete guarantor(s). A child patron needs a guarantor.</li>
200 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
201 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
203 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
204 [% FOREACH field IN fieldstohide.split(',') %]
206 [% CASE 'identity' %] <span>Patron identity</span> |
207 [% CASE 'guarantor' %] <span>Guarantor information</span> |
208 [% CASE 'nonpatron_guarantor' %] <span>Non-patron guarantor</span> |
209 [% CASE 'primary_address' %] <span>Main address</span> |
210 [% CASE 'primary_contact' %] <span>Contact information</span> |
211 [% CASE 'alt_address' %] <span>Alternate address</span> |
212 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
213 [% CASE 'lib_mgmt' %] <span>Library management</span> |
214 [% CASE 'lib_setup' %] <span>Library setup</span> |
215 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
216 [% CASE 'flags' %] <span>Patron account flags</span> |
217 [% CASE 'debarments' %] <span>Patron restrictions</span> |
218 [% CASE 'housebound' %][% IF Koha.Preference('HouseboundModule')%] <span>Housebound roles</span> |[% END %]
219 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
220 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
226 [% UNLESS ( check_member ) %]
227 <div id="toolbar" class="btn-toolbar">
228 [% IF quickadd && op == 'add_form' %]
229 <button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
231 <button class="btn btn-primary toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
232 [% IF op == 'add_form' %]
233 <a class="btn btn-link" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
235 <a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
237 <i class="fa fa-times"></i> Cancel
242 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
243 [% UNLESS ( check_member ) %]
244 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
246 <!-- field always hidden in different form (1,2,3) -->
247 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
248 <input type="hidden" name="updtype" value="[% updtype | html %]" />
249 <input type="hidden" name="destination" value="[% destination | html %]" />
250 <input type="hidden" name="check_member" value="[% check_member | html %]" />
251 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS op == 'duplicate' %]" />
252 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS op == 'duplicate' %]" />
253 [% INCLUDE 'csrf-token.inc' %]
255 <input type="hidden" name="step" value="[% step | html %]" />
257 [% IF ( op == 'add_form' ) %]
258 <input type="hidden" name="op" value="cud-insert" />
259 [% ELSIF ( op == 'duplicate' ) %]
260 <input type="hidden" name="op" value="cud-insert" />
262 <input type="hidden" name="op" value="cud-save" />
263 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
264 [%# Only put the card number if we arent showing it in the form later %]
265 [% IF borrower_data.cardnumber %]
266 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
272 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
273 <fieldset class="rows" id="memberentry_identity">
274 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span></legend>
276 [% UNLESS ( patron_category.category_type == 'I' ) %]
278 [% IF Koha.Preference('BorrowersTitles') %]
280 [% IF ( mandatorytitle ) %]
281 <label for="btitle" class="required">
286 <select id="btitle" name="title">
287 <option value=""></option>
288 [% FOREACH patron_title IN Koha.Preference('BorrowersTitles').split('\|') %]
289 [% IF btitle == patron_title %]
290 <option value="[% patron_title | html %]" selected="selected">[% patron_title | html %]</option>
292 <option value="[% patron_title | html %]">[% patron_title | html %]</option>
296 [% IF ( mandatorytitle ) %]
297 <span class="required">Required</span>
300 [% END # /IF Koha.Preference('BorrowersTitles') %]
301 [% END # /UNLESS notitle %]
302 [% END # /UNLESS ( I ) %]
304 [% UNLESS nosurname %]
306 [% IF ( patron_category.category_type == 'I' ) %]
307 <label for="surname" class="required">
311 [% IF ( mandatorysurname ) %]
312 <label for="surname" class="required">
314 <label for="surname">
319 [% IF ( uppercasesurnames ) %]
320 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
322 <input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
324 [% IF ( mandatorysurname ) %]
325 <span class="required">Required</span>
328 [% END # /UNLESS nosurname %]
330 [% UNLESS ( patron_category.category_type == 'I' ) %]
331 [% UNLESS nofirstname %]
333 [% IF ( mandatoryfirstname ) %]
334 <label for="firstname" class="required">
336 <label for="firstname">
340 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS op == 'duplicate' %]" />
341 [% IF ( mandatoryfirstname ) %]
342 <span class="required">Required</span>
345 [% END #/UNLESS nofirstname %]
346 [% UNLESS nomiddle_name %]
348 [% IF ( mandatorymiddle_name ) %]
349 <label for="middle_name" class="required">
351 <label for="middle_name">
355 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS op == 'duplicate' %]" />
356 [% IF ( mandatorymiddle_name ) %]
357 <span class="required">Required</span>
360 [% END #/UNLESS nomiddle_name %]
361 [% UNLESS nodateofbirth %]
363 [% IF ( mandatorydateofbirth ) %]
364 <label for="dateofbirth" class="required">
366 <label for="dateofbirth">
370 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS op == 'duplicate' %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
371 [% IF ( mandatorydateofbirth ) %]
372 <span class="required">Required</span>
374 [% IF ( ERROR_dateofbirth ) %]
375 <span class="required">(Error)</span>
377 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
379 [% END # /UNLESS nodateofbirth %]
380 [% UNLESS noinitials %]
382 [% IF ( mandatoryinitials ) %]
383 <label for="initials" class="required">
385 <label for="initials">
389 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS op == 'duplicate' %]" />
390 [% IF ( mandatoryinitials ) %]
391 <span class="required">Required</span>
394 [% END # /UNLESS noinitials %]
395 [% UNLESS nopronouns %]
397 [% IF ( mandatorypronouns ) %]
398 <label for="pronouns" class="required">
400 <label for="pronouns">
404 <input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS op == 'duplicate' %]" />
405 [% IF ( mandatorypronouns ) %]
406 <span class="required">Required</span>
409 [% END # /UNLESS nopronouns %]
410 [% END #/UNLESS ( I ) %]
411 [% UNLESS noothernames %]
413 [% IF ( mandatoryothernames ) %]
414 <label for="othernames" class="required">
416 <label for="othernames">
420 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS op == 'duplicate' %]" />
421 [% IF ( mandatoryothernames ) %]
422 <span class="required">Required</span>
424 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
426 [% END #/UNLESS noothernames %]
428 [% UNLESS ( patron_category.category_type == 'I' ) %]
431 [% UNLESS ( op == 'duplicate' ) %]
433 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
435 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
438 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
440 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
443 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
445 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
448 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
450 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
453 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
454 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
455 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
456 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
457 [% END # /UNLESS ( op == 'duplicate' )%]
459 [% END # /UNLESS nosex %]
460 [% END # /UNLESS ( I ) %]
462 </fieldset> <!-- /#memberentry_identity -->
463 [% END # hide fieldset %]
465 [% IF show_guarantor || guarantor %]
466 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
467 <div id="memberentry_guarantor_anchor">
468 <fieldset id="memberentry_guarantor" class="rows">
469 <legend>Patron guarantor</legend>
471 <div id="guarantor_relationships">
472 [% FOREACH r IN relationships %]
475 [% IF patron_category.category_type == 'I' %]
476 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
477 <span class="label">Organization:</span>
478 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
481 <span class="label">Relationship:</span>
482 <span>[% r.relationship | html %]</span>
485 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
486 <span class="label">Guarantor:</span>
487 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
490 <span class="label">Relationship:</span>
491 <span>[% r.relationship | html %]</span>
495 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
496 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
501 [% END # END relationships foreach %]
502 [% IF guarantor && (!relationships) %]
503 <fieldset class="guarantor">
505 <li class="guarantor-details" data-borrowernumber="0">
506 <span class="label">Guarantor:</span>
507 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
508 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
511 [% IF possible_relationships %]
513 [% UNLESS empty_relationship_allowed %]
514 <label for="guarantor_relationship" class="required">Relationship: </label>
515 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
517 <label for="guarantor_relationship">Relationship: </label>
518 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
520 <option value="" selected>Empty option</option>
521 [% FOREACH pr IN possible_relationships.split('\|') %]
523 <option value="[% pr | html %]">[% pr | html %]</option>
527 [% UNLESS empty_relationship_allowed %]
528 <span class="required">Required</span>
532 <input type="hidden" name="new_guarantor_relationship" value="" />
536 <label for="guarantor_cancel"> </label>
537 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can" aria-hidden="true"></i> Remove</a></span>
542 </div> <!-- #/guarantor_relationships -->
544 <fieldset class="guarantor" id="guarantor_template">
546 <li class="guarantor-details" data-borrowernumber="0">
547 <span class="label">Guarantor:</span>
548 <a class="new_guarantor_link" href="#" target="blank">
549 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
550 (<span class="new_guarantor_id_text"></span>)
552 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
555 [% IF possible_relationships %]
557 [% UNLESS empty_relationship_allowed %]
558 <label for="guarantor_relationship" class="required">Relationship: </label>
559 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
561 <label for="guarantor_relationship">Relationship: </label>
562 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
564 <option value="" selected></option>
565 [% FOREACH pr IN possible_relationships.split('\|') %]
567 <option value="[% pr | html %]">[% pr | html %]</option>
571 [% UNLESS empty_relationship_allowed %]
572 <span class="required">Required</span>
576 <input type="hidden" name="new_guarantor_relationship" value="" />
580 <label for="guarantor_cancel"> </label>
581 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can"></i> Remove</a></span>
587 <input type="hidden" id="guarantor_id" value="" />
588 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
589 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
592 <a href="#patron_search_modal" class="btn btn-default" data-toggle="modal"><i class="fa fa-plus"></i> Add guarantor</a>
595 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
597 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors:</label>
598 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
599 [% IF borrower_data.privacy_guarantor_checkouts %]
600 <option value="0">No</option>
601 <option value="1" selected>Yes</option>
603 <option value="0" selected>No</option>
604 <option value="1">Yes</option>
607 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
610 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
612 <label for="privacy_guarantor_fines">Show charges to guarantors:</label>
613 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
614 [% IF borrower_data.privacy_guarantor_fines %]
615 <option value="0">No</option>
616 <option value="1" selected>Yes</option>
618 <option value="0" selected>No</option>
619 <option value="1">Yes</option>
622 <div class="hint">Allow guarantors of this patron to view this patron's charges from the OPAC</div>
626 </fieldset> <!-- /#memberentry_guarantor -->
627 </div> <!-- #/memberentry_guarantor_anchor -->
629 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
630 <fieldset class="rows" id="non_patron_guarantor">
631 <legend>Non-patron guarantor</legend>
633 [% UNLESS nocontactname %]
635 [% IF ( mandatorycontactname ) %]
636 <label for="contactname" class="required">
638 <label for="contactname">
642 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
643 [% IF ( mandatorycontactname ) %]
644 <span class="required">Required</span>
646 <div class="hint">Non-patron guarantor surname</div>
648 [% END # /UNLESS nocontactname %]
650 [% UNLESS nocontactfirstname %]
652 [% IF ( mandatorycontactfirstname ) %]
653 <label for="contactfirstname" class="required">
655 <label for="contactfirstname">
657 Guarantor first name:
659 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
660 [% IF ( mandatorycontactfirstname ) %]
661 <span class="required">Required</span>
663 <div class="hint">Non-patron guarantor first name</div>
665 [% END # /UNLESS noaltcontactfirstname %]
667 [% UNLESS norelationship %]
668 [% IF possible_relationships %]
670 <label for="relationship">Relationship: </label>
671 <select class="relationship" name="relationship">
672 <option value=""></option>
673 [% FOREACH pr IN possible_relationships.split('\|') %]
674 [% IF pr == borrower_data.relationship %]
675 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
677 <option value="[% pr | html %]">[% pr | html %]</option>
682 [% END #/IF possible_relationships %]
683 [% END # /UNLESS norelationship %]
685 </fieldset> <!-- /#non_patron_guarantor -->
686 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
687 [% END # /IF show_guarantor || guarantor %]
689 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
690 [% PROCESS 'main-address-style' %]
691 [% END # /UNLESS nostreet && nocity etc group%]
693 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
694 <fieldset class="rows" id="memberentry_contact">
695 <legend id="contact_lgd">Contact information</legend>
699 [% IF ( mandatoryphone ) %]
700 <label for="phone" class="required">
706 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
707 [% IF ( mandatoryphone ) %]
708 <span class="required">Required</span>
710 <div class="hint">Shows on transit slips</div>
712 [% END # /UNLESS nophone %]
714 [% UNLESS nophonepro %]
716 [% IF ( mandatoryphonepro ) %]
717 <label for="phonepro" class="required">
719 <label for="phonepro">
723 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
724 [% IF ( mandatoryphonepro ) %]
725 <span class="required">Required</span>
728 [% END # /UNLESS nophonepro %]
730 [% UNLESS nomobile %]
732 [% IF ( mandatorymobile ) %]
733 <label for="mobile" class="required">
739 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
740 [% IF ( mandatorymobile ) %]
741 <span class="required">Required</span>
744 [% END # /UNLESS nomobile %]
748 [% IF ( mandatoryemail ) %]
749 <label for="email" class="required">
755 [% IF ( NoUpdateEmail ) %]
756 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
758 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
760 [% IF ( mandatoryemail ) %]
761 <span class="required">Required</span>
763 <div class="hint">Shows on transit slips</div>
765 [% END #/UNLESS noemail %]
767 [% UNLESS noemailpro %]
769 [% IF ( mandatoryemailpro ) %]
770 <label for="emailpro" class="required">
772 <label for="emailpro">
776 [% IF ( NoUpdateEmail ) %]
777 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
779 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
781 [% IF ( mandatoryemailpro ) %]
782 <span class="required">Required</span>
785 [% END #/UNLESS noemailpro %]
789 [% IF ( mandatoryfax ) %]
790 <label for="fax" class="required">
796 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
797 [% IF ( mandatoryfax ) %]
798 <span class="required">Required</span>
801 [% END #/UNLESS nofax %]
803 [% UNLESS noprimary_contact_method %]
805 [% IF mandatoryprimary_contact_method %]
806 <label for="primary_contact_method" class="required">
808 <label for="primary_contact_method">
810 Main contact method: </label>
812 <select id="primary_contact_method" name="primary_contact_method">
813 <option value=""></option>
815 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
816 <option value="phone" selected="selected">Primary phone</option>
818 <option value="phone">Primary phone</option>
821 [% UNLESS nophonepro %]
822 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
823 <option value="phonepro" selected="selected">Secondary phone</option>
825 <option value="phonepro">Secondary phone</option>
828 [% UNLESS nomobile %]
829 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
830 <option value="mobile" selected="selected">Other phone</option>
832 <option value="mobile">Other phone</option>
836 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
837 <option value="email" selected="selected">Primary email</option>
839 <option value="email">Primary email</option>
842 [% UNLESS noemailpro %]
843 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
844 <option value="emailpro" selected="selected">Secondary email</option>
846 <option value="emailpro">Secondary email</option>
850 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
851 <option value="fax" selected="selected">Fax</option>
853 <option value="fax">Fax</option>
857 [% IF mandatoryprimary_contact_method %]
858 <span class="required">Required</span>
863 </fieldset> <!-- /#memberentry_contact -->
864 [% END # hide fieldset %]
866 <!-- ************************ STEP_1 *********************** -->
867 [% END # /IF ( step_1 ) %]
870 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
871 [% PROCESS 'alt-address-style' %]
872 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
873 [% END # /IF ( step_6 ) %]
876 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
877 [% PROCESS 'alt-contact-style' %]
878 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
879 [% END # /IF ( step_2 ) %]
882 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
883 <fieldset class="rows" id="memberentry_library_management">
884 <legend id="library_management_lgd">Library management</legend>
886 [% UNLESS nocardnumber %]
888 [% IF mandatorycardnumber %]
889 <label for="cardnumber" class="required">
891 <label for="cardnumber" class="validated">
896 <!-- NOTE: div.hint closing tag isn't on the same line -->
897 [% IF minlength_cardnumber == maxlength_cardnumber %]
898 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
899 [% IF mandatorycardnumber %]
900 <span class="required">Required</span>
902 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
903 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
904 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
905 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
906 [% IF mandatorycardnumber %]
907 <span class="required">Required</span>
909 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
910 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
911 [% ELSIF maxlength_cardnumber %]
912 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
913 [% IF mandatorycardnumber %]
914 <span class="required">Required</span>
916 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
917 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
919 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
920 [% IF mandatorycardnumber %]
921 <span class="required">Required</span>
923 <div class="hint">There is no minimum or maximum character length.
925 [% IF autoMemberNum %]
926 [% IF mandatorycardnumber %]
927 <br/><span class="error">autoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
929 <br/>Leave blank for auto calc during registration
932 </div><!--/div.hint -->
934 [% END # /UNLESS nocardnumber %]
936 [% UNLESS nobranchcode %]
938 <label for="libraries" class="required">Library:</label>
939 <select name="branchcode" id="libraries">
940 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
942 <span class="required">Required</span>
947 <label for="categorycode_entry" class="required">Category: </label>
948 <select id="categorycode_entry" name="categorycode">
949 [% FOREACH category_type IN patron_categories.keys %]
950 [% SWITCH category_type %]
952 <optgroup label="Child">
954 <optgroup label="Adult">
956 <optgroup label="Staff">
958 <optgroup label="Organization">
960 <optgroup label="Professional">
962 <optgroup label="Statistical">
964 <optgroup label="Unknown">
966 [% FOREACH category IN patron_categories.$category_type %]
967 [% IF category.categorycode == patron_category.categorycode %]
968 <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>
970 <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>
976 [% IF limited_category %]
977 <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>
979 <span class="required">Required</span>
984 [% IF ( mandatorysort1 ) %]
985 <label for="sort1" class="required">
991 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
992 [% IF ( mandatorysort1 ) %]
993 <span class="required">Required</span>
996 [% END # /UNLESS nosort1 %]
1000 [% IF ( mandatorysort2 ) %]
1001 <label for="sort2" class="required">
1007 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
1008 [% IF ( mandatorysort2 ) %]
1009 <span class="required">Required</span>
1012 [% END # /UNLESS nosort2 %]
1014 [% UNLESS noautorenew_checkouts %]
1016 <label for="yes-autorenew_checkouts">
1017 Allow auto-renewal of items:
1019 [% IF ( borrower_data.autorenew_checkouts || op == 'add_form' ) %]
1020 <label for="yes-autorenew_checkouts">
1022 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1024 <label for="no-autorenew_checkouts">
1026 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1029 <label for="yes-autorenew_checkouts">
1031 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1033 <label for="no-autorenew_checkouts">
1035 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1042 <label for="protected">Protected:</label>
1043 [% IF ( patron.protected == 1 ) %]
1044 <label for="yes-protected">
1046 <input type="radio" id="yes-protected" name="protected" value="1" checked="checked" />
1048 <label for="no-protected">
1050 <input type="radio" id="no-protected" name="protected" value="0" />
1053 <label for="yes-protected">
1055 <input type="radio" id="yes-protected" name="protected" value="1" />
1057 <label for="no-protected">
1059 <input type="radio" id="no-protected" name="protected" value="0" checked="checked" />
1064 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1066 <label for="checkprevcheckout">Check for previous checkouts: </label>
1067 <select name="checkprevcheckout" id="checkprevcheckout">
1068 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1069 <option value="yes" selected="selected">Yes if settings allow it</option>
1070 <option value="no">No if settings allow it</option>
1071 <option value="inherit">Inherit from settings</option>
1072 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1073 <option value="yes">Yes if settings allow it</option>
1074 <option value="no" selected="selected">No if settings allow it</option>
1075 <option value="inherit">Inherit from settings</option>
1077 <option value="yes">Yes if settings allow it</option>
1078 <option value="no">No if settings allow it</option>
1079 <option value="inherit" selected="selected">Inherit from settings</option>
1083 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1085 [% IF Koha.Preference('TranslateNotices') %]
1087 <label for="lang">Preferred language for notices: </label>
1088 <select id="lang" name="lang">
1089 <option value="default">Default</option>
1090 [% FOR language IN languages %]
1091 [% FOR sublanguage IN language.sublanguages_loop %]
1092 [% IF language.plural %]
1093 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1094 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1096 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1099 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1100 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1102 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1104 [% END # /IF language.plural %]
1105 [% END # /FOR sublanguage %]
1106 [% END #/FOR language %]
1107 </select> <!-- /#lang -->
1109 [% END #/IF Koha.Preference('TranslateNotices') %]
1111 </fieldset> <!-- /#memberentry_library_management -->
1113 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1114 <fieldset class="rows" id="memberentry_subscription">
1115 <legend id="library_setup_lgd">Library setup</legend><ol>
1116 [% UNLESS nodateenrolled %]
1118 [% IF ( mandatorydateenrolled ) %]
1119 <label for="from" class="required">
1125 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1126 [% IF ( mandatorydateenrolled ) %]
1127 <span class="required">Required</span>
1129 [% IF ( ERROR_dateenrolled ) %]
1130 <span class="required">(Error)</span>
1132 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1134 [% END # /UNLESS nodateenrolled %]
1136 [% UNLESS nodateexpiry %]
1139 <li style="display:none">
1141 [% IF ( mandatorydateexpiry ) %]
1142 <label for="to" class="required">
1146 Expiry date (leave blank for auto calc):
1148 [% UNLESS ( op == 'add_form' ) %]
1149 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS op == 'duplicate' %]" class="flatpickr" />
1151 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1153 [% IF ( mandatorydateexpiry ) %]
1154 <span class="required">Required</span>
1156 [% IF ( ERROR_dateexpiry ) %]
1157 <span class="required">(Error)</span>
1159 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1162 [% UNLESS noopacnote %]
1164 [% IF ( mandatoryopacnote ) %]
1165 <label for="opacnote" class="required">
1167 <label for="opacnote">
1171 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS op == 'duplicate' %]</textarea>
1172 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1173 [% IF ( mandatoryopacnote ) %]
1174 <span class="required">Required</span>
1177 [% END # /UNLESS noopacnote %]
1179 [% UNLESS noborrowernotes %]
1181 [% IF ( mandatoryborrowernotes ) %]
1182 <label for="borrowernotes" class="required">
1184 <label for="borrowernotes">
1188 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS op == 'duplicate' %]</textarea>
1189 <div class="hint">This message displays when checking out to this patron</div>
1190 [% IF ( mandatoryborrowernotes ) %]
1191 <span class="required">Required</span>
1194 [% END # /UNLESS noborrowernotes %]
1196 </fieldset> <!-- /#memberentry_subscription -->
1197 [% END # hide fieldset %]
1199 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1200 <fieldset class="rows" id="memberentry_userid">
1201 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1203 [% UNLESS nouserid %]
1205 [% IF ( mandatoryuserid ) %]
1206 <label for="userid" class="required">
1208 <label for="userid">
1213 [% IF ( NoUpdateLogin ) %]
1214 [% IF ( op == 'duplicate' ) %]
1215 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1217 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1220 [% IF ( op == 'duplicate' ) %]
1221 <input type="text" id="userid" name="userid" size="20" value="" />
1223 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1225 [% END # /IF ( NoUpdateLogin ) %]
1227 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1228 <input type="text" disabled="disabled" style="display:none" />
1230 [% IF ( mandatoryuserid ) %]
1231 <span class="required">Required</span>
1234 [% END # /UNLESS nouserid %]
1236 [% UNLESS nopassword %]
1238 [% IF ( mandatorypassword ) %]
1239 <label for="password" class="required">
1241 <label for="password">
1245 [% IF ( op == 'add_form' ) %]
1246 [% IF ( NoUpdateLogin ) %]
1247 [% IF ( op == 'duplicate' ) %]
1248 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1250 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1253 [% IF ( op == 'duplicate' ) %]
1254 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1256 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1258 [% END # /IF ( NoUpdateLogin ) %]
1259 [% ELSE # IF ( op == 'add_form' ) %]
1261 [% IF ( borrower_data.password ) %]
1262 [% IF ( NoUpdateLogin ) %]
1263 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1265 [% IF ( op == 'duplicate' ) %]
1266 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1268 <input type="password" id="password" name="password" size="20" value="****" />
1272 [% IF ( NoUpdateLogin ) %]
1273 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1275 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1277 [% END # /IF ( password ) %]
1278 [% END # /IF ( op == 'add_form' ) %]
1279 [% IF ( mandatorypassword ) %]
1280 <span class="required">Required</span>
1282 [% IF ( ERROR_password_too_short ) %]
1283 <span class="required">Password is too short</span>
1285 [% IF ( ERROR_password_too_weak ) %]
1286 <span class="required">Password is too weak</span>
1288 [% IF ( ERROR_password_has_whitespaces ) %]
1289 <span class="required">Password has leading or trailing whitespaces</span>
1291 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1295 [% IF ( mandatorypassword ) %]
1296 <label for="password2" class="required">
1298 <label for="password2">
1302 [% IF ( op == 'add_form' ) %]
1303 [% IF ( NoUpdateLogin ) %]
1304 [% IF ( op == 'duplicate' ) %]
1305 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1307 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1310 [% IF ( op == 'duplicate' ) %]
1311 <input type="password" id="password2" name="password2" size="20" />
1313 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1316 [% ELSE # IF ( op == 'add_form' ) %]
1317 [% IF ( borrower_data.password ) %]
1318 [% IF ( NoUpdateLogin ) %]
1319 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1321 [% IF ( op == 'duplicate' ) %]
1322 <input type="password" id="password2" name="password2" size="20" />
1324 <input type="password" id="password2" name="password2" size="20" value="****" />
1328 [% IF ( NoUpdateLogin ) %]
1329 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1331 <input type="password" id="password2" name="password2" size="20" value="" />
1334 [% END # /IF ( op == 'add_form' ) %]
1336 [% IF ( mandatorypassword ) %]
1337 <span class="required">Required</span>
1339 [% IF ( ERROR_password_mismatch ) %]
1340 <span class="required">Passwords do not match</span>
1343 [% END # /UNLESS nopassword %]
1344 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1346 <label for="password_expiration_date">Password expiration date:</label>
1347 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1351 </fieldset> <!-- /#memberentry_userid -->
1352 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1354 <!--this zones are not necessary in modif mode -->
1355 [% UNLESS ( op == 'add_form' || op == 'duplicate' || ( nogonenoaddress && nolost ) ) %]
1356 <fieldset class="rows" id="memberentry_account_flags">
1357 <legend id="account_flags_lgd">Patron account flags</legend>
1358 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1360 [% UNLESS nogonenoaddress %]
1362 [% IF mandatorygonenoaddress %]
1363 <label class="radio required" for="yesgonenoaddress">
1365 <label class="radio" for="yesgonenoaddress">
1369 [% IF CAN_user_circulate_manage_restrictions %]
1370 <label for="yesgonenoaddress">
1371 [% IF ( borrower_data.gonenoaddress ) %]
1372 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1374 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1378 <label for="nogonenoaddress">
1379 [% IF ( borrower_data.gonenoaddress ) %]
1380 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1382 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1387 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1388 [% END # /IF CAN_user_circulate_manage_restrictions %]
1389 [% IF mandatorygonenoaddress %]
1390 <span class="required">Required</span>
1394 [% END # /UNLESS nogonenoaddress %]
1397 [% IF mandatorylost %]
1398 <label class="radio required" for="yeslost">
1400 <label class="radio" for="yeslost">
1404 [% IF CAN_user_circulate_manage_restrictions %]
1405 <label for="yeslost">
1406 [% IF ( borrower_data.lost ) %]
1407 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1409 <input type="radio" id="yeslost" name="lost" value="1" />
1413 <label for="nolost">
1414 [% IF ( borrower_data.lost ) %]
1415 <input type="radio" id="nolost" name="lost" value="0" />
1417 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1422 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1423 [% END # /IF CAN_user_circulate_manage_restrictions %]
1424 [% IF mandatorylost %]
1425 <span class="required">Required</span>
1428 [% END # /UNLESS nogonenoaddress %]
1430 </fieldset> <!-- /#memberentry_account_flags -->
1432 <fieldset class="rows" id="memberentry_restrictions">
1433 <legend id="restrictions_lgd">Patron restrictions</legend>
1434 [% IF ( patron.restrictions.count ) %]
1441 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1442 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1448 [% FOREACH restriction IN patron.restrictions %]
1450 <td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
1452 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
1453 Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]
1455 [% restriction.comment | $raw %]
1459 [% IF restriction.expiration %]
1460 [% restriction.expiration | $KohaDates %]
1465 <td>[% restriction.created | $KohaDates %]</td>
1466 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1468 <input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" />
1472 [% END # /FOREACH d %]
1476 <p>Patron is currently unrestricted.</p>
1477 [% END # /IF ( patron.restrictions.count ) %]
1479 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1480 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
1481 <fieldset id="manual_restriction_form">
1482 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1483 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1485 [% IF Koha.Preference('PatronRestrictionTypes') %]
1487 <label for="debarred_type">Type:</label>
1488 <select name="debarred_type">
1489 [% FOREACH restriction_type IN restriction_types %]
1490 [% IF !restriction_type.is_system %]
1491 [% IF restriction_type.is_default %]
1492 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
1494 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
1502 <label for="debarred_comment">Comment: </label>
1503 <input type="text" id="debarred_comment" name="debarred_comment" />
1506 <label for="debarred_expiration">Expiration: </label>
1507 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1508 <a href="#" id="clear_debarred_expiration">Clear date</a>
1512 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1514 </fieldset> <!-- /#manual_restriction_form -->
1515 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1516 </fieldset> <!-- /#memberentry_restrictions -->
1517 [% END # /IF ( step_3 ) %]
1520 [% IF Koha.Preference('HouseboundModule') %]
1521 <fieldset class="rows" id="memberentry_housebound_roles">
1522 <legend id="housebound_roles">Housebound roles</legend>
1525 <label class="radio" for="housebound_chooser">
1528 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1529 <label for="yes_housebound_chooser">Yes </label>
1530 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1531 <label for="no_housebound_chooser">No </label>
1532 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1534 <label for="yes_housebound_chooser">Yes </label>
1535 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1536 <label for="no_housebound_chooser">No </label>
1537 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1541 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1542 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1543 <label for="yes_housebound_deliverer">Yes </label>
1544 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1545 <label for="no_housebound_deliverer">No </label>
1546 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1548 <label for="yes_housebound_deliverer">Yes </label>
1549 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1550 <label for="no_housebound_deliverer">No </label>
1551 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1554 </ol> <!-- /ol.radio -->
1555 </fieldset> <!-- /#memberentry_housebound_roles -->
1556 [% END # hide fieldset %]
1557 [% END # IF step_7 %]
1560 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1561 [% UNLESS ( no_patron_attribute_types ) %]
1562 <fieldset class="rows" id="memberentry_patron_attributes">
1563 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1564 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1565 [% FOREACH pa_loo IN patron_attributes %]
1566 <ol class="attributes_table">
1567 [% IF pa_loo.class %]
1568 <div id="aai_[% pa_loo.class | html %]">
1569 <h3 id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</h3>
1571 [% FOREACH patron_attribute IN pa_loo.items %]
1572 <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1573 [% IF patron_attribute.mandatory %]
1574 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1576 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1578 [% IF ( patron_attribute.use_dropdown ) %]
1579 [% IF patron_attribute.mandatory %]
1580 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1582 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1584 <option value=""></option>
1585 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1586 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1587 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1588 [% auth_val_loo.lib | html %]
1591 <option value="[% auth_val_loo.authorised_value | html %]" >
1592 [% auth_val_loo.lib | html %]
1598 [% IF patron_attribute.mandatory %]
1599 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1601 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1603 [% END # /IF ( patron_attribute.use_dropdown ) %]
1604 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1605 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
1606 [% IF ( patron_attribute.repeatable ) %]
1607 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1609 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1611 [% END # /FOREACH patron_attribute %]
1612 [% IF pa_loo.class %]</div>[% END %]
1614 [% END # /FOREACH pa_loo %]
1615 </fieldset> <!-- /#memberentry_patron_attributes -->
1616 [% END # UNLESS ( no_patron_attribute_types ) %]
1617 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1618 [% END # IF ( step_4 ) %]
1621 [% IF ( EnhancedMessagingPreferences ) %]
1622 <fieldset class="rows" id="memberentry_messaging_prefs">
1623 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1624 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1625 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1627 <input type="hidden" name="setting_messaging_prefs" value="1" />
1628 [% INCLUDE 'messaging-preference-form.inc' %]
1629 [% IF ( SMSSendDriver ) %]
1630 [% IF !nosmsalertnumber %]
1632 <label for="SMSnumber">SMS number:</label>
1633 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1634 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1637 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1639 <label for="sms_provider_id">SMS provider:</label>
1640 <select id="sms_provider_id" name="sms_provider_id">
1641 <option value="">Unknown</option>
1642 [% FOREACH s IN sms_providers %]
1643 [% IF s.id == borrower_data.sms_provider_id %]
1644 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1646 <option value="[% s.id | html %]">[% s.name | html %]</option>
1651 [% END # /UNLESS nosms_provider_id %]
1652 [% END # IF ( SMSSendDriver ) %]
1654 [% END # IF ( EnhancedMessagingPreferences ) %]
1655 [% END # /IF step_5 %]
1656 </form> <!-- /#entryform -->
1658 [% IF quickadd && op == 'add_form' && !check_member %]
1659 <form method="get" id="quick_add_form" class="toggler">
1660 <fieldset class="rows quick_add"><legend>Quick add</legend>
1661 <ol id="quick_add_list">
1667 [% END # /UNLESS ( no_add ) %]
1669 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1671 [% UNLESS ( op == 'add_form' ) %]
1672 <div class="col-sm-2 col-sm-pull-10">
1674 [% INCLUDE 'circ-menu.inc' %]
1676 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1678 </div> <!-- /.row -->
1679 [% MACRO jsinclude BLOCK %]
1680 [% Asset.js("lib/hc-sticky.js") | $raw %]
1681 [% INCLUDE 'calendar.inc' %]
1682 [% INCLUDE 'str/members-menu.inc' %]
1683 [% Asset.js("js/members-menu.js") | $raw %]
1685 function update_cardnumber_warning(size){
1686 var max_len = [% maxlength_cardnumber | html %];
1687 if ( size >= max_len ) {
1688 $("#cn_max").show();
1690 $("#cn_max").hide();
1694 function showHideFields(){
1695 [% UNLESS step == 1 %]
1696 [% IF fieldstohide.match('identity') %]
1697 $("#memberentry_identity").find('legend').nextAll().toggle();
1699 [% IF show_guarantor || guarantor %]
1700 [% IF fieldstohide.match('guarantor') %]
1701 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1702 $("#guarantor_template").toggle();
1704 [% IF fieldstohide.match('nonpatron_guarantor') %]
1705 $("#non_patron_guarantor").find('legend').nextAll().toggle();
1708 [% IF fieldstohide.match('primary_address') %]
1709 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1711 [% IF fieldstohide.match('primary_contact') %]
1712 $("#memberentry_contact").find('legend').nextAll().toggle();
1715 [% UNLESS step == 6 %]
1716 [% IF fieldstohide.match('alt_address') %]
1717 $("#memberentry_address").find('legend').nextAll().toggle();
1720 [% UNLESS step == 2 %]
1721 [% IF fieldstohide.match('alt_contact') %]
1722 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1725 [% UNLESS step == 3 %]
1726 [% IF fieldstohide.match('lib_mgmt') %]
1727 $("#memberentry_library_management").find('legend').nextAll().toggle();
1729 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1730 [% IF fieldstohide.match('lib_setup') %]
1731 $("#memberentry_subscription").find('legend').nextAll().toggle();
1734 [% UNLESS nouserid && nopassword %]
1735 [% IF fieldstohide.match('login') %]
1736 $("#memberentry_userid").find('legend').nextAll().toggle();
1739 [% UNLESS ( op == 'add_form' || op == 'duplicate' ) %]
1740 [% IF fieldstohide.match('flags') %]
1741 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1744 [% IF fieldstohide.match('debarments') %]
1745 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1748 [% UNLESS step == 7 %]
1749 [% IF Koha.Preference('HouseboundModule') %]
1750 [% IF fieldstohide.match('housebound') %]
1751 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1755 [% UNLESS step == 4 %]
1756 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1757 [% IF fieldstohide.match('additional') %]
1758 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1762 [% UNLESS step == 5 %]
1763 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1764 [% IF fieldstohide.match('messaging') %]
1765 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1766 $("#messaging_prefs_loading").toggle();
1772 $(document).ready(function() {
1774 $("#toggle_hidden_fields").change(function(){
1778 $("legend").click(function(){
1779 $(this).nextAll().toggle();
1780 $("#messaging_prefs_loading").hide();
1781 $("#guarantor_template").hide();
1784 $("#saverecord").css({ 'margin-left': 0 });
1786 Sticky = $("#toolbar");
1789 stickyClass: "floating"
1792 [% IF borrower_data.categorycode %]
1793 update_category_code( "[% borrower_data.categorycode | html %]" );
1795 if ( $("#categorycode_entry").length > 0 ){
1796 var category_code = $("#categorycode_entry").find("option:selected").val();
1797 update_category_code( category_code );
1801 [% IF new_guarantors %]
1802 [% FOREACH g IN new_guarantors %]
1803 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1807 $("#cn_max").hide();
1809 $("#cardnumber").on("keydown", function(e){
1810 content = $(this).val();
1812 $("#cardnumber").on("keyup", function(e){
1813 // .val() will return the value of the input after the key has been released
1814 var l = $(this).val().length;
1815 if ( l == content.length + 1 ) { l--; }
1816 update_cardnumber_warning(l);
1818 $("#cardnumber").bind("paste", function(e){
1819 var pastedData = e.originalEvent.clipboardData.getData('text');
1820 update_cardnumber_warning(pastedData.length - 1);
1822 var toggle_quick_add = $(".toggle_quick_add");
1823 $(toggle_quick_add).click(function(e){
1824 toggle_quick_add.toggle();
1827 var toggle_from = '';
1828 if( $("#entryform:visible").length ) {
1829 toggle_to = "#quick_add_form label";
1830 toggle_from = "#entryform label";
1831 $("#memberentry_guarantor").appendTo("#quick_add_form");
1833 toggle_to="#entryform label";
1834 toggle_from = "#quick_add_form label";
1835 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1837 $(toggle_from).each(function() {
1838 var input_label = $(this).attr('for');
1839 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1840 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1843 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1846 $(".toggler").toggle();
1849 $("#save_quick_add").click(function(){
1850 $("#quick_add_form").validate();
1851 if( $("#quick_add_form").valid()){
1852 $('.toggle_quick_add').click();
1853 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1854 $('#saverecord').click();
1856 else {return false;}
1859 $("#saverecord").click(function(){
1860 if( check_form_borrowers() ){
1861 $("#entryform").submit();
1865 $('#duplicate').on('click', function() {
1866 $("input[name='op']").val('edit_form');
1867 $("input[name='borrowernumber']").val('[% check_member | html %]');
1868 $("input[name='check_member']").val('');
1869 $('#entryform').submit();
1872 $('#not-duplicate').on('click', function() {
1873 $("input[name='nodouble']").val('1');
1874 $('#entryform').submit();
1877 $(".popup_patronview").on("click", function(e){
1879 var url = $(this).attr("href");
1880 openWindow( url, "patronview" );
1883 $("#dateofbirth").on("change", function(){
1887 $("#debarred_comment, #debarred_expiration").on("change", function(){
1888 $("#add_debarment").val(1);
1891 $("#clear_debarred_expiration").on("click", function(e){
1893 $('#debarred_expiration').val("");
1896 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1898 clear_entry( this );
1901 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1903 clone_entry( this );
1906 $("#categorycode_entry").on("change", function(){
1907 update_category_code(this);
1910 [% IF logged_in_user.borrowernumber == borrowernumber %]
1911 $("#userid").on("change", function(){
1912 $(this).parent().find("div.hint").remove();
1913 if ( "[% borrower_data.userid | html %]" != $(this).val() ) {
1914 $(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username")));
1921 [% IF quickadd && op == 'add_form' && !check_member %]
1922 $(document).ready(function () {
1924 $("#entryform,#saverecord").hide();
1925 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1926 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1927 $("#entryform label").each(function () {
1928 var input_label = $(this).attr('for');
1929 if ( input_label == 'sex-female' ) {
1932 else if ( input_label == 'btitle' ) {
1933 input_label='title';
1935 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1936 let orig_li = $(this).parent();
1937 if( orig_li.attr('class') == 'radio' ){
1938 let new_field = orig_li.clone();
1939 new_field.children('label').each(function(){
1940 let child_input = $(this).children('input');
1941 child_input.attr("id",child_input.attr("id") + "_quick_add");
1943 new_field.appendTo("#quick_add_list");
1945 let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1946 let new_field = orig_li.clone();
1947 new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1948 new_field.appendTo("#quick_add_list");
1949 [% UNLESS mandatorypassword %]
1950 if( input_label == 'password' ){
1951 let orig_p2 = $("#entryform label[for='password2']").parent();
1952 let new_p2 = orig_p2.clone();
1953 new_p2.find('input[id="password2"]').attr("id","password2_quick_add");
1954 new_p2.appendTo("#quick_add_list");
1960 if ( $("#memberentry_guarantor").length ) {
1961 $("#memberentry_guarantor").appendTo("#quick_add_form");
1963 $("#quick_add_form").show();
1964 $("#quick_add_form").find(".flatpickr:hidden").each( (i, input) => {
1965 $(input).siblings(".flatpickr_wrapper").remove(); // Remove leftover from the previous flatpickr that has been cloned
1966 apply_flatpickr(input);
1970 $("#guarantor_template").hide();
1972 var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1973 var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1976 [% Asset.js("js/members.js") | $raw %]
1977 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1978 [% 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 %]
1980 [% INCLUDE 'select2.inc' %]
1981 [% SET columns = ['cardnumber','name','category','branch','dateofbirth','address-library','action'] %]
1982 [% PROCESS patron_search_modal columns => columns, modal_title => t("Add guarantor") %]
1983 [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1 %]
1986 [% INCLUDE 'intranet-bottom.inc' %]