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 'patron_restrictions.inc' %]
12 [% SET footerjs = 1 %]
13 [% INCLUDE 'doc-head-open.inc' %]
15 [% UNLESS blocking_error %]
18 [% ELSIF ( opduplicate ) %]
23 [% INCLUDE 'patron-title.inc' no_html = 1 %]
24 [% IF patron_category %]([% patron_category.description | html %])[% END %]
25 [% END %] › Patrons › Koha
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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
44 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
47 [% IF blocking_error %]
49 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
53 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
55 [% IF (borrower_data.firstname || borrower_data.surname ) %]
57 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
58 [% INCLUDE 'patron-title.inc' %]
63 <a href="#" aria-current="page">
65 <span>Add patron</span>
66 [% ELSIF ( opduplicate ) %]
67 <span>Duplicate patron</span>
69 <span>Modify patron</span>
71 [% IF patron_category %]
72 ([% patron_category.description | html %])
78 </nav> <!-- /#breadcrumbs -->
81 <div class="main container-fluid">
83 [% IF borrower_data.messages %]
84 [% FOR message IN borrower_data.messages %]
85 [% SWITCH message.error %]
86 [% CASE 'error_on_insert_patron' %]
87 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
88 [% CASE 'error_on_update_patron' %]
89 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
90 [% CASE %]<div class="dialog alert">Unhandled error: [% message.error | html %]</div>
95 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
97 <div class="col-sm-10 col-sm-push-2">
99 <main class="clearfix">
100 [% INCLUDE 'blocking_errors.inc' %]
103 [% IF ( error_alert == "no_email" ) %]
104 <div class="dialog alert">This member has no email</div>
106 <div class="dialog alert">[% error_alert | html %]</div>
110 <div class="dialog message">Email has been sent.</div>
113 [% INCLUDE 'noadd-warnings.inc' %]
115 [% UNLESS ( no_add ) %]
118 <span>Add patron</span>
119 [% ELSIF ( opduplicate ) %]
120 <span>Duplicate patron</span>
122 <span>Modify patron</span>
124 [% INCLUDE 'patron-title.inc' %]
125 [% IF patron_category %]([% patron_category.description | html %])[% END %]
128 [% IF quickadd && opadd && !check_member %]
129 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
130 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
133 [% IF ( check_member ) %]
134 <div class="dialog alert">
135 <h3>Duplicate patron record?</h3>
136 <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>
137 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
138 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
143 <div class="dialog alert">
144 <p>The following fields are wrong. Please fix them.</p>
146 [% IF ( ERROR_login_exist ) %]
147 <li id="ERROR_login_exist">Username/password already exists.</li>
149 [% IF ERROR_cardnumber_already_exists %]
150 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
152 [% IF ERROR_cardnumber_length %]
153 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
155 [% IF ( ERROR_age_limitations ) %]
156 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
157 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
159 [% IF ( ERROR_branch ) %]
160 <li id="ERROR_branch">Library is invalid.</li>
162 [% IF ( ERROR_dateofbirth ) %]
163 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
165 [% IF ( ERROR_dateenrolled ) %]
166 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
168 [% IF ( ERROR_dateexpiry ) %]
169 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
171 [% IF ( ERROR_password_too_short ) %]
172 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
174 [% IF ( ERROR_password_too_weak ) %]
175 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
177 [% IF ( ERROR_password_has_whitespaces ) %]
178 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
180 [% IF ( ERROR_password_mismatch ) %]
181 <li id="ERROR_password_mismatch">Passwords do not match.</li>
183 [% IF ( ERROR_password_expiration_date ) %]
184 <li id="ERROR_dateexpiry">Password expiration date is invalid.</li>
186 [% IF ( ERROR_extended_unique_id_failed ) %]
187 <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>
189 [% IF ERROR_bad_email %]
190 <li id="ERROR_bad_email">The primary email is invalid.</li>
192 [% IF ERROR_bad_email_secondary %]
193 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
195 [% IF ERROR_bad_email_alternative %]
196 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
202 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
203 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
205 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
206 [% FOREACH field IN fieldstohide.split(',') %]
208 [% CASE 'identity' %] <span>Patron identity</span> |
209 [% CASE 'guarantor' %] <span>Guarantor information</span> |
210 [% CASE 'primary_address' %] <span>Main address</span> |
211 [% CASE 'primary_contact' %] <span>Contact information</span> |
212 [% CASE 'alt_address' %] <span>Alternate address</span> |
213 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
214 [% CASE 'lib_mgmt' %] <span>Library management</span> |
215 [% CASE 'lib_setup' %] <span>Library setup</span> |
216 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
217 [% CASE 'flags' %] <span>Patron account flags</span> |
218 [% CASE 'debarments' %] <span>Patron restrictions</span> |
219 [% CASE 'housebound' %] <span>Housebound roles</span> |
220 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
221 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
227 [% UNLESS ( check_member ) %]
228 <div id="toolbar" class="btn-toolbar">
229 [% IF quickadd && opadd %]
230 <button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
232 <button class="btn btn-primary toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
234 <a class="btn btn-link" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
236 <a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
238 <i class="fa fa-times"></i> Cancel
243 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
244 [% UNLESS ( check_member ) %]
245 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
247 <!-- field always hidden in different form (1,2,3) -->
248 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
249 <input type="hidden" name="updtype" value="[% updtype | html %]" />
250 <input type="hidden" name="destination" value="[% destination | html %]" />
251 <input type="hidden" name="check_member" value="[% check_member | html %]" />
252 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
253 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
254 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
256 <input type="hidden" name="step" value="[% step | html %]" />
259 <input type="hidden" name="op" value="insert" />
260 [% ELSIF ( opduplicate ) %]
261 <input type="hidden" name="op" value="insert" />
263 <input type="hidden" name="op" value="save" />
264 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
265 [%# Only put the card number if we arent showing it in the form later %]
266 [% IF borrower_data.cardnumber %]
267 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
273 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
274 <fieldset class="rows" id="memberentry_identity">
275 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization</span> [% ELSE %]<span>Patron</span> [% END %]<span>identity</span></legend>
277 [% UNLESS ( patron_category.category_type == 'I' ) %]
279 [% IF Koha.Preference('BorrowersTitles') %]
281 [% IF ( mandatorytitle ) %]
282 <label for="btitle" class="required">
287 <select id="btitle" name="title">
288 <option value=""></option>
289 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
291 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
293 <option value="[% t | html %]">[% t | html %]</option>
297 [% IF ( mandatorytitle ) %]
298 <span class="required">Required</span>
301 [% END # /IF Koha.Preference('BorrowersTitles') %]
302 [% END # /UNLESS notitle %]
303 [% END # /UNLESS ( I ) %]
305 [% UNLESS nosurname %]
307 [% IF ( patron_category.category_type == 'I' ) %]
308 <label for="surname" class="required">
312 [% IF ( mandatorysurname ) %]
313 <label for="surname" class="required">
315 <label for="surname">
320 [% IF ( uppercasesurnames ) %]
321 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" />
323 <input type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" />
325 [% IF ( mandatorysurname ) %]
326 <span class="required">Required</span>
329 [% END # /UNLESS nosurname %]
331 [% UNLESS ( patron_category.category_type == 'I' ) %]
332 [% UNLESS nofirstname %]
334 [% IF ( mandatoryfirstname ) %]
335 <label for="firstname" class="required">
337 <label for="firstname">
341 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
342 [% IF ( mandatoryfirstname ) %]
343 <span class="required">Required</span>
346 [% END #/UNLESS nofirstname %]
347 [% UNLESS nomiddle_name %]
349 [% IF ( mandatorymiddle_name ) %]
350 <label for="middle_name" class="required">
352 <label for="middle_name">
356 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
357 [% IF ( mandatorymiddle_name ) %]
358 <span class="required">Required</span>
361 [% END #/UNLESS nomiddle_name %]
362 [% UNLESS nodateofbirth %]
364 [% IF ( mandatorydateofbirth ) %]
365 <label for="dateofbirth" class="required">
367 <label for="dateofbirth">
371 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
372 [% IF ( mandatorydateofbirth ) %]
373 <span class="required">Required</span>
375 [% IF ( ERROR_dateofbirth ) %]
376 <span class="required">(Error)</span>
378 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
380 [% END # /UNLESS nodateofbirth %]
381 [% UNLESS noinitials %]
383 [% IF ( mandatoryinitials ) %]
384 <label for="initials" class="required">
386 <label for="initials">
390 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
391 [% IF ( mandatoryinitials ) %]
392 <span class="required">Required</span>
395 [% END # /UNLESS noinitials %]
396 [% UNLESS nopronouns %]
398 [% IF ( mandatorypronouns ) %]
399 <label for="pronouns" class="required">
401 <label for="pronouns">
405 <input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS opduplicate %]" />
406 [% IF ( mandatorypronouns ) %]
407 <span class="required">Required</span>
410 [% END # /UNLESS nopronouns %]
411 [% END #/UNLESS ( I ) %]
412 [% UNLESS noothernames %]
414 [% IF ( mandatoryothernames ) %]
415 <label for="othernames" class="required">
417 <label for="othernames">
421 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
422 [% IF ( mandatoryothernames ) %]
423 <span class="required">Required</span>
425 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
427 [% END #/UNLESS noothernames %]
429 [% UNLESS ( patron_category.category_type == 'I' ) %]
432 [% UNLESS ( opduplicate ) %]
434 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
436 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
439 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
441 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
444 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
446 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
449 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
451 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
454 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
455 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
456 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
457 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
458 [% END # /UNLESS ( opduplicate )%]
460 [% END # /UNLESS nosex %]
461 [% END # /UNLESS ( I ) %]
463 </fieldset> <!-- /#memberentry_identity -->
464 [% END # hide fieldset %]
466 [% IF show_guarantor || guarantor %]
467 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
468 <div id="memberentry_guarantor_anchor">
469 <fieldset id="memberentry_guarantor" class="rows">
470 <legend>Patron guarantor</legend>
472 <div id="guarantor_relationships">
473 [% FOREACH r IN relationships %]
476 [% IF patron_category.category_type == 'I' %]
477 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
478 <span class="label">Organization:</span>
479 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
482 <span class="label">Relationship:</span>
483 <span>[% r.relationship | html %]</span>
486 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
487 <span class="label">Guarantor:</span>
488 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
491 <span class="label">Relationship:</span>
492 <span>[% r.relationship | html %]</span>
496 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
497 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
502 [% END # END relationships foreach %]
503 [% IF guarantor && (!relationships) %]
504 <fieldset class="guarantor">
506 <li class="guarantor-details" data-borrowernumber="0">
507 <span class="label">Guarantor:</span>
508 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
509 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
512 [% IF possible_relationships %]
514 [% UNLESS empty_relationship_allowed %]
515 <label for="guarantor_relationship" class="required">Relationship: </label>
516 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
518 <label for="guarantor_relationship">Relationship: </label>
519 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
521 <option value="" selected>Empty option</option>
522 [% FOREACH pr IN possible_relationships.split('\|') %]
524 <option value="[% pr | html %]">[% pr | html %]</option>
528 [% UNLESS empty_relationship_allowed %]
529 <span class="required">Required</span>
533 <input type="hidden" name="new_guarantor_relationship" value="" />
537 <label for="guarantor_cancel"> </label>
538 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
543 </div> <!-- #/guarantor_relationships -->
545 <fieldset class="guarantor" id="guarantor_template">
547 <li class="guarantor-details" data-borrowernumber="0">
548 <span class="label">Guarantor:</span>
549 <a class="new_guarantor_link" href="#" target="blank">
550 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
551 (<span class="new_guarantor_id_text"></span>)
553 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
556 [% IF possible_relationships %]
558 [% UNLESS empty_relationship_allowed %]
559 <label for="guarantor_relationship" class="required">Relationship: </label>
560 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
562 <label for="guarantor_relationship">Relationship: </label>
563 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
565 <option value="" selected></option>
566 [% FOREACH pr IN possible_relationships.split('\|') %]
568 <option value="[% pr | html %]">[% pr | html %]</option>
572 [% UNLESS empty_relationship_allowed %]
573 <span class="required">Required</span>
577 <input type="hidden" name="new_guarantor_relationship" value="" />
581 <label for="guarantor_cancel"> </label>
582 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
588 <input type="hidden" id="guarantor_id" value="" />
589 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
590 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
593 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
596 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
598 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
599 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
600 [% IF borrower_data.privacy_guarantor_checkouts %]
601 <option value="0">No</option>
602 <option value="1" selected>Yes</option>
604 <option value="0" selected>No</option>
605 <option value="1">Yes</option>
608 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
611 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
613 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
614 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
615 [% IF borrower_data.privacy_guarantor_fines %]
616 <option value="0">No</option>
617 <option value="1" selected>Yes</option>
619 <option value="0" selected>No</option>
620 <option value="1">Yes</option>
623 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
627 </fieldset> <!-- /#memberentry_guarantor -->
628 </div> <!-- #/memberentry_guarantor_anchor -->
630 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
631 <fieldset class="rows" id="non_patron_guarantor">
632 <legend>Non-patron guarantor</legend>
634 [% UNLESS nocontactname %]
636 [% IF ( mandatorycontactname ) %]
637 <label for="contactname" class="required">
639 <label for="contactname">
643 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
644 [% IF ( mandatorycontactname ) %]
645 <span class="required">Required</span>
647 <div class="hint">Non-patron guarantor surname</div>
649 [% END # /UNLESS nocontactname %]
651 [% UNLESS nocontactfirstname %]
653 [% IF ( mandatorycontactfirstname ) %]
654 <label for="contactfirstname" class="required">
656 <label for="contactfirstname">
658 Guarantor first name:
660 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
661 [% IF ( mandatorycontactfirstname ) %]
662 <span class="required">Required</span>
664 <div class="hint">Non-patron guarantor first name</div>
666 [% END # /UNLESS noaltcontactfirstname %]
668 [% UNLESS norelationship %]
669 [% IF possible_relationships %]
671 <label for="relationship">Relationship: </label>
672 <select class="relationship" name="relationship">
673 <option value=""></option>
674 [% FOREACH pr IN possible_relationships.split('\|') %]
675 [% IF pr == borrower_data.relationship %]
676 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
678 <option value="[% pr | html %]">[% pr | html %]</option>
683 [% END #/IF possible_relationships %]
684 [% END # /UNLESS norelationship %]
686 </fieldset> <!-- /#non_patron_guarantor -->
687 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
688 [% END # /IF show_guarantor || guarantor %]
690 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
691 [% PROCESS 'main-address-style' %]
692 [% END # /UNLESS nostreet && nocity etc group%]
694 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
695 <fieldset class="rows" id="memberentry_contact">
696 <legend id="contact_lgd">Contact information</legend>
700 [% IF ( mandatoryphone ) %]
701 <label for="phone" class="required">
707 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
708 [% IF ( mandatoryphone ) %]
709 <span class="required">Required</span>
711 <div class="hint">Shows on transit slips</div>
713 [% END # /UNLESS nophone %]
715 [% UNLESS nophonepro %]
717 [% IF ( mandatoryphonepro ) %]
718 <label for="phonepro" class="required">
720 <label for="phonepro">
724 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
725 [% IF ( mandatoryphonepro ) %]
726 <span class="required">Required</span>
729 [% END # /UNLESS nophonepro %]
731 [% UNLESS nomobile %]
733 [% IF ( mandatorymobile ) %]
734 <label for="mobile" class="required">
740 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
741 [% IF ( mandatorymobile ) %]
742 <span class="required">Required</span>
745 [% END # /UNLESS nomobile %]
749 [% IF ( mandatoryemail ) %]
750 <label for="email" class="required">
756 [% IF ( NoUpdateEmail ) %]
757 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
759 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
761 [% IF ( mandatoryemail ) %]
762 <span class="required">Required</span>
764 <div class="hint">Shows on transit slips</div>
766 [% END #/UNLESS noemail %]
768 [% UNLESS noemailpro %]
770 [% IF ( mandatoryemailpro ) %]
771 <label for="emailpro" class="required">
773 <label for="emailpro">
777 [% IF ( NoUpdateEmail ) %]
778 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
780 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
782 [% IF ( mandatoryemailpro ) %]
783 <span class="required">Required</span>
786 [% END #/UNLESS noemailpro %]
790 [% IF ( mandatoryfax ) %]
791 <label for="fax" class="required">
797 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
798 [% IF ( mandatoryfax ) %]
799 <span class="required">Required</span>
802 [% END #/UNLESS nofax %]
804 [% UNLESS noprimary_contact_method %]
806 [% IF mandatoryprimary_contact_method %]
807 <label for="primary_contact_method" class="required">
809 <label for="primary_contact_method">
811 Main contact method: </label>
813 <select id="primary_contact_method" name="primary_contact_method">
814 <option value=""></option>
816 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
817 <option value="phone" selected="selected">Primary phone</option>
819 <option value="phone">Primary phone</option>
822 [% UNLESS nophonepro %]
823 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
824 <option value="phonepro" selected="selected">Secondary phone</option>
826 <option value="phonepro">Secondary phone</option>
829 [% UNLESS nomobile %]
830 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
831 <option value="mobile" selected="selected">Other phone</option>
833 <option value="mobile">Other phone</option>
837 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
838 <option value="email" selected="selected">Primary email</option>
840 <option value="email">Primary email</option>
843 [% UNLESS noemailpro %]
844 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
845 <option value="emailpro" selected="selected">Secondary email</option>
847 <option value="emailpro">Secondary email</option>
851 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
852 <option value="fax" selected="selected">Fax</option>
854 <option value="fax">Fax</option>
858 [% IF mandatoryprimary_contact_method %]
859 <span class="required">Required</span>
864 </fieldset> <!-- /#memberentry_contact -->
865 [% END # hide fieldset %]
867 <!-- ************************ STEP_1 *********************** -->
868 [% END # /IF ( step_1 ) %]
871 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
872 [% PROCESS 'alt-address-style' %]
873 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
874 [% END # /IF ( step_6 ) %]
877 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
878 [% PROCESS 'alt-contact-style' %]
879 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
880 [% END # /IF ( step_2 ) %]
883 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
884 <fieldset class="rows" id="memberentry_library_management">
885 <legend id="library_management_lgd">Library management</legend>
887 [% UNLESS nocardnumber %]
889 [% IF mandatorycardnumber %]
890 <label for="cardnumber" class="required">
892 <label for="cardnumber" class="validated">
897 <!-- NOTE: div.hint closing tag isn't on the same line -->
898 [% IF minlength_cardnumber == maxlength_cardnumber %]
899 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_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 must be exactly [% minlength_cardnumber | html %] characters.
905 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
906 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
907 [% IF mandatorycardnumber %]
908 <span class="required">Required</span>
910 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
911 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
912 [% ELSIF maxlength_cardnumber %]
913 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
914 [% IF mandatorycardnumber %]
915 <span class="required">Required</span>
917 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
918 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
920 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
921 [% IF mandatorycardnumber %]
922 <span class="required">Required</span>
924 <div class="hint">There is no minimum or maximum character length.
926 [% IF autoMemberNum %]
927 [% IF mandatorycardnumber %]
928 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
930 <br/>Leave blank for auto calc during registration
933 </div><!--/div.hint -->
935 [% END # /UNLESS nocardnumber %]
937 [% UNLESS nobranchcode %]
939 <label for="libraries" class="required">Library:</label>
940 <select name="branchcode" id="libraries">
941 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
943 <span class="required">Required</span>
948 <label for="categorycode_entry" class="required">Category: </label>
949 <select id="categorycode_entry" name="categorycode">
950 [% FOREACH category_type IN patron_categories.keys %]
951 [% SWITCH category_type %]
953 <optgroup label="Child">
955 <optgroup label="Adult">
957 <optgroup label="Staff">
959 <optgroup label="Organization">
961 <optgroup label="Professional">
963 <optgroup label="Statistical">
965 <optgroup label="Unknown">
967 [% FOREACH category IN patron_categories.$category_type %]
968 [% IF category.categorycode == patron_category.categorycode %]
969 <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>
971 <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>
977 [% IF limited_category %]
978 <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>
980 <span class="required">Required</span>
985 [% IF ( mandatorysort1 ) %]
986 <label for="sort1" class="required">
992 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
993 [% IF ( mandatorysort1 ) %]
994 <span class="required">Required</span>
997 [% END # /UNLESS nosort1 %]
1001 [% IF ( mandatorysort2 ) %]
1002 <label for="sort2" class="required">
1008 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
1009 [% IF ( mandatorysort2 ) %]
1010 <span class="required">Required</span>
1013 [% END # /UNLESS nosort2 %]
1015 [% UNLESS noautorenew_checkouts %]
1017 <label for="yes-autorenew_checkouts">
1018 Allow auto-renewal of items:
1020 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
1021 <label for="yes-autorenew_checkouts">
1023 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1025 <label for="no-autorenew_checkouts">
1027 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1030 <label for="yes-autorenew_checkouts">
1032 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1034 <label for="no-autorenew_checkouts">
1036 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1042 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1044 <label for="checkprevcheckout">Check for previous checkouts: </label>
1045 <select name="checkprevcheckout" id="checkprevcheckout">
1046 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1047 <option value="yes" selected="selected">Yes if settings allow it</option>
1048 <option value="no">No if settings allow it</option>
1049 <option value="inherit">Inherit from settings</option>
1050 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1051 <option value="yes">Yes if settings allow it</option>
1052 <option value="no" selected="selected">No if settings allow it</option>
1053 <option value="inherit">Inherit from settings</option>
1055 <option value="yes">Yes if settings allow it</option>
1056 <option value="no">No if settings allow it</option>
1057 <option value="inherit" selected="selected">Inherit from settings</option>
1061 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1063 [% IF Koha.Preference('TranslateNotices') %]
1065 <label for="lang">Preferred language for notices: </label>
1066 <select id="lang" name="lang">
1067 <option value="default">Default</option>
1068 [% FOR language IN languages %]
1069 [% FOR sublanguage IN language.sublanguages_loop %]
1070 [% IF language.plural %]
1071 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1072 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1074 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1077 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1078 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1080 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1082 [% END # /IF language.plural %]
1083 [% END # /FOR sublanguage %]
1084 [% END #/FOR language %]
1085 </select> <!-- /#lang -->
1087 [% END #/IF Koha.Preference('TranslateNotices') %]
1089 </fieldset> <!-- /#memberentry_library_management -->
1091 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1092 <fieldset class="rows" id="memberentry_subscription">
1093 <legend id="library_setup_lgd">Library setup</legend><ol>
1094 [% UNLESS nodateenrolled %]
1096 [% IF ( mandatorydateenrolled ) %]
1097 <label for="from" class="required">
1103 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1104 [% IF ( mandatorydateenrolled ) %]
1105 <span class="required">Required</span>
1107 [% IF ( ERROR_dateenrolled ) %]
1108 <span class="required">(Error)</span>
1110 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1112 [% END # /UNLESS nodateenrolled %]
1114 [% UNLESS nodateexpiry %]
1117 <li style="display:none">
1119 [% IF ( mandatorydateexpiry ) %]
1120 <label for="to" class="required">
1124 Expiry date (leave blank for auto calc):
1126 [% UNLESS ( opadd ) %]
1127 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1129 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1131 [% IF ( mandatorydateexpiry ) %]
1132 <span class="required">Required</span>
1134 [% IF ( ERROR_dateexpiry ) %]
1135 <span class="required">(Error)</span>
1137 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1140 [% UNLESS noopacnote %]
1142 [% IF ( mandatoryopacnote ) %]
1143 <label for="opacnote" class="required">
1145 <label for="opacnote">
1149 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1150 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1151 [% IF ( mandatoryopacnote ) %]
1152 <span class="required">Required</span>
1155 [% END # /UNLESS noopacnote %]
1157 [% UNLESS noborrowernotes %]
1159 [% IF ( mandatoryborrowernotes ) %]
1160 <label for="borrowernotes" class="required">
1162 <label for="borrowernotes">
1166 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | html UNLESS opduplicate %]</textarea>
1167 <div class="hint">This message displays when checking out to this patron</div>
1168 [% IF ( mandatoryborrowernotes ) %]
1169 <span class="required">Required</span>
1172 [% END # /UNLESS noborrowernotes %]
1174 </fieldset> <!-- /#memberentry_subscription -->
1175 [% END # hide fieldset %]
1177 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1178 <fieldset class="rows" id="memberentry_userid">
1179 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1181 [% UNLESS nouserid %]
1183 [% IF ( mandatoryuserid ) %]
1184 <label for="userid" class="required">
1186 <label for="userid">
1191 [% IF ( NoUpdateLogin ) %]
1192 [% IF ( opduplicate ) %]
1193 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1195 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1198 [% IF ( opduplicate ) %]
1199 <input type="text" id="userid" name="userid" size="20" value="" />
1201 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1203 [% END # /IF ( NoUpdateLogin ) %]
1205 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1206 <input type="text" disabled="disabled" style="display:none" />
1208 [% IF ( mandatoryuserid ) %]
1209 <span class="required">Required</span>
1212 [% END # /UNLESS nouserid %]
1214 [% UNLESS nopassword %]
1216 [% IF ( mandatorypassword ) %]
1217 <label for="password" class="required">
1219 <label for="password">
1224 [% IF ( NoUpdateLogin ) %]
1225 [% IF ( opduplicate ) %]
1226 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1228 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1231 [% IF ( opduplicate ) %]
1232 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1234 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1236 [% END # /IF ( NoUpdateLogin ) %]
1237 [% ELSE # IF ( opadd ) %]
1239 [% IF ( borrower_data.password ) %]
1240 [% IF ( NoUpdateLogin ) %]
1241 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1243 [% IF ( opduplicate ) %]
1244 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1246 <input type="password" id="password" name="password" size="20" value="****" />
1250 [% IF ( NoUpdateLogin ) %]
1251 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1253 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1255 [% END # /IF ( password ) %]
1256 [% END # /IF ( opadd ) %]
1257 [% IF ( mandatorypassword ) %]
1258 <span class="required">Required</span>
1260 [% IF ( ERROR_password_too_short ) %]
1261 <span class="required">Password is too short</span>
1263 [% IF ( ERROR_password_too_weak ) %]
1264 <span class="required">Password is too weak</span>
1266 [% IF ( ERROR_password_has_whitespaces ) %]
1267 <span class="required">Password has leading or trailing whitespaces</span>
1269 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1273 [% IF ( mandatorypassword ) %]
1274 <label for="password2" class="required">
1276 <label for="password2">
1281 [% IF ( NoUpdateLogin ) %]
1282 [% IF ( opduplicate ) %]
1283 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1285 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1288 [% IF ( opduplicate ) %]
1289 <input type="password" id="password2" name="password2" size="20" />
1291 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1294 [% ELSE # IF ( opadd ) %]
1295 [% IF ( borrower_data.password ) %]
1296 [% IF ( NoUpdateLogin ) %]
1297 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1299 [% IF ( opduplicate ) %]
1300 <input type="password" id="password2" name="password2" size="20" />
1302 <input type="password" id="password2" name="password2" size="20" value="****" />
1306 [% IF ( NoUpdateLogin ) %]
1307 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1309 <input type="password" id="password2" name="password2" size="20" value="" />
1312 [% END # /IF ( opadd ) %]
1314 [% IF ( mandatorypassword ) %]
1315 <span class="required">Required</span>
1317 [% IF ( ERROR_password_mismatch ) %]
1318 <span class="required">Passwords do not match</span>
1321 [% END # /UNLESS nopassword %]
1322 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1324 <label for="password_expiration_date">Password expiration date:</label>
1325 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1329 </fieldset> <!-- /#memberentry_userid -->
1330 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1332 <!--this zones are not necessary in modif mode -->
1333 [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1334 <fieldset class="rows" id="memberentry_account_flags">
1335 <legend id="account_flags_lgd">Patron account flags</legend>
1336 <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1338 [% UNLESS nogonenoaddress %]
1340 [% IF mandatorygonenoaddress %]
1341 <label class="radio required" for="yesgonenoaddress">
1343 <label class="radio" for="yesgonenoaddress">
1347 [% IF CAN_user_circulate_manage_restrictions %]
1348 <label for="yesgonenoaddress">
1349 [% IF ( borrower_data.gonenoaddress ) %]
1350 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1352 <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1356 <label for="nogonenoaddress">
1357 [% IF ( borrower_data.gonenoaddress ) %]
1358 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1360 <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1365 [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1366 [% END # /IF CAN_user_circulate_manage_restrictions %]
1367 [% IF mandatorygonenoaddress %]
1368 <span class="required">Required</span>
1372 [% END # /UNLESS nogonenoaddress %]
1375 [% IF mandatorylost %]
1376 <label class="radio required" for="yeslost">
1378 <label class="radio" for="yeslost">
1382 [% IF CAN_user_circulate_manage_restrictions %]
1383 <label for="yeslost">
1384 [% IF ( borrower_data.lost ) %]
1385 <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1387 <input type="radio" id="yeslost" name="lost" value="1" />
1391 <label for="nolost">
1392 [% IF ( borrower_data.lost ) %]
1393 <input type="radio" id="nolost" name="lost" value="0" />
1395 <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1400 [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1401 [% END # /IF CAN_user_circulate_manage_restrictions %]
1402 [% IF mandatorylost %]
1403 <span class="required">Required</span>
1406 [% END # /UNLESS nogonenoaddress %]
1408 </fieldset> <!-- /#memberentry_account_flags -->
1410 <fieldset class="rows" id="memberentry_restrictions">
1411 <legend id="restrictions_lgd">Patron restrictions</legend>
1412 [% IF ( debarments ) %]
1419 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1420 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1426 [% FOREACH d IN debarments %]
1427 [% dtype = d.type %]
1429 <td>[% restriction_types.$dtype.display_text | html %]</td>
1431 [% IF d.comment.search('OVERDUES_PROCESS') %]
1432 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1434 [% d.comment | $raw %]
1438 [% IF d.expiration %]
1439 [% d.expiration | $KohaDates %]
1444 <td>[% d.created | $KohaDates %]</td>
1445 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1447 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1451 [% END # /FOREACH d %]
1455 <p>Patron is currently unrestricted.</p>
1456 [% END # /IF ( debarments ) %]
1458 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1459 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1460 <fieldset id="manual_restriction_form">
1461 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1462 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1464 [% IF Koha.Preference('PatronRestrictionTypes') %]
1466 <label for="debarred_type">Type:</label>
1467 <select name="debarred_type">
1468 [% FOREACH code IN restriction_types.keys %]
1469 [% IF !restriction_types.$code.is_system %]
1470 [% IF restriction_types.$code.is_default %]
1471 <option value="[% code | html %]" selected>[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
1473 <option value="[% code | html %]">[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
1481 <label for="debarred_comment">Comment: </label>
1482 <input type="text" id="debarred_comment" name="debarred_comment" />
1485 <label for="debarred_expiration">Expiration: </label>
1486 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1487 <a href="#" id="clear_debarred_expiration">Clear date</a>
1491 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1493 </fieldset> <!-- /#manual_restriction_form -->
1494 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1495 </fieldset> <!-- /#memberentry_restrictions -->
1496 [% END # /UNLESS ( opadd || opduplicate ) %]
1497 [% END # /IF ( step_3 ) %]
1500 [% IF Koha.Preference('HouseboundModule') %]
1501 <fieldset class="rows" id="memberentry_housebound_roles">
1502 <legend id="housebound_roles">Housebound roles</legend>
1505 <label class="radio" for="housebound_chooser">
1508 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1509 <label for="yes_housebound_chooser">Yes </label>
1510 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1511 <label for="no_housebound_chooser">No </label>
1512 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1514 <label for="yes_housebound_chooser">Yes </label>
1515 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1516 <label for="no_housebound_chooser">No </label>
1517 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1521 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1522 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1523 <label for="yes_housebound_deliverer">Yes </label>
1524 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1525 <label for="no_housebound_deliverer">No </label>
1526 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1528 <label for="yes_housebound_deliverer">Yes </label>
1529 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1530 <label for="no_housebound_deliverer">No </label>
1531 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1534 </ol> <!-- /ol.radio -->
1535 </fieldset> <!-- /#memberentry_housebound_roles -->
1536 [% END # hide fieldset %]
1537 [% END # IF step_7 %]
1540 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1541 [% UNLESS ( no_patron_attribute_types ) %]
1542 <fieldset class="rows" id="memberentry_patron_attributes">
1543 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1544 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1545 [% FOREACH pa_loo IN patron_attributes %]
1546 <ol class="attributes_table">
1547 [% IF pa_loo.class %]
1548 <fieldset id="aai_[% pa_loo.class | html %]">
1549 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1551 [% FOREACH patron_attribute IN pa_loo.items %]
1552 <li data-category_code="[% patron_attribute.category_code | html %]">
1553 [% IF patron_attribute.mandatory %]
1554 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1556 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1558 [% IF ( patron_attribute.use_dropdown ) %]
1559 [% IF patron_attribute.mandatory %]
1560 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1562 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1564 <option value=""></option>
1565 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1566 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1567 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1568 [% auth_val_loo.lib | html %]
1571 <option value="[% auth_val_loo.authorised_value | html %]" >
1572 [% auth_val_loo.lib | html %]
1578 [% IF patron_attribute.mandatory %]
1579 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1581 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1583 [% END # /IF ( patron_attribute.use_dropdown ) %]
1584 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1585 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1586 [% IF ( patron_attribute.repeatable ) %]
1587 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1589 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1591 [% END # /FOREACH patron_attribute %]
1592 [% IF pa_loo.class %]</fieldset>[% END %]
1594 [% END # /FOREACH pa_loo %]
1595 </fieldset> <!-- /#memberentry_patron_attributes -->
1596 [% END # UNLESS ( no_patron_attribute_types ) %]
1597 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1598 [% END # IF ( step_4 ) %]
1601 [% IF ( EnhancedMessagingPreferences ) %]
1602 <fieldset class="rows" id="memberentry_messaging_prefs">
1603 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1604 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1605 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1607 <input type="hidden" name="setting_messaging_prefs" value="1" />
1608 [% INCLUDE 'messaging-preference-form.inc' %]
1609 [% IF ( SMSSendDriver ) %]
1611 <label for="SMSnumber">SMS number:</label>
1612 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1613 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1615 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1617 <label for="sms_provider_id">SMS provider:</label>
1618 <select id="sms_provider_id" name="sms_provider_id">
1619 <option value="">Unknown</option>
1620 [% FOREACH s IN sms_providers %]
1621 [% IF s.id == borrower_data.sms_provider_id %]
1622 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1624 <option value="[% s.id | html %]">[% s.name | html %]</option>
1629 [% END # /UNLESS nosms_provider_id %]
1630 [% END # IF ( SMSSendDriver ) %]
1632 [% END # IF ( EnhancedMessagingPreferences ) %]
1633 [% END # /IF step_5 %]
1634 </form> <!-- /#entryform -->
1636 [% IF quickadd && opadd && !check_member %]
1637 <form id="quick_add_form" class="toggler">
1638 <fieldset class="rows quick_add"><legend>Quick add</legend>
1639 <ol id="quick_add_list">
1645 [% END # /UNLESS ( no_add ) %]
1647 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1649 [% UNLESS ( opadd ) %]
1650 <div class="col-sm-2 col-sm-pull-10">
1652 [% INCLUDE 'circ-menu.inc' %]
1654 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1656 </div> <!-- /.row -->
1658 [% MACRO jsinclude BLOCK %]
1659 [% Asset.js("lib/hc-sticky.js") | $raw %]
1660 [% INCLUDE 'calendar.inc' %]
1661 [% INCLUDE 'str/members-menu.inc' %]
1662 [% Asset.js("js/members-menu.js") | $raw %]
1664 function update_cardnumber_warning(size){
1665 var max_len = [% maxlength_cardnumber | html %];
1666 if ( size >= max_len ) {
1667 $("#cn_max").show();
1669 $("#cn_max").hide();
1673 function showHideFields(){
1674 [% UNLESS step == 1 %]
1675 [% IF fieldstohide.match('identity') %]
1676 $("#memberentry_identity").find('legend').nextAll().toggle();
1678 [% IF show_guarantor || guarantor %]
1679 [% IF fieldstohide.match('guarantor') %]
1680 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1681 $("#guarantor_template").toggle();
1684 [% IF fieldstohide.match('primary_address') %]
1685 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1687 [% IF fieldstohide.match('primary_contact') %]
1688 $("#memberentry_contact").find('legend').nextAll().toggle();
1691 [% UNLESS step == 6 %]
1692 [% IF fieldstohide.match('alt_address') %]
1693 $("#memberentry_address").find('legend').nextAll().toggle();
1696 [% UNLESS step == 2 %]
1697 [% IF fieldstohide.match('alt_contact') %]
1698 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1701 [% UNLESS step == 3 %]
1702 [% IF fieldstohide.match('lib_mgmt') %]
1703 $("#memberentry_library_management").find('legend').nextAll().toggle();
1705 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1706 [% IF fieldstohide.match('lib_setup') %]
1707 $("#memberentry_subscription").find('legend').nextAll().toggle();
1710 [% UNLESS nouserid && nopassword %]
1711 [% IF fieldstohide.match('login') %]
1712 $("#memberentry_userid").find('legend').nextAll().toggle();
1715 [% UNLESS ( opadd || opduplicate ) %]
1716 [% IF fieldstohide.match('flags') %]
1717 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1720 [% IF fieldstohide.match('debarments') %]
1721 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1724 [% UNLESS step == 7 %]
1725 [% IF Koha.Preference('HouseboundModule') %]
1726 [% IF fieldstohide.match('housebound') %]
1727 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1731 [% UNLESS step == 4 %]
1732 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1733 [% IF fieldstohide.match('additional') %]
1734 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1738 [% UNLESS step == 5 %]
1739 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1740 [% IF fieldstohide.match('messaging') %]
1741 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1742 $("#messaging_prefs_loading").toggle();
1748 $(document).ready(function() {
1750 $("#toggle_hidden_fields").change(function(){
1754 $("legend").click(function(){
1755 $(this).nextAll().toggle();
1756 $("#messaging_prefs_loading").hide();
1757 $("#guarantor_template").hide();
1760 $("#saverecord").css({ 'margin-left': 0 });
1762 Sticky = $("#toolbar");
1765 stickyClass: "floating"
1768 [% IF borrower_data.categorycode %]
1769 update_category_code( "[% borrower_data.categorycode | html %]" );
1771 if ( $("#categorycode_entry").length > 0 ){
1772 var category_code = $("#categorycode_entry").find("option:selected").val();
1773 update_category_code( category_code );
1777 [% IF new_guarantors %]
1778 [% FOREACH g IN new_guarantors %]
1779 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1783 $("#cn_max").hide();
1785 $("#cardnumber").on("keydown", function(e){
1786 content = $(this).val();
1788 $("#cardnumber").on("keyup", function(e){
1789 // .val() will return the value of the input after the key has been released
1790 var l = $(this).val().length;
1791 if ( l == content.length + 1 ) { l--; }
1792 update_cardnumber_warning(l);
1794 $("#cardnumber").bind("paste", function(e){
1795 var pastedData = e.originalEvent.clipboardData.getData('text');
1796 update_cardnumber_warning(pastedData.length - 1);
1798 var toggle_quick_add = $(".toggle_quick_add");
1799 $(toggle_quick_add).click(function(e){
1800 toggle_quick_add.toggle();
1803 var toggle_from = '';
1804 if( $("#entryform:visible").length ) {
1805 toggle_to = "#quick_add_form label";
1806 toggle_from = "#entryform label";
1807 $("#memberentry_guarantor").appendTo("#quick_add_form");
1809 toggle_to="#entryform label";
1810 toggle_from = "#quick_add_form label";
1811 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1813 $(toggle_from).each(function() {
1814 var input_label = $(this).attr('for');
1815 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1816 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1819 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1822 $(".toggler").toggle();
1825 $("#save_quick_add").click(function(){
1826 $("#quick_add_form").validate();
1827 if( $("#quick_add_form").valid()){
1828 $('.toggle_quick_add').click();
1829 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1830 $('#saverecord').click();
1832 else {return false;}
1835 $("#saverecord").click(function(){
1836 if( check_form_borrowers() ){
1837 $("#entryform").submit();
1841 $('#duplicate').on('click', function() {
1842 $("input[name='op']").val('modify');
1843 $("input[name='borrowernumber']").val('[% check_member | html %]');
1844 $("input[name='check_member']").val('');
1845 $('#entryform').submit();
1848 $('#not-duplicate').on('click', function() {
1849 $("input[name='nodouble']").val('1');
1850 $('#entryform').submit();
1853 $(".popup_patronview").on("click", function(e){
1855 var url = $(this).attr("href");
1856 openWindow( url, "patronview" );
1859 $("#dateofbirth").on("change", function(){
1863 $("#debarred_comment, #debarred_expiration").on("change", function(){
1864 $("#add_debarment").val(1);
1867 $("#clear_debarred_expiration").on("click", function(e){
1869 $('#debarred_expiration').val("");
1872 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1874 clear_entry( this );
1877 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1879 clone_entry( this );
1882 $("#categorycode_entry").on("change", function(){
1883 update_category_code(this);
1887 [% IF quickadd && opadd && !check_member %]
1888 $(document).ready(function () {
1890 $("#entryform,#saverecord").hide();
1891 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1892 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1893 $("#entryform label").each(function () {
1894 var input_label = $(this).attr('for');
1895 if ( input_label == 'sex-female' ) {
1898 else if ( input_label == 'btitle' ) {
1899 input_label='title';
1901 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1902 let orig_li = $(this).parent();
1903 if( orig_li.attr('class') == 'radio' ){
1904 let new_field = orig_li.clone();
1905 new_field.children('label').each(function(){
1906 let child_input = $(this).children('input');
1907 child_input.attr("id",child_input.attr("id") + "_quick_add");
1909 new_field.appendTo("#quick_add_list");
1911 let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1912 let new_field = orig_li.clone();
1913 new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1914 new_field.appendTo("#quick_add_list");
1915 [% UNLESS mandatorypassword %]
1916 if( input_label == 'password' ){
1917 let orig_p2 = $("#entryform label[for='password2']").parent();
1918 let new_p2 = orig_p2.clone();
1919 new_p2.find('input[id="password2"]').attr("id","password2_quick_add");
1920 new_p2.appendTo("#quick_add_list");
1926 if ( $("#memberentry_guarantor").length ) {
1927 $("#memberentry_guarantor").appendTo("#quick_add_form");
1929 $("#quick_add_form").show();
1932 $("#guarantor_template").hide();
1935 [% Asset.js("js/members.js") | $raw %]
1936 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1937 [% 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 %]
1940 [% INCLUDE 'intranet-bottom.inc' %]