1 [% PROCESS 'i18n.inc' %]
8 [% PROCESS 'member-main-address-style.inc' %]
9 [% PROCESS 'member-alt-address-style.inc' %]
10 [% PROCESS 'member-alt-contact-style.inc' %]
11 [% PROCESS 'restriction-types.inc' %]
12 [% SET footerjs = 1 %]
13 [% INCLUDE 'doc-head-open.inc' %]
15 [% UNLESS blocking_error %]
21 [% INCLUDE 'patron-title.inc' no_html = 1 %]
22 [% IF patron_category %]([% patron_category.description | html %])[% END %]
23 [% END %] › Patrons › Koha
30 [% INCLUDE 'doc-head-close.inc' %]
33 <body id="pat_memberentrygen" class="pat">
34 [% WRAPPER 'header.inc' %]
35 [% INCLUDE 'patron-search-header.inc' %]
38 [% WRAPPER 'sub-header.inc' %]
39 [% WRAPPER breadcrumbs %]
40 [% WRAPPER breadcrumb_item %]
41 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
43 [% UNLESS blocking_error %]
45 [% IF (borrower_data.firstname || borrower_data.surname ) %]
46 [% WRAPPER breadcrumb_item %]
47 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
48 [% INCLUDE 'patron-title.inc' %]
54 [% WRAPPER breadcrumb_item bc_active= 1 %]
56 <span>Add patron</span>
58 <span>Modify patron</span>
60 [% IF patron_category %]
61 ([% patron_category.description | html %])
64 [% END #/ WRAPPER breadcrumbs %]
65 [% END #/ WRAPPER sub-header.inc %]
67 <div class="main container-fluid">
69 [% IF borrower_data.messages %]
70 [% FOR message IN borrower_data.messages %]
71 [% SWITCH message.error %]
72 [% CASE 'error_on_insert_patron' %]
73 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
74 [% CASE 'error_on_update_patron' %]
75 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
76 [% CASE %]<div class="dialog alert">Unhandled error: [% message.error | html %]</div>
81 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
83 <div class="col-sm-10 col-sm-push-2">
85 <main class="clearfix">
86 [% INCLUDE 'blocking_errors.inc' %]
89 [% IF ( error_alert == "no_email" ) %]
90 <div class="dialog alert">This member has no email</div>
92 <div class="dialog alert">[% error_alert | html %]</div>
96 <div class="dialog message">Email has been sent.</div>
99 [% INCLUDE 'noadd-warnings.inc' %]
101 [% UNLESS ( no_add ) %]
104 <span>Add patron</span>
105 [% ELSIF ( opduplicate ) %]
106 <span>Duplicate patron</span>
108 <span>Modify patron</span>
110 [% INCLUDE 'patron-title.inc' %]
111 [% IF patron_category %]([% patron_category.description | html %])[% END %]
114 [% IF quickadd && opadd && !check_member %]
115 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
116 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
119 [% IF ( check_member ) %]
120 <div class="dialog alert">
121 <h3>Duplicate patron record?</h3>
122 <p><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&borrowernumber=[% check_member | uri %]"><i class="fa fa-window-restore"></i> View existing record</a></p>
123 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
124 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
129 <div class="dialog alert">
130 <p>The following fields are wrong. Please fix them.</p>
132 [% IF ( ERROR_login_exist ) %]
133 <li id="ERROR_login_exist">Username already exists or could not create unique new one.</li>
135 [% IF ERROR_cardnumber_already_exists %]
136 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
138 [% IF ERROR_cardnumber_length %]
139 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
141 [% IF ( ERROR_age_limitations ) %]
142 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
143 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
145 [% IF ( ERROR_branch ) %]
146 <li id="ERROR_branch">Library is invalid.</li>
148 [% IF ( ERROR_dateofbirth ) %]
149 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
151 [% IF ( ERROR_dateenrolled ) %]
152 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
154 [% IF ( ERROR_dateexpiry ) %]
155 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
157 [% IF ( ERROR_password_too_short ) %]
158 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
160 [% IF ( ERROR_password_too_weak ) %]
161 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
163 [% IF ( ERROR_password_has_whitespaces ) %]
164 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
166 [% IF ( ERROR_password_mismatch ) %]
167 <li id="ERROR_password_mismatch">Passwords do not match.</li>
169 [% IF ( ERROR_password_expiration_date ) %]
170 <li id="ERROR_dateexpiry">Password expiration date is invalid.</li>
172 [% IF ( ERROR_extended_unique_id_failed ) %]
173 <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>
175 [% IF ERROR_bad_email %]
176 <li id="ERROR_bad_email">The primary email is invalid.</li>
178 [% IF ERROR_bad_email_secondary %]
179 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
181 [% IF ERROR_bad_email_alternative %]
182 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
188 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
189 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
191 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
192 [% FOREACH field IN fieldstohide.split(',') %]
194 [% CASE 'identity' %] <span>Patron identity</span> |
195 [% CASE 'guarantor' %] <span>Guarantor information</span> |
196 [% CASE 'primary_address' %] <span>Main address</span> |
197 [% CASE 'primary_contact' %] <span>Contact information</span> |
198 [% CASE 'alt_address' %] <span>Alternate address</span> |
199 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
200 [% CASE 'lib_mgmt' %] <span>Library management</span> |
201 [% CASE 'lib_setup' %] <span>Library setup</span> |
202 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
203 [% CASE 'flags' %] <span>Patron account flags</span> |
204 [% CASE 'debarments' %] <span>Patron restrictions</span> |
205 [% CASE 'housebound' %] <span>Housebound roles</span> |
206 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
207 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
213 [% UNLESS ( check_member ) %]
214 <div id="toolbar" class="btn-toolbar">
215 [% IF quickadd && opadd %]
216 <button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
218 <button class="btn btn-primary toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
220 <a class="btn btn-link" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
222 <a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
224 <i class="fa fa-times"></i> Cancel
229 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
230 [% UNLESS ( check_member ) %]
231 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
233 <!-- field always hidden in different form (1,2,3) -->
234 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
235 <input type="hidden" name="updtype" value="[% updtype | html %]" />
236 <input type="hidden" name="destination" value="[% destination | html %]" />
237 <input type="hidden" name="check_member" value="[% check_member | html %]" />
238 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
239 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
240 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
242 <input type="hidden" name="step" value="[% step | html %]" />
245 <input type="hidden" name="op" value="insert" />
246 [% ELSIF ( opduplicate ) %]
247 <input type="hidden" name="op" value="insert" />
249 <input type="hidden" name="op" value="save" />
250 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
251 [%# Only put the card number if we arent showing it in the form later %]
252 [% IF borrower_data.cardnumber %]
253 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
259 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
260 <fieldset class="rows" id="memberentry_identity">
261 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span></legend>
263 [% UNLESS ( patron_category.category_type == 'I' ) %]
265 [% IF Koha.Preference('BorrowersTitles') %]
267 [% IF ( mandatorytitle ) %]
268 <label for="btitle" class="required">
273 <select id="btitle" name="title">
274 <option value=""></option>
275 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
277 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
279 <option value="[% t | html %]">[% t | html %]</option>
283 [% IF ( mandatorytitle ) %]
284 <span class="required">Required</span>
287 [% END # /IF Koha.Preference('BorrowersTitles') %]
288 [% END # /UNLESS notitle %]
289 [% END # /UNLESS ( I ) %]
291 [% UNLESS nosurname %]
293 [% IF ( patron_category.category_type == 'I' ) %]
294 <label for="surname" class="required">
298 [% IF ( mandatorysurname ) %]
299 <label for="surname" class="required">
301 <label for="surname">
306 [% IF ( uppercasesurnames ) %]
307 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
309 <input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
311 [% IF ( mandatorysurname ) %]
312 <span class="required">Required</span>
315 [% END # /UNLESS nosurname %]
317 [% UNLESS ( patron_category.category_type == 'I' ) %]
318 [% UNLESS nofirstname %]
320 [% IF ( mandatoryfirstname ) %]
321 <label for="firstname" class="required">
323 <label for="firstname">
327 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
328 [% IF ( mandatoryfirstname ) %]
329 <span class="required">Required</span>
332 [% END #/UNLESS nofirstname %]
333 [% UNLESS nomiddle_name %]
335 [% IF ( mandatorymiddle_name ) %]
336 <label for="middle_name" class="required">
338 <label for="middle_name">
342 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
343 [% IF ( mandatorymiddle_name ) %]
344 <span class="required">Required</span>
347 [% END #/UNLESS nomiddle_name %]
348 [% UNLESS nodateofbirth %]
350 [% IF ( mandatorydateofbirth ) %]
351 <label for="dateofbirth" class="required">
353 <label for="dateofbirth">
357 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
358 [% IF ( mandatorydateofbirth ) %]
359 <span class="required">Required</span>
361 [% IF ( ERROR_dateofbirth ) %]
362 <span class="required">(Error)</span>
364 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
366 [% END # /UNLESS nodateofbirth %]
367 [% UNLESS noinitials %]
369 [% IF ( mandatoryinitials ) %]
370 <label for="initials" class="required">
372 <label for="initials">
376 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
377 [% IF ( mandatoryinitials ) %]
378 <span class="required">Required</span>
381 [% END # /UNLESS noinitials %]
382 [% UNLESS nopronouns %]
384 [% IF ( mandatorypronouns ) %]
385 <label for="pronouns" class="required">
387 <label for="pronouns">
391 <input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS opduplicate %]" />
392 [% IF ( mandatorypronouns ) %]
393 <span class="required">Required</span>
396 [% END # /UNLESS nopronouns %]
397 [% END #/UNLESS ( I ) %]
398 [% UNLESS noothernames %]
400 [% IF ( mandatoryothernames ) %]
401 <label for="othernames" class="required">
403 <label for="othernames">
407 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
408 [% IF ( mandatoryothernames ) %]
409 <span class="required">Required</span>
411 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
413 [% END #/UNLESS noothernames %]
415 [% UNLESS ( patron_category.category_type == 'I' ) %]
418 [% UNLESS ( opduplicate ) %]
420 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
422 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
425 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
427 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
430 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
432 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
435 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
437 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
440 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
441 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
442 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
443 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
444 [% END # /UNLESS ( opduplicate )%]
446 [% END # /UNLESS nosex %]
447 [% END # /UNLESS ( I ) %]
449 </fieldset> <!-- /#memberentry_identity -->
450 [% END # hide fieldset %]
452 [% IF show_guarantor || guarantor %]
453 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
454 <div id="memberentry_guarantor_anchor">
455 <fieldset id="memberentry_guarantor" class="rows">
456 <legend>Patron guarantor</legend>
458 <div id="guarantor_relationships">
459 [% FOREACH r IN relationships %]
462 [% IF patron_category.category_type == 'I' %]
463 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
464 <span class="label">Organization:</span>
465 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
468 <span class="label">Relationship:</span>
469 <span>[% r.relationship | html %]</span>
472 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
473 <span class="label">Guarantor:</span>
474 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
477 <span class="label">Relationship:</span>
478 <span>[% r.relationship | html %]</span>
482 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
483 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
488 [% END # END relationships foreach %]
489 [% IF guarantor && (!relationships) %]
490 <fieldset class="guarantor">
492 <li class="guarantor-details" data-borrowernumber="0">
493 <span class="label">Guarantor:</span>
494 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
495 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
498 [% IF possible_relationships %]
500 [% UNLESS empty_relationship_allowed %]
501 <label for="guarantor_relationship" class="required">Relationship: </label>
502 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
504 <label for="guarantor_relationship">Relationship: </label>
505 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
507 <option value="" selected>Empty option</option>
508 [% FOREACH pr IN possible_relationships.split('\|') %]
510 <option value="[% pr | html %]">[% pr | html %]</option>
514 [% UNLESS empty_relationship_allowed %]
515 <span class="required">Required</span>
519 <input type="hidden" name="new_guarantor_relationship" value="" />
523 <label for="guarantor_cancel"> </label>
524 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
529 </div> <!-- #/guarantor_relationships -->
531 <fieldset class="guarantor" id="guarantor_template">
533 <li class="guarantor-details" data-borrowernumber="0">
534 <span class="label">Guarantor:</span>
535 <a class="new_guarantor_link" href="#" target="blank">
536 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
537 (<span class="new_guarantor_id_text"></span>)
539 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
542 [% IF possible_relationships %]
544 [% UNLESS empty_relationship_allowed %]
545 <label for="guarantor_relationship" class="required">Relationship: </label>
546 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
548 <label for="guarantor_relationship">Relationship: </label>
549 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
551 <option value="" selected></option>
552 [% FOREACH pr IN possible_relationships.split('\|') %]
554 <option value="[% pr | html %]">[% pr | html %]</option>
558 [% UNLESS empty_relationship_allowed %]
559 <span class="required">Required</span>
563 <input type="hidden" name="new_guarantor_relationship" value="" />
567 <label for="guarantor_cancel"> </label>
568 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
574 <input type="hidden" id="guarantor_id" value="" />
575 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
576 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
579 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
582 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
584 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
585 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
586 [% IF borrower_data.privacy_guarantor_checkouts %]
587 <option value="0">No</option>
588 <option value="1" selected>Yes</option>
590 <option value="0" selected>No</option>
591 <option value="1">Yes</option>
594 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
597 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
599 <label for="privacy_guarantor_fines">Show charges to guarantors</label>
600 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
601 [% IF borrower_data.privacy_guarantor_fines %]
602 <option value="0">No</option>
603 <option value="1" selected>Yes</option>
605 <option value="0" selected>No</option>
606 <option value="1">Yes</option>
609 <div class="hint">Allow guarantors of this patron to view this patron's charges from the OPAC</div>
613 </fieldset> <!-- /#memberentry_guarantor -->
614 </div> <!-- #/memberentry_guarantor_anchor -->
616 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
617 <fieldset class="rows" id="non_patron_guarantor">
618 <legend>Non-patron guarantor</legend>
620 [% UNLESS nocontactname %]
622 [% IF ( mandatorycontactname ) %]
623 <label for="contactname" class="required">
625 <label for="contactname">
629 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
630 [% IF ( mandatorycontactname ) %]
631 <span class="required">Required</span>
633 <div class="hint">Non-patron guarantor surname</div>
635 [% END # /UNLESS nocontactname %]
637 [% UNLESS nocontactfirstname %]
639 [% IF ( mandatorycontactfirstname ) %]
640 <label for="contactfirstname" class="required">
642 <label for="contactfirstname">
644 Guarantor first name:
646 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
647 [% IF ( mandatorycontactfirstname ) %]
648 <span class="required">Required</span>
650 <div class="hint">Non-patron guarantor first name</div>
652 [% END # /UNLESS noaltcontactfirstname %]
654 [% UNLESS norelationship %]
655 [% IF possible_relationships %]
657 <label for="relationship">Relationship: </label>
658 <select class="relationship" name="relationship">
659 <option value=""></option>
660 [% FOREACH pr IN possible_relationships.split('\|') %]
661 [% IF pr == borrower_data.relationship %]
662 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
664 <option value="[% pr | html %]">[% pr | html %]</option>
669 [% END #/IF possible_relationships %]
670 [% END # /UNLESS norelationship %]
672 </fieldset> <!-- /#non_patron_guarantor -->
673 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
674 [% END # /IF show_guarantor || guarantor %]
676 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
677 [% PROCESS 'main-address-style' %]
678 [% END # /UNLESS nostreet && nocity etc group%]
680 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
681 <fieldset class="rows" id="memberentry_contact">
682 <legend id="contact_lgd">Contact information</legend>
686 [% IF ( mandatoryphone ) %]
687 <label for="phone" class="required">
693 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
694 [% IF ( mandatoryphone ) %]
695 <span class="required">Required</span>
697 <div class="hint">Shows on transit slips</div>
699 [% END # /UNLESS nophone %]
701 [% UNLESS nophonepro %]
703 [% IF ( mandatoryphonepro ) %]
704 <label for="phonepro" class="required">
706 <label for="phonepro">
710 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
711 [% IF ( mandatoryphonepro ) %]
712 <span class="required">Required</span>
715 [% END # /UNLESS nophonepro %]
717 [% UNLESS nomobile %]
719 [% IF ( mandatorymobile ) %]
720 <label for="mobile" class="required">
726 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
727 [% IF ( mandatorymobile ) %]
728 <span class="required">Required</span>
731 [% END # /UNLESS nomobile %]
735 [% IF ( mandatoryemail ) %]
736 <label for="email" class="required">
742 [% IF ( NoUpdateEmail ) %]
743 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
745 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
747 [% IF ( mandatoryemail ) %]
748 <span class="required">Required</span>
750 <div class="hint">Shows on transit slips</div>
752 [% END #/UNLESS noemail %]
754 [% UNLESS noemailpro %]
756 [% IF ( mandatoryemailpro ) %]
757 <label for="emailpro" class="required">
759 <label for="emailpro">
763 [% IF ( NoUpdateEmail ) %]
764 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
766 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
768 [% IF ( mandatoryemailpro ) %]
769 <span class="required">Required</span>
772 [% END #/UNLESS noemailpro %]
776 [% IF ( mandatoryfax ) %]
777 <label for="fax" class="required">
783 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
784 [% IF ( mandatoryfax ) %]
785 <span class="required">Required</span>
788 [% END #/UNLESS nofax %]
790 [% UNLESS noprimary_contact_method %]
792 [% IF mandatoryprimary_contact_method %]
793 <label for="primary_contact_method" class="required">
795 <label for="primary_contact_method">
797 Main contact method: </label>
799 <select id="primary_contact_method" name="primary_contact_method">
800 <option value=""></option>
802 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
803 <option value="phone" selected="selected">Primary phone</option>
805 <option value="phone">Primary phone</option>
808 [% UNLESS nophonepro %]
809 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
810 <option value="phonepro" selected="selected">Secondary phone</option>
812 <option value="phonepro">Secondary phone</option>
815 [% UNLESS nomobile %]
816 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
817 <option value="mobile" selected="selected">Other phone</option>
819 <option value="mobile">Other phone</option>
823 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
824 <option value="email" selected="selected">Primary email</option>
826 <option value="email">Primary email</option>
829 [% UNLESS noemailpro %]
830 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
831 <option value="emailpro" selected="selected">Secondary email</option>
833 <option value="emailpro">Secondary email</option>
837 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
838 <option value="fax" selected="selected">Fax</option>
840 <option value="fax">Fax</option>
844 [% IF mandatoryprimary_contact_method %]
845 <span class="required">Required</span>
850 </fieldset> <!-- /#memberentry_contact -->
851 [% END # hide fieldset %]
853 <!-- ************************ STEP_1 *********************** -->
854 [% END # /IF ( step_1 ) %]
857 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
858 [% PROCESS 'alt-address-style' %]
859 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
860 [% END # /IF ( step_6 ) %]
863 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
864 [% PROCESS 'alt-contact-style' %]
865 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
866 [% END # /IF ( step_2 ) %]
869 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
870 <fieldset class="rows" id="memberentry_library_management">
871 <legend id="library_management_lgd">Library management</legend>
873 [% UNLESS nocardnumber %]
875 [% IF mandatorycardnumber %]
876 <label for="cardnumber" class="required">
878 <label for="cardnumber" class="validated">
883 <!-- NOTE: div.hint closing tag isn't on the same line -->
884 [% IF minlength_cardnumber == maxlength_cardnumber %]
885 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
886 [% IF mandatorycardnumber %]
887 <span class="required">Required</span>
889 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
890 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
891 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
892 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
893 [% IF mandatorycardnumber %]
894 <span class="required">Required</span>
896 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
897 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
898 [% ELSIF maxlength_cardnumber %]
899 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
900 [% IF mandatorycardnumber %]
901 <span class="required">Required</span>
903 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
904 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
906 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
907 [% IF mandatorycardnumber %]
908 <span class="required">Required</span>
910 <div class="hint">There is no minimum or maximum character length.
912 [% IF autoMemberNum %]
913 [% IF mandatorycardnumber %]
914 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
916 <br/>Leave blank for auto calc during registration
919 </div><!--/div.hint -->
921 [% END # /UNLESS nocardnumber %]
923 [% UNLESS nobranchcode %]
925 <label for="libraries" class="required">Library:</label>
926 <select name="branchcode" id="libraries">
927 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
929 <span class="required">Required</span>
934 <label for="categorycode_entry" class="required">Category: </label>
935 <select id="categorycode_entry" name="categorycode">
936 [% FOREACH category_type IN patron_categories.keys %]
937 [% SWITCH category_type %]
939 <optgroup label="Child">
941 <optgroup label="Adult">
943 <optgroup label="Staff">
945 <optgroup label="Organization">
947 <optgroup label="Professional">
949 <optgroup label="Statistical">
951 <optgroup label="Unknown">
953 [% FOREACH category IN patron_categories.$category_type %]
954 [% IF category.categorycode == patron_category.categorycode %]
955 <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>
957 <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>
963 [% IF limited_category %]
964 <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>
966 <span class="required">Required</span>
971 [% IF ( mandatorysort1 ) %]
972 <label for="sort1" class="required">
978 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
979 [% IF ( mandatorysort1 ) %]
980 <span class="required">Required</span>
983 [% END # /UNLESS nosort1 %]
987 [% IF ( mandatorysort2 ) %]
988 <label for="sort2" class="required">
994 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
995 [% IF ( mandatorysort2 ) %]
996 <span class="required">Required</span>
999 [% END # /UNLESS nosort2 %]
1001 [% UNLESS noautorenew_checkouts %]
1003 <label for="yes-autorenew_checkouts">
1004 Allow auto-renewal of items:
1006 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
1007 <label for="yes-autorenew_checkouts">
1009 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1011 <label for="no-autorenew_checkouts">
1013 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1016 <label for="yes-autorenew_checkouts">
1018 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1020 <label for="no-autorenew_checkouts">
1022 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1028 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1030 <label for="checkprevcheckout">Check for previous checkouts: </label>
1031 <select name="checkprevcheckout" id="checkprevcheckout">
1032 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1033 <option value="yes" selected="selected">Yes if settings allow it</option>
1034 <option value="no">No if settings allow it</option>
1035 <option value="inherit">Inherit from settings</option>
1036 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1037 <option value="yes">Yes if settings allow it</option>
1038 <option value="no" selected="selected">No if settings allow it</option>
1039 <option value="inherit">Inherit from settings</option>
1041 <option value="yes">Yes if settings allow it</option>
1042 <option value="no">No if settings allow it</option>
1043 <option value="inherit" selected="selected">Inherit from settings</option>
1047 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1049 [% IF Koha.Preference('TranslateNotices') %]
1051 <label for="lang">Preferred language for notices: </label>
1052 <select id="lang" name="lang">
1053 <option value="default">Default</option>
1054 [% FOR language IN languages %]
1055 [% FOR sublanguage IN language.sublanguages_loop %]
1056 [% IF language.plural %]
1057 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1058 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1060 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1063 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1064 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1066 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1068 [% END # /IF language.plural %]
1069 [% END # /FOR sublanguage %]
1070 [% END #/FOR language %]
1071 </select> <!-- /#lang -->
1073 [% END #/IF Koha.Preference('TranslateNotices') %]
1075 </fieldset> <!-- /#memberentry_library_management -->
1077 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1078 <fieldset class="rows" id="memberentry_subscription">
1079 <legend id="library_setup_lgd">Library setup</legend><ol>
1080 [% UNLESS nodateenrolled %]
1082 [% IF ( mandatorydateenrolled ) %]
1083 <label for="from" class="required">
1089 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1090 [% IF ( mandatorydateenrolled ) %]
1091 <span class="required">Required</span>
1093 [% IF ( ERROR_dateenrolled ) %]
1094 <span class="required">(Error)</span>
1096 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1098 [% END # /UNLESS nodateenrolled %]
1100 [% UNLESS nodateexpiry %]
1103 <li style="display:none">
1105 [% IF ( mandatorydateexpiry ) %]
1106 <label for="to" class="required">
1110 Expiry date (leave blank for auto calc):
1112 [% UNLESS ( opadd ) %]
1113 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1115 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1117 [% IF ( mandatorydateexpiry ) %]
1118 <span class="required">Required</span>
1120 [% IF ( ERROR_dateexpiry ) %]
1121 <span class="required">(Error)</span>
1123 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1126 [% UNLESS noopacnote %]
1128 [% IF ( mandatoryopacnote ) %]
1129 <label for="opacnote" class="required">
1131 <label for="opacnote">
1135 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1136 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1137 [% IF ( mandatoryopacnote ) %]
1138 <span class="required">Required</span>
1141 [% END # /UNLESS noopacnote %]
1143 [% UNLESS noborrowernotes %]
1145 [% IF ( mandatoryborrowernotes ) %]
1146 <label for="borrowernotes" class="required">
1148 <label for="borrowernotes">
1152 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS opduplicate %]</textarea>
1153 <div class="hint">This message displays when checking out to this patron</div>
1154 [% IF ( mandatoryborrowernotes ) %]
1155 <span class="required">Required</span>
1158 [% END # /UNLESS noborrowernotes %]
1160 </fieldset> <!-- /#memberentry_subscription -->
1161 [% END # hide fieldset %]
1163 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1164 <fieldset class="rows" id="memberentry_userid">
1165 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1167 [% UNLESS nouserid %]
1169 [% IF ( mandatoryuserid ) %]
1170 <label for="userid" class="required">
1172 <label for="userid">
1177 [% IF ( NoUpdateLogin ) %]
1178 [% IF ( opduplicate ) %]
1179 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1181 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1184 [% IF ( opduplicate ) %]
1185 <input type="text" id="userid" name="userid" size="20" value="" />
1187 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1189 [% END # /IF ( NoUpdateLogin ) %]
1191 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1192 <input type="text" disabled="disabled" style="display:none" />
1194 [% IF ( mandatoryuserid ) %]
1195 <span class="required">Required</span>
1198 [% END # /UNLESS nouserid %]
1200 [% UNLESS nopassword %]
1202 [% IF ( mandatorypassword ) %]
1203 <label for="password" class="required">
1205 <label for="password">
1210 [% IF ( NoUpdateLogin ) %]
1211 [% IF ( opduplicate ) %]
1212 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1214 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1217 [% IF ( opduplicate ) %]
1218 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1220 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1222 [% END # /IF ( NoUpdateLogin ) %]
1223 [% ELSE # IF ( opadd ) %]
1225 [% IF ( borrower_data.password ) %]
1226 [% IF ( NoUpdateLogin ) %]
1227 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1229 [% IF ( opduplicate ) %]
1230 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1232 <input type="password" id="password" name="password" size="20" value="****" />
1236 [% IF ( NoUpdateLogin ) %]
1237 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1239 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1241 [% END # /IF ( password ) %]
1242 [% END # /IF ( opadd ) %]
1243 [% IF ( mandatorypassword ) %]
1244 <span class="required">Required</span>
1246 [% IF ( ERROR_password_too_short ) %]
1247 <span class="required">Password is too short</span>
1249 [% IF ( ERROR_password_too_weak ) %]
1250 <span class="required">Password is too weak</span>
1252 [% IF ( ERROR_password_has_whitespaces ) %]
1253 <span class="required">Password has leading or trailing whitespaces</span>
1255 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1259 [% IF ( mandatorypassword ) %]
1260 <label for="password2" class="required">
1262 <label for="password2">
1267 [% IF ( NoUpdateLogin ) %]
1268 [% IF ( opduplicate ) %]
1269 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1271 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1274 [% IF ( opduplicate ) %]
1275 <input type="password" id="password2" name="password2" size="20" />
1277 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1280 [% ELSE # IF ( opadd ) %]
1281 [% IF ( borrower_data.password ) %]
1282 [% IF ( NoUpdateLogin ) %]
1283 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1285 [% IF ( opduplicate ) %]
1286 <input type="password" id="password2" name="password2" size="20" />
1288 <input type="password" id="password2" name="password2" size="20" value="****" />
1292 [% IF ( NoUpdateLogin ) %]
1293 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1295 <input type="password" id="password2" name="password2" size="20" value="" />
1298 [% END # /IF ( opadd ) %]
1300 [% IF ( mandatorypassword ) %]
1301 <span class="required">Required</span>
1303 [% IF ( ERROR_password_mismatch ) %]
1304 <span class="required">Passwords do not match</span>
1307 [% END # /UNLESS nopassword %]
1308 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1310 <label for="password_expiration_date">Password expiration date:</label>
1311 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1315 </fieldset> <!-- /#memberentry_userid -->
1316 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1318 <!--this zones are not necessary in modif mode -->
1319 [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1320 <fieldset class="rows" id="memberentry_account_flags">
1321 <legend id="account_flags_lgd">Patron account flags</legend>
1322 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1324 [% UNLESS nogonenoaddress %]
1326 [% IF mandatorygonenoaddress %]
1327 <label class="radio required" for="yesgonenoaddress">
1329 <label class="radio" for="yesgonenoaddress">
1333 [% IF CAN_user_circulate_manage_restrictions %]
1334 <label for="yesgonenoaddress">
1335 [% IF ( borrower_data.gonenoaddress ) %]
1336 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1338 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1342 <label for="nogonenoaddress">
1343 [% IF ( borrower_data.gonenoaddress ) %]
1344 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1346 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1351 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1352 [% END # /IF CAN_user_circulate_manage_restrictions %]
1353 [% IF mandatorygonenoaddress %]
1354 <span class="required">Required</span>
1358 [% END # /UNLESS nogonenoaddress %]
1361 [% IF mandatorylost %]
1362 <label class="radio required" for="yeslost">
1364 <label class="radio" for="yeslost">
1368 [% IF CAN_user_circulate_manage_restrictions %]
1369 <label for="yeslost">
1370 [% IF ( borrower_data.lost ) %]
1371 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1373 <input type="radio" id="yeslost" name="lost" value="1" />
1377 <label for="nolost">
1378 [% IF ( borrower_data.lost ) %]
1379 <input type="radio" id="nolost" name="lost" value="0" />
1381 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1386 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1387 [% END # /IF CAN_user_circulate_manage_restrictions %]
1388 [% IF mandatorylost %]
1389 <span class="required">Required</span>
1392 [% END # /UNLESS nogonenoaddress %]
1394 </fieldset> <!-- /#memberentry_account_flags -->
1396 <fieldset class="rows" id="memberentry_restrictions">
1397 <legend id="restrictions_lgd">Patron restrictions</legend>
1398 [% IF ( patron.restrictions.count ) %]
1405 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1406 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1412 [% FOREACH restriction IN patron.restrictions %]
1414 <td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
1416 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
1417 Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]
1419 [% restriction.comment | $raw %]
1423 [% IF restriction.expiration %]
1424 [% restriction.expiration | $KohaDates %]
1429 <td>[% restriction.created | $KohaDates %]</td>
1430 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1432 <input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" />
1436 [% END # /FOREACH d %]
1440 <p>Patron is currently unrestricted.</p>
1441 [% END # /IF ( patron.restrictions.count ) %]
1443 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1444 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
1445 <fieldset id="manual_restriction_form">
1446 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1447 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1449 [% IF Koha.Preference('PatronRestrictionTypes') %]
1451 <label for="debarred_type">Type:</label>
1452 <select name="debarred_type">
1453 [% FOREACH restriction_type IN restriction_types %]
1454 [% IF !restriction_type.is_system %]
1455 [% IF restriction_type.is_default %]
1456 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
1458 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
1466 <label for="debarred_comment">Comment: </label>
1467 <input type="text" id="debarred_comment" name="debarred_comment" />
1470 <label for="debarred_expiration">Expiration: </label>
1471 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1472 <a href="#" id="clear_debarred_expiration">Clear date</a>
1476 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1478 </fieldset> <!-- /#manual_restriction_form -->
1479 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1480 </fieldset> <!-- /#memberentry_restrictions -->
1481 [% END # /UNLESS ( opadd || opduplicate ) %]
1482 [% END # /IF ( step_3 ) %]
1485 [% IF Koha.Preference('HouseboundModule') %]
1486 <fieldset class="rows" id="memberentry_housebound_roles">
1487 <legend id="housebound_roles">Housebound roles</legend>
1490 <label class="radio" for="housebound_chooser">
1493 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1494 <label for="yes_housebound_chooser">Yes </label>
1495 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1496 <label for="no_housebound_chooser">No </label>
1497 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1499 <label for="yes_housebound_chooser">Yes </label>
1500 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1501 <label for="no_housebound_chooser">No </label>
1502 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1506 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1507 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1508 <label for="yes_housebound_deliverer">Yes </label>
1509 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1510 <label for="no_housebound_deliverer">No </label>
1511 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1513 <label for="yes_housebound_deliverer">Yes </label>
1514 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1515 <label for="no_housebound_deliverer">No </label>
1516 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1519 </ol> <!-- /ol.radio -->
1520 </fieldset> <!-- /#memberentry_housebound_roles -->
1521 [% END # hide fieldset %]
1522 [% END # IF step_7 %]
1525 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1526 [% UNLESS ( no_patron_attribute_types ) %]
1527 <fieldset class="rows" id="memberentry_patron_attributes">
1528 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1529 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1530 [% FOREACH pa_loo IN patron_attributes %]
1531 <ol class="attributes_table">
1532 [% IF pa_loo.class %]
1533 <fieldset id="aai_[% pa_loo.class | html %]">
1534 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1536 [% FOREACH patron_attribute IN pa_loo.items %]
1537 <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1538 [% IF patron_attribute.mandatory %]
1539 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1541 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1543 [% IF ( patron_attribute.use_dropdown ) %]
1544 [% IF patron_attribute.mandatory %]
1545 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1547 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1549 <option value=""></option>
1550 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1551 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1552 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1553 [% auth_val_loo.lib | html %]
1556 <option value="[% auth_val_loo.authorised_value | html %]" >
1557 [% auth_val_loo.lib | html %]
1563 [% IF patron_attribute.mandatory %]
1564 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1566 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1568 [% END # /IF ( patron_attribute.use_dropdown ) %]
1569 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1570 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1571 [% IF ( patron_attribute.repeatable ) %]
1572 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1574 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1576 [% END # /FOREACH patron_attribute %]
1577 [% IF pa_loo.class %]</fieldset>[% END %]
1579 [% END # /FOREACH pa_loo %]
1580 </fieldset> <!-- /#memberentry_patron_attributes -->
1581 [% END # UNLESS ( no_patron_attribute_types ) %]
1582 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1583 [% END # IF ( step_4 ) %]
1586 [% IF ( EnhancedMessagingPreferences ) %]
1587 <fieldset class="rows" id="memberentry_messaging_prefs">
1588 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1589 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1590 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1592 <input type="hidden" name="setting_messaging_prefs" value="1" />
1593 [% INCLUDE 'messaging-preference-form.inc' %]
1594 [% IF ( SMSSendDriver ) %]
1596 <label for="SMSnumber">SMS number:</label>
1597 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1598 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1600 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1602 <label for="sms_provider_id">SMS provider:</label>
1603 <select id="sms_provider_id" name="sms_provider_id">
1604 <option value="">Unknown</option>
1605 [% FOREACH s IN sms_providers %]
1606 [% IF s.id == borrower_data.sms_provider_id %]
1607 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1609 <option value="[% s.id | html %]">[% s.name | html %]</option>
1614 [% END # /UNLESS nosms_provider_id %]
1615 [% END # IF ( SMSSendDriver ) %]
1617 [% END # IF ( EnhancedMessagingPreferences ) %]
1618 [% END # /IF step_5 %]
1619 </form> <!-- /#entryform -->
1621 [% IF quickadd && opadd && !check_member %]
1622 <form id="quick_add_form" class="toggler">
1623 <fieldset class="rows quick_add"><legend>Quick add</legend>
1624 <ol id="quick_add_list">
1630 [% END # /UNLESS ( no_add ) %]
1632 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1634 [% UNLESS ( opadd ) %]
1635 <div class="col-sm-2 col-sm-pull-10">
1637 [% INCLUDE 'circ-menu.inc' %]
1639 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1641 </div> <!-- /.row -->
1643 [% MACRO jsinclude BLOCK %]
1644 [% Asset.js("lib/hc-sticky.js") | $raw %]
1645 [% INCLUDE 'calendar.inc' %]
1646 [% INCLUDE 'str/members-menu.inc' %]
1647 [% Asset.js("js/members-menu.js") | $raw %]
1649 function update_cardnumber_warning(size){
1650 var max_len = [% maxlength_cardnumber | html %];
1651 if ( size >= max_len ) {
1652 $("#cn_max").show();
1654 $("#cn_max").hide();
1658 function showHideFields(){
1659 [% UNLESS step == 1 %]
1660 [% IF fieldstohide.match('identity') %]
1661 $("#memberentry_identity").find('legend').nextAll().toggle();
1663 [% IF show_guarantor || guarantor %]
1664 [% IF fieldstohide.match('guarantor') %]
1665 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1666 $("#guarantor_template").toggle();
1669 [% IF fieldstohide.match('primary_address') %]
1670 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1672 [% IF fieldstohide.match('primary_contact') %]
1673 $("#memberentry_contact").find('legend').nextAll().toggle();
1676 [% UNLESS step == 6 %]
1677 [% IF fieldstohide.match('alt_address') %]
1678 $("#memberentry_address").find('legend').nextAll().toggle();
1681 [% UNLESS step == 2 %]
1682 [% IF fieldstohide.match('alt_contact') %]
1683 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1686 [% UNLESS step == 3 %]
1687 [% IF fieldstohide.match('lib_mgmt') %]
1688 $("#memberentry_library_management").find('legend').nextAll().toggle();
1690 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1691 [% IF fieldstohide.match('lib_setup') %]
1692 $("#memberentry_subscription").find('legend').nextAll().toggle();
1695 [% UNLESS nouserid && nopassword %]
1696 [% IF fieldstohide.match('login') %]
1697 $("#memberentry_userid").find('legend').nextAll().toggle();
1700 [% UNLESS ( opadd || opduplicate ) %]
1701 [% IF fieldstohide.match('flags') %]
1702 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1705 [% IF fieldstohide.match('debarments') %]
1706 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1709 [% UNLESS step == 7 %]
1710 [% IF Koha.Preference('HouseboundModule') %]
1711 [% IF fieldstohide.match('housebound') %]
1712 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1716 [% UNLESS step == 4 %]
1717 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1718 [% IF fieldstohide.match('additional') %]
1719 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1723 [% UNLESS step == 5 %]
1724 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1725 [% IF fieldstohide.match('messaging') %]
1726 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1727 $("#messaging_prefs_loading").toggle();
1733 $(document).ready(function() {
1735 $("#toggle_hidden_fields").change(function(){
1739 $("legend").click(function(){
1740 $(this).nextAll().toggle();
1741 $("#messaging_prefs_loading").hide();
1742 $("#guarantor_template").hide();
1745 $("#saverecord").css({ 'margin-left': 0 });
1747 Sticky = $("#toolbar");
1750 stickyClass: "floating"
1753 [% IF borrower_data.categorycode %]
1754 update_category_code( "[% borrower_data.categorycode | html %]" );
1756 if ( $("#categorycode_entry").length > 0 ){
1757 var category_code = $("#categorycode_entry").find("option:selected").val();
1758 update_category_code( category_code );
1762 [% IF new_guarantors %]
1763 [% FOREACH g IN new_guarantors %]
1764 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1768 $("#cn_max").hide();
1770 $("#cardnumber").on("keydown", function(e){
1771 content = $(this).val();
1773 $("#cardnumber").on("keyup", function(e){
1774 // .val() will return the value of the input after the key has been released
1775 var l = $(this).val().length;
1776 if ( l == content.length + 1 ) { l--; }
1777 update_cardnumber_warning(l);
1779 $("#cardnumber").bind("paste", function(e){
1780 var pastedData = e.originalEvent.clipboardData.getData('text');
1781 update_cardnumber_warning(pastedData.length - 1);
1783 var toggle_quick_add = $(".toggle_quick_add");
1784 $(toggle_quick_add).click(function(e){
1785 toggle_quick_add.toggle();
1788 var toggle_from = '';
1789 if( $("#entryform:visible").length ) {
1790 toggle_to = "#quick_add_form label";
1791 toggle_from = "#entryform label";
1792 $("#memberentry_guarantor").appendTo("#quick_add_form");
1794 toggle_to="#entryform label";
1795 toggle_from = "#quick_add_form label";
1796 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1798 $(toggle_from).each(function() {
1799 var input_label = $(this).attr('for');
1800 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1801 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1804 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1807 $(".toggler").toggle();
1810 $("#save_quick_add").click(function(){
1811 $("#quick_add_form").validate();
1812 if( $("#quick_add_form").valid()){
1813 $('.toggle_quick_add').click();
1814 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1815 $('#saverecord').click();
1817 else {return false;}
1820 $("#saverecord").click(function(){
1821 if( check_form_borrowers() ){
1822 $("#entryform").submit();
1826 $('#duplicate').on('click', function() {
1827 $("input[name='op']").val('modify');
1828 $("input[name='borrowernumber']").val('[% check_member | html %]');
1829 $("input[name='check_member']").val('');
1830 $('#entryform').submit();
1833 $('#not-duplicate').on('click', function() {
1834 $("input[name='nodouble']").val('1');
1835 $('#entryform').submit();
1838 $(".popup_patronview").on("click", function(e){
1840 var url = $(this).attr("href");
1841 openWindow( url, "patronview" );
1844 $("#dateofbirth").on("change", function(){
1848 $("#debarred_comment, #debarred_expiration").on("change", function(){
1849 $("#add_debarment").val(1);
1852 $("#clear_debarred_expiration").on("click", function(e){
1854 $('#debarred_expiration').val("");
1857 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1859 clear_entry( this );
1862 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1864 clone_entry( this );
1867 $("#categorycode_entry").on("change", function(){
1868 update_category_code(this);
1872 [% IF quickadd && opadd && !check_member %]
1873 $(document).ready(function () {
1875 $("#entryform,#saverecord").hide();
1876 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1877 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1878 $("#entryform label").each(function () {
1879 var input_label = $(this).attr('for');
1880 if ( input_label == 'sex-female' ) {
1883 else if ( input_label == 'btitle' ) {
1884 input_label='title';
1886 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1887 let orig_li = $(this).parent();
1888 if( orig_li.attr('class') == 'radio' ){
1889 let new_field = orig_li.clone();
1890 new_field.children('label').each(function(){
1891 let child_input = $(this).children('input');
1892 child_input.attr("id",child_input.attr("id") + "_quick_add");
1894 new_field.appendTo("#quick_add_list");
1896 let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1897 let new_field = orig_li.clone();
1898 new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1899 new_field.appendTo("#quick_add_list");
1900 [% UNLESS mandatorypassword %]
1901 if( input_label == 'password' ){
1902 let orig_p2 = $("#entryform label[for='password2']").parent();
1903 let new_p2 = orig_p2.clone();
1904 new_p2.find('input[id="password2"]').attr("id","password2_quick_add");
1905 new_p2.appendTo("#quick_add_list");
1911 if ( $("#memberentry_guarantor").length ) {
1912 $("#memberentry_guarantor").appendTo("#quick_add_form");
1914 $("#quick_add_form").show();
1915 $("#quick_add_form").find(".flatpickr:hidden").each( (i, input) => {
1916 $(input).siblings(".flatpickr_wrapper").remove(); // Remove leftover from the previous flatpickr that has been cloned
1917 apply_flatpickr(input);
1921 $("#guarantor_template").hide();
1923 var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1924 var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1927 [% Asset.js("js/members.js") | $raw %]
1928 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1929 [% 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 %]
1932 [% INCLUDE 'intranet-bottom.inc' %]