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 for details.</div>
76 [% CASE 'error_on_update_patron' %]
77 <div class="dialog alert">Something went wrong when updating the patron. Check the logs for details.</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 'messages.inc' %]
91 [% IF ( error_alert == "no_email" ) %]
92 <div class="dialog alert">This member has no email</div>
94 <div class="dialog alert">[% error_alert | html %]</div>
98 <div class="dialog message">Email has been sent.</div>
101 [% INCLUDE 'noadd-warnings.inc' %]
103 [% UNLESS ( no_add ) %]
106 <span>Add patron</span>
107 [% ELSIF ( opduplicate ) %]
108 <span>Duplicate patron</span>
110 <span>Modify patron</span>
112 [% INCLUDE 'patron-title.inc' %]
113 [% IF patron_category %]([% patron_category.description | html %])[% END %]
116 [% IF quickadd && opadd && !check_member %]
117 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
118 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
121 [% IF ( check_member ) %]
122 <div class="dialog alert">
123 <h3>Duplicate patron record?</h3>
124 <p><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&borrowernumber=[% check_member | uri %]"><i class="fa-solid fa-window-restore"></i> View existing record</a></p>
125 <button id="duplicate" type="submit" class="new"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> It is a duplicate. Edit existing record </button>
126 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
131 <div class="dialog alert">
132 <p>The following fields are wrong. Please fix them.</p>
134 [% IF ( ERROR_login_exist ) %]
135 <li id="ERROR_login_exist">Username already exists or could not create unique new one.</li>
137 [% IF ERROR_cardnumber_already_exists %]
138 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
140 [% IF ERROR_cardnumber_length %]
141 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
143 [% IF ( ERROR_age_limitations ) %]
144 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
145 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
147 [% IF ( ERROR_branch ) %]
148 <li id="ERROR_branch">Library is invalid.</li>
150 [% IF ( ERROR_dateofbirth ) %]
151 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
153 [% IF ( ERROR_dateenrolled ) %]
154 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
156 [% IF ( ERROR_dateexpiry ) %]
157 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
159 [% IF ( ERROR_password_too_short ) %]
160 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
162 [% IF ( ERROR_password_too_weak ) %]
163 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
165 [% IF ( ERROR_password_has_whitespaces ) %]
166 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
168 [% IF ( ERROR_password_mismatch ) %]
169 <li id="ERROR_password_mismatch">Passwords do not match.</li>
171 [% IF ( ERROR_password_expiration_date ) %]
172 <li id="ERROR_dateexpiry">Password expiration date is invalid.</li>
174 [% IF ( ERROR_extended_unique_id_failed ) %]
175 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description | html %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value | html %]" is already in use by another patron record.</li>
177 [% IF ERROR_bad_email %]
178 <li id="ERROR_bad_email">The primary email is invalid.</li>
180 [% IF ERROR_bad_email_secondary %]
181 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
183 [% IF ERROR_bad_email_alternative %]
184 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
186 [% IF ( ERROR_child_no_guarantor ) %]
187 <li id="ERROR_child_no_guarantor">A child patron needs a guarantor.</li>
189 [% IF ( ERROR_guarantor_is_guarantee ) %]
190 <li id="ERROR_guarantor_is_guarantee">A guarantor cannot be a guarantee.</li>
192 [% IF ( ERROR_cannot_delete_guarantor ) %]
193 <li id="ERROR_cannot_delete_guarantor">Cannot delete guarantor(s). A child patron needs a guarantor.</li>
199 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
200 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
202 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
203 [% FOREACH field IN fieldstohide.split(',') %]
205 [% CASE 'identity' %] <span>Patron identity</span> |
206 [% CASE 'guarantor' %] <span>Guarantor information</span> |
207 [% CASE 'nonpatron_guarantor' %] <span>Non-patron guarantor</span> |
208 [% CASE 'primary_address' %] <span>Main address</span> |
209 [% CASE 'primary_contact' %] <span>Contact information</span> |
210 [% CASE 'alt_address' %] <span>Alternate address</span> |
211 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
212 [% CASE 'lib_mgmt' %] <span>Library management</span> |
213 [% CASE 'lib_setup' %] <span>Library setup</span> |
214 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
215 [% CASE 'flags' %] <span>Patron account flags</span> |
216 [% CASE 'debarments' %] <span>Patron restrictions</span> |
217 [% CASE 'housebound' %][% IF Koha.Preference('HouseboundModule')%] <span>Housebound roles</span> |[% END %]
218 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
219 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
225 [% UNLESS ( check_member ) %]
226 <div id="toolbar" class="btn-toolbar">
227 [% IF quickadd && opadd %]
228 <button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
230 <button class="btn btn-primary toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
232 <a class="btn btn-link" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
234 <a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
236 <i class="fa fa-times"></i> Cancel
241 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
242 [% UNLESS ( check_member ) %]
243 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
245 <!-- field always hidden in different form (1,2,3) -->
246 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
247 <input type="hidden" name="updtype" value="[% updtype | html %]" />
248 <input type="hidden" name="destination" value="[% destination | html %]" />
249 <input type="hidden" name="check_member" value="[% check_member | html %]" />
250 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
251 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
252 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
254 <input type="hidden" name="step" value="[% step | html %]" />
257 <input type="hidden" name="op" value="insert" />
258 [% ELSIF ( opduplicate ) %]
259 <input type="hidden" name="op" value="insert" />
261 <input type="hidden" name="op" value="save" />
262 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
263 [%# Only put the card number if we arent showing it in the form later %]
264 [% IF borrower_data.cardnumber %]
265 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
271 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
272 <fieldset class="rows" id="memberentry_identity">
273 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span></legend>
275 [% UNLESS ( patron_category.category_type == 'I' ) %]
277 [% IF Koha.Preference('BorrowersTitles') %]
279 [% IF ( mandatorytitle ) %]
280 <label for="btitle" class="required">
285 <select id="btitle" name="title">
286 <option value=""></option>
287 [% FOREACH patron_title IN Koha.Preference('BorrowersTitles').split('\|') %]
288 [% IF btitle == patron_title %]
289 <option value="[% patron_title | html %]" selected="selected">[% patron_title | html %]</option>
291 <option value="[% patron_title | html %]">[% patron_title | html %]</option>
295 [% IF ( mandatorytitle ) %]
296 <span class="required">Required</span>
299 [% END # /IF Koha.Preference('BorrowersTitles') %]
300 [% END # /UNLESS notitle %]
301 [% END # /UNLESS ( I ) %]
303 [% UNLESS nosurname %]
305 [% IF ( patron_category.category_type == 'I' ) %]
306 <label for="surname" class="required">
310 [% IF ( mandatorysurname ) %]
311 <label for="surname" class="required">
313 <label for="surname">
318 [% IF ( uppercasesurnames ) %]
319 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
321 <input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
323 [% IF ( mandatorysurname ) %]
324 <span class="required">Required</span>
327 [% END # /UNLESS nosurname %]
329 [% UNLESS ( patron_category.category_type == 'I' ) %]
330 [% UNLESS nofirstname %]
332 [% IF ( mandatoryfirstname ) %]
333 <label for="firstname" class="required">
335 <label for="firstname">
339 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
340 [% IF ( mandatoryfirstname ) %]
341 <span class="required">Required</span>
344 [% END #/UNLESS nofirstname %]
345 [% UNLESS nomiddle_name %]
347 [% IF ( mandatorymiddle_name ) %]
348 <label for="middle_name" class="required">
350 <label for="middle_name">
354 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
355 [% IF ( mandatorymiddle_name ) %]
356 <span class="required">Required</span>
359 [% END #/UNLESS nomiddle_name %]
360 [% UNLESS nodateofbirth %]
362 [% IF ( mandatorydateofbirth ) %]
363 <label for="dateofbirth" class="required">
365 <label for="dateofbirth">
369 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
370 [% IF ( mandatorydateofbirth ) %]
371 <span class="required">Required</span>
373 [% IF ( ERROR_dateofbirth ) %]
374 <span class="required">(Error)</span>
376 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
378 [% END # /UNLESS nodateofbirth %]
379 [% UNLESS noinitials %]
381 [% IF ( mandatoryinitials ) %]
382 <label for="initials" class="required">
384 <label for="initials">
388 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
389 [% IF ( mandatoryinitials ) %]
390 <span class="required">Required</span>
393 [% END # /UNLESS noinitials %]
394 [% UNLESS nopronouns %]
396 [% IF ( mandatorypronouns ) %]
397 <label for="pronouns" class="required">
399 <label for="pronouns">
403 <input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS opduplicate %]" />
404 [% IF ( mandatorypronouns ) %]
405 <span class="required">Required</span>
408 [% END # /UNLESS nopronouns %]
409 [% END #/UNLESS ( I ) %]
410 [% UNLESS noothernames %]
412 [% IF ( mandatoryothernames ) %]
413 <label for="othernames" class="required">
415 <label for="othernames">
419 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
420 [% IF ( mandatoryothernames ) %]
421 <span class="required">Required</span>
423 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
425 [% END #/UNLESS noothernames %]
427 [% UNLESS ( patron_category.category_type == 'I' ) %]
430 [% UNLESS ( opduplicate ) %]
432 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
434 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
437 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
439 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
442 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
444 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
447 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
449 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
452 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
453 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
454 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
455 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
456 [% END # /UNLESS ( opduplicate )%]
458 [% END # /UNLESS nosex %]
459 [% END # /UNLESS ( I ) %]
461 </fieldset> <!-- /#memberentry_identity -->
462 [% END # hide fieldset %]
464 [% IF show_guarantor || guarantor %]
465 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
466 <div id="memberentry_guarantor_anchor">
467 <fieldset id="memberentry_guarantor" class="rows">
468 <legend>Patron guarantor</legend>
470 <div id="guarantor_relationships">
471 [% FOREACH r IN relationships %]
474 [% IF patron_category.category_type == 'I' %]
475 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
476 <span class="label">Organization:</span>
477 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
480 <span class="label">Relationship:</span>
481 <span>[% r.relationship | html %]</span>
484 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
485 <span class="label">Guarantor:</span>
486 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
489 <span class="label">Relationship:</span>
490 <span>[% r.relationship | html %]</span>
494 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
495 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
500 [% END # END relationships foreach %]
501 [% IF guarantor && (!relationships) %]
502 <fieldset class="guarantor">
504 <li class="guarantor-details" data-borrowernumber="0">
505 <span class="label">Guarantor:</span>
506 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
507 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
510 [% IF possible_relationships %]
512 [% UNLESS empty_relationship_allowed %]
513 <label for="guarantor_relationship" class="required">Relationship: </label>
514 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
516 <label for="guarantor_relationship">Relationship: </label>
517 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
519 <option value="" selected>Empty option</option>
520 [% FOREACH pr IN possible_relationships.split('\|') %]
522 <option value="[% pr | html %]">[% pr | html %]</option>
526 [% UNLESS empty_relationship_allowed %]
527 <span class="required">Required</span>
531 <input type="hidden" name="new_guarantor_relationship" value="" />
535 <label for="guarantor_cancel"> </label>
536 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can" aria-hidden="true"></i> Remove</a></span>
541 </div> <!-- #/guarantor_relationships -->
543 <fieldset class="guarantor" id="guarantor_template">
545 <li class="guarantor-details" data-borrowernumber="0">
546 <span class="label">Guarantor:</span>
547 <a class="new_guarantor_link" href="#" target="blank">
548 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
549 (<span class="new_guarantor_id_text"></span>)
551 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
554 [% IF possible_relationships %]
556 [% UNLESS empty_relationship_allowed %]
557 <label for="guarantor_relationship" class="required">Relationship: </label>
558 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
560 <label for="guarantor_relationship">Relationship: </label>
561 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
563 <option value="" selected></option>
564 [% FOREACH pr IN possible_relationships.split('\|') %]
566 <option value="[% pr | html %]">[% pr | html %]</option>
570 [% UNLESS empty_relationship_allowed %]
571 <span class="required">Required</span>
575 <input type="hidden" name="new_guarantor_relationship" value="" />
579 <label for="guarantor_cancel"> </label>
580 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can"></i> Remove</a></span>
586 <input type="hidden" id="guarantor_id" value="" />
587 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
588 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
591 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
594 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
596 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors:</label>
597 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
598 [% IF borrower_data.privacy_guarantor_checkouts %]
599 <option value="0">No</option>
600 <option value="1" selected>Yes</option>
602 <option value="0" selected>No</option>
603 <option value="1">Yes</option>
606 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
609 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
611 <label for="privacy_guarantor_fines">Show charges to guarantors:</label>
612 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
613 [% IF borrower_data.privacy_guarantor_fines %]
614 <option value="0">No</option>
615 <option value="1" selected>Yes</option>
617 <option value="0" selected>No</option>
618 <option value="1">Yes</option>
621 <div class="hint">Allow guarantors of this patron to view this patron's charges from the OPAC</div>
625 </fieldset> <!-- /#memberentry_guarantor -->
626 </div> <!-- #/memberentry_guarantor_anchor -->
628 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
629 <fieldset class="rows" id="non_patron_guarantor">
630 <legend>Non-patron guarantor</legend>
632 [% UNLESS nocontactname %]
634 [% IF ( mandatorycontactname ) %]
635 <label for="contactname" class="required">
637 <label for="contactname">
641 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
642 [% IF ( mandatorycontactname ) %]
643 <span class="required">Required</span>
645 <div class="hint">Non-patron guarantor surname</div>
647 [% END # /UNLESS nocontactname %]
649 [% UNLESS nocontactfirstname %]
651 [% IF ( mandatorycontactfirstname ) %]
652 <label for="contactfirstname" class="required">
654 <label for="contactfirstname">
656 Guarantor first name:
658 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
659 [% IF ( mandatorycontactfirstname ) %]
660 <span class="required">Required</span>
662 <div class="hint">Non-patron guarantor first name</div>
664 [% END # /UNLESS noaltcontactfirstname %]
666 [% UNLESS norelationship %]
667 [% IF possible_relationships %]
669 <label for="relationship">Relationship: </label>
670 <select class="relationship" name="relationship">
671 <option value=""></option>
672 [% FOREACH pr IN possible_relationships.split('\|') %]
673 [% IF pr == borrower_data.relationship %]
674 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
676 <option value="[% pr | html %]">[% pr | html %]</option>
681 [% END #/IF possible_relationships %]
682 [% END # /UNLESS norelationship %]
684 </fieldset> <!-- /#non_patron_guarantor -->
685 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
686 [% END # /IF show_guarantor || guarantor %]
688 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
689 [% PROCESS 'main-address-style' %]
690 [% END # /UNLESS nostreet && nocity etc group%]
692 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
693 <fieldset class="rows" id="memberentry_contact">
694 <legend id="contact_lgd">Contact information</legend>
698 [% IF ( mandatoryphone ) %]
699 <label for="phone" class="required">
705 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
706 [% IF ( mandatoryphone ) %]
707 <span class="required">Required</span>
709 <div class="hint">Shows on transit slips</div>
711 [% END # /UNLESS nophone %]
713 [% UNLESS nophonepro %]
715 [% IF ( mandatoryphonepro ) %]
716 <label for="phonepro" class="required">
718 <label for="phonepro">
722 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
723 [% IF ( mandatoryphonepro ) %]
724 <span class="required">Required</span>
727 [% END # /UNLESS nophonepro %]
729 [% UNLESS nomobile %]
731 [% IF ( mandatorymobile ) %]
732 <label for="mobile" class="required">
738 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
739 [% IF ( mandatorymobile ) %]
740 <span class="required">Required</span>
743 [% END # /UNLESS nomobile %]
747 [% IF ( mandatoryemail ) %]
748 <label for="email" class="required">
754 [% IF ( NoUpdateEmail ) %]
755 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
757 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
759 [% IF ( mandatoryemail ) %]
760 <span class="required">Required</span>
762 <div class="hint">Shows on transit slips</div>
764 [% END #/UNLESS noemail %]
766 [% UNLESS noemailpro %]
768 [% IF ( mandatoryemailpro ) %]
769 <label for="emailpro" class="required">
771 <label for="emailpro">
775 [% IF ( NoUpdateEmail ) %]
776 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
778 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
780 [% IF ( mandatoryemailpro ) %]
781 <span class="required">Required</span>
784 [% END #/UNLESS noemailpro %]
788 [% IF ( mandatoryfax ) %]
789 <label for="fax" class="required">
795 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
796 [% IF ( mandatoryfax ) %]
797 <span class="required">Required</span>
800 [% END #/UNLESS nofax %]
802 [% UNLESS noprimary_contact_method %]
804 [% IF mandatoryprimary_contact_method %]
805 <label for="primary_contact_method" class="required">
807 <label for="primary_contact_method">
809 Main contact method: </label>
811 <select id="primary_contact_method" name="primary_contact_method">
812 <option value=""></option>
814 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
815 <option value="phone" selected="selected">Primary phone</option>
817 <option value="phone">Primary phone</option>
820 [% UNLESS nophonepro %]
821 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
822 <option value="phonepro" selected="selected">Secondary phone</option>
824 <option value="phonepro">Secondary phone</option>
827 [% UNLESS nomobile %]
828 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
829 <option value="mobile" selected="selected">Other phone</option>
831 <option value="mobile">Other phone</option>
835 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
836 <option value="email" selected="selected">Primary email</option>
838 <option value="email">Primary email</option>
841 [% UNLESS noemailpro %]
842 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
843 <option value="emailpro" selected="selected">Secondary email</option>
845 <option value="emailpro">Secondary email</option>
849 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
850 <option value="fax" selected="selected">Fax</option>
852 <option value="fax">Fax</option>
856 [% IF mandatoryprimary_contact_method %]
857 <span class="required">Required</span>
862 </fieldset> <!-- /#memberentry_contact -->
863 [% END # hide fieldset %]
865 <!-- ************************ STEP_1 *********************** -->
866 [% END # /IF ( step_1 ) %]
869 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
870 [% PROCESS 'alt-address-style' %]
871 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
872 [% END # /IF ( step_6 ) %]
875 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
876 [% PROCESS 'alt-contact-style' %]
877 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
878 [% END # /IF ( step_2 ) %]
881 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
882 <fieldset class="rows" id="memberentry_library_management">
883 <legend id="library_management_lgd">Library management</legend>
885 [% UNLESS nocardnumber %]
887 [% IF mandatorycardnumber %]
888 <label for="cardnumber" class="required">
890 <label for="cardnumber" class="validated">
895 <!-- NOTE: div.hint closing tag isn't on the same line -->
896 [% IF minlength_cardnumber == maxlength_cardnumber %]
897 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
898 [% IF mandatorycardnumber %]
899 <span class="required">Required</span>
901 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
902 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
903 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
904 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
905 [% IF mandatorycardnumber %]
906 <span class="required">Required</span>
908 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
909 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
910 [% ELSIF maxlength_cardnumber %]
911 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
912 [% IF mandatorycardnumber %]
913 <span class="required">Required</span>
915 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
916 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
918 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
919 [% IF mandatorycardnumber %]
920 <span class="required">Required</span>
922 <div class="hint">There is no minimum or maximum character length.
924 [% IF autoMemberNum %]
925 [% IF mandatorycardnumber %]
926 <br/><span class="error">autoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
928 <br/>Leave blank for auto calc during registration
931 </div><!--/div.hint -->
933 [% END # /UNLESS nocardnumber %]
935 [% UNLESS nobranchcode %]
937 <label for="libraries" class="required">Library:</label>
938 <select name="branchcode" id="libraries">
939 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
941 <span class="required">Required</span>
946 <label for="categorycode_entry" class="required">Category: </label>
947 <select id="categorycode_entry" name="categorycode">
948 [% FOREACH category_type IN patron_categories.keys %]
949 [% SWITCH category_type %]
951 <optgroup label="Child">
953 <optgroup label="Adult">
955 <optgroup label="Staff">
957 <optgroup label="Organization">
959 <optgroup label="Professional">
961 <optgroup label="Statistical">
963 <optgroup label="Unknown">
965 [% FOREACH category IN patron_categories.$category_type %]
966 [% IF category.categorycode == patron_category.categorycode %]
967 <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>
969 <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>
975 [% IF limited_category %]
976 <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>
978 <span class="required">Required</span>
983 [% IF ( mandatorysort1 ) %]
984 <label for="sort1" class="required">
990 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
991 [% IF ( mandatorysort1 ) %]
992 <span class="required">Required</span>
995 [% END # /UNLESS nosort1 %]
999 [% IF ( mandatorysort2 ) %]
1000 <label for="sort2" class="required">
1006 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
1007 [% IF ( mandatorysort2 ) %]
1008 <span class="required">Required</span>
1011 [% END # /UNLESS nosort2 %]
1013 [% UNLESS noautorenew_checkouts %]
1015 <label for="yes-autorenew_checkouts">
1016 Allow auto-renewal of items:
1018 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
1019 <label for="yes-autorenew_checkouts">
1021 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1023 <label for="no-autorenew_checkouts">
1025 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1028 <label for="yes-autorenew_checkouts">
1030 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1032 <label for="no-autorenew_checkouts">
1034 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1041 <label for="protected">Protected:</label>
1042 [% IF ( patron.protected == 1 ) %]
1043 <label for="yes-protected">
1045 <input type="radio" id="yes-protected" name="protected" value="1" checked="checked" />
1047 <label for="no-protected">
1049 <input type="radio" id="no-protected" name="protected" value="0" />
1052 <label for="yes-protected">
1054 <input type="radio" id="yes-protected" name="protected" value="1" />
1056 <label for="no-protected">
1058 <input type="radio" id="no-protected" name="protected" value="0" checked="checked" />
1063 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1065 <label for="checkprevcheckout">Check for previous checkouts: </label>
1066 <select name="checkprevcheckout" id="checkprevcheckout">
1067 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1068 <option value="yes" selected="selected">Yes if settings allow it</option>
1069 <option value="no">No if settings allow it</option>
1070 <option value="inherit">Inherit from settings</option>
1071 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1072 <option value="yes">Yes if settings allow it</option>
1073 <option value="no" selected="selected">No if settings allow it</option>
1074 <option value="inherit">Inherit from settings</option>
1076 <option value="yes">Yes if settings allow it</option>
1077 <option value="no">No if settings allow it</option>
1078 <option value="inherit" selected="selected">Inherit from settings</option>
1082 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1084 [% IF Koha.Preference('TranslateNotices') %]
1086 <label for="lang">Preferred language for notices: </label>
1087 <select id="lang" name="lang">
1088 <option value="default">Default</option>
1089 [% FOR language IN languages %]
1090 [% FOR sublanguage IN language.sublanguages_loop %]
1091 [% IF language.plural %]
1092 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1093 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1095 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1098 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1099 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1101 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1103 [% END # /IF language.plural %]
1104 [% END # /FOR sublanguage %]
1105 [% END #/FOR language %]
1106 </select> <!-- /#lang -->
1108 [% END #/IF Koha.Preference('TranslateNotices') %]
1110 </fieldset> <!-- /#memberentry_library_management -->
1112 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1113 <fieldset class="rows" id="memberentry_subscription">
1114 <legend id="library_setup_lgd">Library setup</legend><ol>
1115 [% UNLESS nodateenrolled %]
1117 [% IF ( mandatorydateenrolled ) %]
1118 <label for="from" class="required">
1124 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1125 [% IF ( mandatorydateenrolled ) %]
1126 <span class="required">Required</span>
1128 [% IF ( ERROR_dateenrolled ) %]
1129 <span class="required">(Error)</span>
1131 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1133 [% END # /UNLESS nodateenrolled %]
1135 [% UNLESS nodateexpiry %]
1138 <li style="display:none">
1140 [% IF ( mandatorydateexpiry ) %]
1141 <label for="to" class="required">
1145 Expiry date (leave blank for auto calc):
1147 [% UNLESS ( opadd ) %]
1148 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1150 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1152 [% IF ( mandatorydateexpiry ) %]
1153 <span class="required">Required</span>
1155 [% IF ( ERROR_dateexpiry ) %]
1156 <span class="required">(Error)</span>
1158 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1161 [% UNLESS noopacnote %]
1163 [% IF ( mandatoryopacnote ) %]
1164 <label for="opacnote" class="required">
1166 <label for="opacnote">
1170 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1171 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1172 [% IF ( mandatoryopacnote ) %]
1173 <span class="required">Required</span>
1176 [% END # /UNLESS noopacnote %]
1178 [% UNLESS noborrowernotes %]
1180 [% IF ( mandatoryborrowernotes ) %]
1181 <label for="borrowernotes" class="required">
1183 <label for="borrowernotes">
1187 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS opduplicate %]</textarea>
1188 <div class="hint">This message displays when checking out to this patron</div>
1189 [% IF ( mandatoryborrowernotes ) %]
1190 <span class="required">Required</span>
1193 [% END # /UNLESS noborrowernotes %]
1195 </fieldset> <!-- /#memberentry_subscription -->
1196 [% END # hide fieldset %]
1198 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1199 <fieldset class="rows" id="memberentry_userid">
1200 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1202 [% UNLESS nouserid %]
1204 [% IF ( mandatoryuserid ) %]
1205 <label for="userid" class="required">
1207 <label for="userid">
1212 [% IF ( NoUpdateLogin ) %]
1213 [% IF ( opduplicate ) %]
1214 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1216 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1219 [% IF ( opduplicate ) %]
1220 <input type="text" id="userid" name="userid" size="20" value="" />
1222 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1224 [% END # /IF ( NoUpdateLogin ) %]
1226 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1227 <input type="text" disabled="disabled" style="display:none" />
1229 [% IF ( mandatoryuserid ) %]
1230 <span class="required">Required</span>
1233 [% END # /UNLESS nouserid %]
1235 [% UNLESS nopassword %]
1237 [% IF ( mandatorypassword ) %]
1238 <label for="password" class="required">
1240 <label for="password">
1245 [% IF ( NoUpdateLogin ) %]
1246 [% IF ( opduplicate ) %]
1247 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1249 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1252 [% IF ( opduplicate ) %]
1253 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1255 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1257 [% END # /IF ( NoUpdateLogin ) %]
1258 [% ELSE # IF ( opadd ) %]
1260 [% IF ( borrower_data.password ) %]
1261 [% IF ( NoUpdateLogin ) %]
1262 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1264 [% IF ( opduplicate ) %]
1265 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1267 <input type="password" id="password" name="password" size="20" value="****" />
1271 [% IF ( NoUpdateLogin ) %]
1272 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1274 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1276 [% END # /IF ( password ) %]
1277 [% END # /IF ( opadd ) %]
1278 [% IF ( mandatorypassword ) %]
1279 <span class="required">Required</span>
1281 [% IF ( ERROR_password_too_short ) %]
1282 <span class="required">Password is too short</span>
1284 [% IF ( ERROR_password_too_weak ) %]
1285 <span class="required">Password is too weak</span>
1287 [% IF ( ERROR_password_has_whitespaces ) %]
1288 <span class="required">Password has leading or trailing whitespaces</span>
1290 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1294 [% IF ( mandatorypassword ) %]
1295 <label for="password2" class="required">
1297 <label for="password2">
1302 [% IF ( NoUpdateLogin ) %]
1303 [% IF ( opduplicate ) %]
1304 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1306 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1309 [% IF ( opduplicate ) %]
1310 <input type="password" id="password2" name="password2" size="20" />
1312 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1315 [% ELSE # IF ( opadd ) %]
1316 [% IF ( borrower_data.password ) %]
1317 [% IF ( NoUpdateLogin ) %]
1318 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1320 [% IF ( opduplicate ) %]
1321 <input type="password" id="password2" name="password2" size="20" />
1323 <input type="password" id="password2" name="password2" size="20" value="****" />
1327 [% IF ( NoUpdateLogin ) %]
1328 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1330 <input type="password" id="password2" name="password2" size="20" value="" />
1333 [% END # /IF ( opadd ) %]
1335 [% IF ( mandatorypassword ) %]
1336 <span class="required">Required</span>
1338 [% IF ( ERROR_password_mismatch ) %]
1339 <span class="required">Passwords do not match</span>
1342 [% END # /UNLESS nopassword %]
1343 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1345 <label for="password_expiration_date">Password expiration date:</label>
1346 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1350 </fieldset> <!-- /#memberentry_userid -->
1351 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1353 <!--this zones are not necessary in modif mode -->
1354 [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1355 <fieldset class="rows" id="memberentry_account_flags">
1356 <legend id="account_flags_lgd">Patron account flags</legend>
1357 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1359 [% UNLESS nogonenoaddress %]
1361 [% IF mandatorygonenoaddress %]
1362 <label class="radio required" for="yesgonenoaddress">
1364 <label class="radio" for="yesgonenoaddress">
1368 [% IF CAN_user_circulate_manage_restrictions %]
1369 <label for="yesgonenoaddress">
1370 [% IF ( borrower_data.gonenoaddress ) %]
1371 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1373 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1377 <label for="nogonenoaddress">
1378 [% IF ( borrower_data.gonenoaddress ) %]
1379 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1381 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1386 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1387 [% END # /IF CAN_user_circulate_manage_restrictions %]
1388 [% IF mandatorygonenoaddress %]
1389 <span class="required">Required</span>
1393 [% END # /UNLESS nogonenoaddress %]
1396 [% IF mandatorylost %]
1397 <label class="radio required" for="yeslost">
1399 <label class="radio" for="yeslost">
1403 [% IF CAN_user_circulate_manage_restrictions %]
1404 <label for="yeslost">
1405 [% IF ( borrower_data.lost ) %]
1406 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1408 <input type="radio" id="yeslost" name="lost" value="1" />
1412 <label for="nolost">
1413 [% IF ( borrower_data.lost ) %]
1414 <input type="radio" id="nolost" name="lost" value="0" />
1416 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1421 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1422 [% END # /IF CAN_user_circulate_manage_restrictions %]
1423 [% IF mandatorylost %]
1424 <span class="required">Required</span>
1427 [% END # /UNLESS nogonenoaddress %]
1429 </fieldset> <!-- /#memberentry_account_flags -->
1431 <fieldset class="rows" id="memberentry_restrictions">
1432 <legend id="restrictions_lgd">Patron restrictions</legend>
1433 [% IF ( patron.restrictions.count ) %]
1440 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1441 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1447 [% FOREACH restriction IN patron.restrictions %]
1449 <td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
1451 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
1452 Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]
1454 [% restriction.comment | $raw %]
1458 [% IF restriction.expiration %]
1459 [% restriction.expiration | $KohaDates %]
1464 <td>[% restriction.created | $KohaDates %]</td>
1465 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1467 <input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" />
1471 [% END # /FOREACH d %]
1475 <p>Patron is currently unrestricted.</p>
1476 [% END # /IF ( patron.restrictions.count ) %]
1478 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1479 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
1480 <fieldset id="manual_restriction_form">
1481 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1482 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1484 [% IF Koha.Preference('PatronRestrictionTypes') %]
1486 <label for="debarred_type">Type:</label>
1487 <select name="debarred_type">
1488 [% FOREACH restriction_type IN restriction_types %]
1489 [% IF !restriction_type.is_system %]
1490 [% IF restriction_type.is_default %]
1491 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
1493 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
1501 <label for="debarred_comment">Comment: </label>
1502 <input type="text" id="debarred_comment" name="debarred_comment" />
1505 <label for="debarred_expiration">Expiration: </label>
1506 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1507 <a href="#" id="clear_debarred_expiration">Clear date</a>
1511 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1513 </fieldset> <!-- /#manual_restriction_form -->
1514 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1515 </fieldset> <!-- /#memberentry_restrictions -->
1516 [% END # /IF ( step_3 ) %]
1519 [% IF Koha.Preference('HouseboundModule') %]
1520 <fieldset class="rows" id="memberentry_housebound_roles">
1521 <legend id="housebound_roles">Housebound roles</legend>
1524 <label class="radio" for="housebound_chooser">
1527 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1528 <label for="yes_housebound_chooser">Yes </label>
1529 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1530 <label for="no_housebound_chooser">No </label>
1531 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1533 <label for="yes_housebound_chooser">Yes </label>
1534 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1535 <label for="no_housebound_chooser">No </label>
1536 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1540 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1541 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1542 <label for="yes_housebound_deliverer">Yes </label>
1543 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1544 <label for="no_housebound_deliverer">No </label>
1545 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1547 <label for="yes_housebound_deliverer">Yes </label>
1548 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1549 <label for="no_housebound_deliverer">No </label>
1550 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1553 </ol> <!-- /ol.radio -->
1554 </fieldset> <!-- /#memberentry_housebound_roles -->
1555 [% END # hide fieldset %]
1556 [% END # IF step_7 %]
1559 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1560 [% UNLESS ( no_patron_attribute_types ) %]
1561 <fieldset class="rows" id="memberentry_patron_attributes">
1562 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1563 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1564 [% FOREACH pa_loo IN patron_attributes %]
1565 <ol class="attributes_table">
1566 [% IF pa_loo.class %]
1567 <div id="aai_[% pa_loo.class | html %]">
1568 <h3 id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</h3>
1570 [% FOREACH patron_attribute IN pa_loo.items %]
1571 <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1572 [% IF patron_attribute.mandatory %]
1573 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1575 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1577 [% IF ( patron_attribute.use_dropdown ) %]
1578 [% IF patron_attribute.mandatory %]
1579 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1581 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1583 <option value=""></option>
1584 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1585 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1586 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1587 [% auth_val_loo.lib | html %]
1590 <option value="[% auth_val_loo.authorised_value | html %]" >
1591 [% auth_val_loo.lib | html %]
1597 [% IF patron_attribute.mandatory %]
1598 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1600 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1602 [% END # /IF ( patron_attribute.use_dropdown ) %]
1603 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1604 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
1605 [% IF ( patron_attribute.repeatable ) %]
1606 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1608 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1610 [% END # /FOREACH patron_attribute %]
1611 [% IF pa_loo.class %]</div>[% END %]
1613 [% END # /FOREACH pa_loo %]
1614 </fieldset> <!-- /#memberentry_patron_attributes -->
1615 [% END # UNLESS ( no_patron_attribute_types ) %]
1616 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1617 [% END # IF ( step_4 ) %]
1620 [% IF ( EnhancedMessagingPreferences ) %]
1621 <fieldset class="rows" id="memberentry_messaging_prefs">
1622 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1623 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1624 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1626 <input type="hidden" name="setting_messaging_prefs" value="1" />
1627 [% INCLUDE 'messaging-preference-form.inc' %]
1628 [% IF ( SMSSendDriver ) %]
1629 [% IF !nosmsalertnumber %]
1631 <label for="SMSnumber">SMS number:</label>
1632 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1633 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1636 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1638 <label for="sms_provider_id">SMS provider:</label>
1639 <select id="sms_provider_id" name="sms_provider_id">
1640 <option value="">Unknown</option>
1641 [% FOREACH s IN sms_providers %]
1642 [% IF s.id == borrower_data.sms_provider_id %]
1643 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1645 <option value="[% s.id | html %]">[% s.name | html %]</option>
1650 [% END # /UNLESS nosms_provider_id %]
1651 [% END # IF ( SMSSendDriver ) %]
1653 [% END # IF ( EnhancedMessagingPreferences ) %]
1654 [% END # /IF step_5 %]
1655 </form> <!-- /#entryform -->
1657 [% IF quickadd && opadd && !check_member %]
1658 <form id="quick_add_form" class="toggler">
1659 <fieldset class="rows quick_add"><legend>Quick add</legend>
1660 <ol id="quick_add_list">
1666 [% END # /UNLESS ( no_add ) %]
1668 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1670 [% UNLESS ( opadd ) %]
1671 <div class="col-sm-2 col-sm-pull-10">
1673 [% INCLUDE 'circ-menu.inc' %]
1675 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1677 </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 ( opadd || opduplicate ) %]
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('modify');
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 && opadd && !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 %]
1981 [% INCLUDE 'intranet-bottom.inc' %]