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 [% SET footerjs = 1 %]
12 [% INCLUDE 'doc-head-open.inc' %]
14 [% UNLESS blocking_error %]
17 [% ELSIF ( opduplicate ) %]
22 [% INCLUDE 'patron-title.inc' no_html = 1 %]
23 [% IF categoryname %]([% categoryname | html %])[% END %]
24 [% END %] › Patrons › Koha
31 [% INCLUDE 'doc-head-close.inc' %]
34 <body id="pat_memberentrygen" class="pat">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'patron-search-header.inc' %]
38 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
41 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
44 [% IF blocking_error %]
46 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
50 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
52 [% IF (borrower_data.firstname || borrower_data.surname ) %]
54 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
55 [% INCLUDE 'patron-title.inc' %]
60 <a href="#" aria-current="page">
62 <span>Add patron</span>
63 [% ELSIF ( opduplicate ) %]
64 <span>Duplicate patron</span>
66 <span>Modify patron</span>
69 ([% categoryname | html %])
75 </nav> <!-- /#breadcrumbs -->
77 <div class="main container-fluid">
79 [% IF borrower_data.messages %]
80 [% FOR message IN borrower_data.messages %]
81 [% SWITCH message.error %]
82 [% CASE 'error_on_insert_patron' %]
83 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
84 [% CASE 'error_on_update_patron' %]
85 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
86 [% CASE %]<div class="dialog alert">Unhandled error: [% message.error | html %]</div>
91 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
93 <div class="col-sm-10 col-sm-push-2">
95 <main class="clearfix">
96 [% INCLUDE 'blocking_errors.inc' %]
99 [% IF ( error_alert == "no_email" ) %]
100 <div class="dialog alert">This member has no email</div>
102 <div class="dialog alert">[% error_alert | html %]</div>
106 <div class="dialog message">Email has been sent.</div>
109 [% INCLUDE 'noadd-warnings.inc' %]
111 [% UNLESS ( no_add ) %]
114 <span>Add patron</span>
115 [% ELSIF ( opduplicate ) %]
116 <span>Duplicate patron</span>
118 <span>Modify patron</span>
120 [% INCLUDE 'patron-title.inc' %]
121 [% IF categoryname %]([% categoryname | html %])[% END %]
124 [% IF quickadd && opadd && !check_member %]
125 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
126 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
129 [% IF ( check_member ) %]
130 <div class="dialog alert">
131 <h3>Duplicate patron record?</h3>
132 <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>
133 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
134 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
139 <div class="dialog alert">
140 <p>The following fields are wrong. Please fix them.</p>
142 [% IF ( ERROR_login_exist ) %]
143 <li id="ERROR_login_exist">Username/password already exists.</li>
145 [% IF ERROR_cardnumber_already_exists %]
146 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
148 [% IF ERROR_cardnumber_length %]
149 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
151 [% IF ( ERROR_age_limitations ) %]
152 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
153 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
155 [% IF ( ERROR_branch ) %]
156 <li id="ERROR_branch">Library is invalid.</li>
158 [% IF ( ERROR_dateofbirth ) %]
159 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
161 [% IF ( ERROR_dateenrolled ) %]
162 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
164 [% IF ( ERROR_dateexpiry ) %]
165 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
167 [% IF ( ERROR_password_too_short ) %]
168 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
170 [% IF ( ERROR_password_too_weak ) %]
171 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
173 [% IF ( ERROR_password_has_whitespaces ) %]
174 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
176 [% IF ( ERROR_password_mismatch ) %]
177 <li id="ERROR_password_mismatch">Passwords do not match.</li>
179 [% IF ( ERROR_password_expiration_date ) %]
180 <li id="ERROR_dateexpiry">Password expiration date is invalid.</li>
182 [% IF ( ERROR_extended_unique_id_failed ) %]
183 <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>
185 [% IF ERROR_bad_email %]
186 <li id="ERROR_bad_email">The primary email is invalid.</li>
188 [% IF ERROR_bad_email_secondary %]
189 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
191 [% IF ERROR_bad_email_alternative %]
192 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
198 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
199 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
201 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
202 [% FOREACH field IN fieldstohide.split(',') %]
204 [% CASE 'identity' %] <span>Patron identity</span> |
205 [% CASE 'guarantor' %] <span>Guarantor information</span> |
206 [% CASE 'primary_address' %] <span>Main address</span> |
207 [% CASE 'primary_contact' %] <span>Contact information</span> |
208 [% CASE 'alt_address' %] <span>Alternate address</span> |
209 [% CASE 'alt_contact' %] <span>Alternate contact</span> |
210 [% CASE 'lib_mgmt' %] <span>Library management</span> |
211 [% CASE 'lib_setup' %] <span>Library setup</span> |
212 [% CASE 'login' %] <span>OPAC/Staff interface login</span> |
213 [% CASE 'flags' %] <span>Patron account flags</span> |
214 [% CASE 'debarments' %] <span>Patron restrictions</span> |
215 [% CASE 'housebound' %] <span>Housebound roles</span> |
216 [% CASE 'additional' %] <span>Additional attributes and identifiers</span> |
217 [% CASE 'messaging' %] <span>Patron messaging preferences</span> |
223 [% UNLESS ( check_member ) %]
224 <div id="toolbar" class="btn-toolbar">
225 [% IF quickadd && opadd %]
226 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
228 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
230 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
232 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
234 <i class="fa fa-times"></i> Cancel
239 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
240 [% UNLESS ( check_member ) %]
241 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
243 <!-- field always hidden in different form (1,2,3) -->
244 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
245 <input type="hidden" name="category_type" value="[% category_type | html %]" />
246 <input type="hidden" name="updtype" value="[% updtype | html %]" />
247 <input type="hidden" name="destination" value="[% destination | html %]" />
248 <input type="hidden" name="check_member" value="[% check_member | html %]" />
249 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
250 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
251 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
253 <input type="hidden" name="step" value="[% step | html %]" />
256 <input type="hidden" name="op" value="insert" />
257 [% ELSIF ( opduplicate ) %]
258 <input type="hidden" name="op" value="insert" />
260 <input type="hidden" name="op" value="save" />
261 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
262 [%# Only put the card number if we arent showing it in the form later %]
263 [% IF borrower_data.cardnumber %]
264 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
270 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex %]
271 <fieldset class="rows" id="memberentry_identity">
272 <legend id="identity_lgd">[% IF ( I ) %]<span>Organization</span> [% ELSE %]<span>Patron</span> [% END %]<span>identity</span></legend>
276 [% IF Koha.Preference('BorrowersTitles') %]
278 [% IF ( mandatorytitle ) %]
279 <label for="btitle" class="required">
284 <select id="btitle" name="title">
285 <option value=""></option>
286 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
288 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
290 <option value="[% t | html %]">[% t | html %]</option>
294 [% IF ( mandatorytitle ) %]
295 <span class="required">Required</span>
298 [% END # /IF Koha.Preference('BorrowersTitles') %]
299 [% END # /UNLESS notitle %]
300 [% END # /UNLESS ( I ) %]
302 [% UNLESS nosurname %]
305 <label for="surname" class="required">
309 [% IF ( mandatorysurname ) %]
310 <label for="surname" class="required">
312 <label for="surname">
317 [% IF ( uppercasesurnames ) %]
318 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" />
320 <input type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" />
322 [% IF ( mandatorysurname ) %]
323 <span class="required">Required</span>
326 [% END # /UNLESS nosurname %]
329 [% UNLESS nofirstname %]
331 [% IF ( mandatoryfirstname ) %]
332 <label for="firstname" class="required">
334 <label for="firstname">
338 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
339 [% IF ( mandatoryfirstname ) %]
340 <span class="required">Required</span>
343 [% END #/UNLESS nofirstname %]
344 [% UNLESS nomiddle_name %]
346 [% IF ( mandatorymiddle_name ) %]
347 <label for="middle_name" class="required">
349 <label for="middle_name">
353 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
354 [% IF ( mandatorymiddle_name ) %]
355 <span class="required">Required</span>
358 [% END #/UNLESS nomiddle_name %]
359 [% UNLESS nodateofbirth %]
361 [% IF ( mandatorydateofbirth ) %]
362 <label for="dateofbirth" class="required">
364 <label for="dateofbirth">
368 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
369 [% IF ( mandatorydateofbirth ) %]
370 <span class="required">Required</span>
372 [% IF ( ERROR_dateofbirth ) %]
373 <span class="required">(Error)</span>
375 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
377 [% END # /UNLESS nodateofbirth %]
378 [% UNLESS noinitials %]
380 [% IF ( mandatoryinitials ) %]
381 <label for="initials" class="required">
383 <label for="initials">
387 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
388 [% IF ( mandatoryinitials ) %]
389 <span class="required">Required</span>
392 [% END # /UNLESS noinitials %]
393 [% END #/UNLESS ( I ) %]
394 [% UNLESS noothernames %]
396 [% IF ( mandatoryothernames ) %]
397 <label for="othernames" class="required">
399 <label for="othernames">
403 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
404 [% IF ( mandatoryothernames ) %]
405 <span class="required">Required</span>
407 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
409 [% END #/UNLESS noothernames %]
414 [% UNLESS ( opduplicate ) %]
416 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
418 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
421 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
423 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
426 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
428 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
431 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
433 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
436 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
437 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
438 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
439 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
440 [% END # /UNLESS ( opduplicate )%]
442 [% END # /UNLESS nosex %]
443 [% END # /UNLESS ( I ) %]
445 </fieldset> <!-- /#memberentry_identity -->
446 [% END # hide fieldset %]
448 [% IF show_guarantor || guarantor %]
449 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
450 <div id="memberentry_guarantor_anchor">
451 <fieldset id="memberentry_guarantor" class="rows">
452 <legend>Patron guarantor</legend>
454 <div id="guarantor_relationships">
455 [% FOREACH r IN relationships %]
458 [% IF category_type == 'I' %]
459 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
460 <span class="label">Organization:</span>
461 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
464 <span class="label">Relationship:</span>
465 <span>[% r.relationship | html %]</span>
468 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
469 <span class="label">Guarantor:</span>
470 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
473 <span class="label">Relationship:</span>
474 <span>[% r.relationship | html %]</span>
478 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
479 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
484 [% END # END relationships foreach %]
485 [% IF guarantor && (!relationships) %]
486 <fieldset class="guarantor">
488 <li class="guarantor-details" data-borrowernumber="0">
489 <span class="label">Guarantor:</span>
490 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
491 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
494 [% IF possible_relationships %]
496 [% UNLESS empty_relationship_allowed %]
497 <label for="guarantor_relationship" class="required">Relationship: </label>
498 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
500 <label for="guarantor_relationship">Relationship: </label>
501 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
503 <option value="" selected>Empty option</option>
504 [% FOREACH pr IN possible_relationships.split('\|') %]
506 <option value="[% pr | html %]">[% pr | html %]</option>
510 [% UNLESS empty_relationship_allowed %]
511 <span class="required">Required</span>
515 <input type="hidden" name="new_guarantor_relationship" value="" />
519 <label for="guarantor_cancel"> </label>
520 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
525 </div> <!-- #/guarantor_relationships -->
527 <fieldset class="guarantor" id="guarantor_template">
529 <li class="guarantor-details" data-borrowernumber="0">
530 <span class="label">Guarantor:</span>
531 <a class="new_guarantor_link" href="#" target="blank">
532 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
533 (<span class="new_guarantor_id_text"></span>)
535 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
538 [% IF possible_relationships %]
540 [% UNLESS empty_relationship_allowed %]
541 <label for="guarantor_relationship" class="required">Relationship: </label>
542 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
544 <label for="guarantor_relationship">Relationship: </label>
545 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
547 <option value="" selected></option>
548 [% FOREACH pr IN possible_relationships.split('\|') %]
550 <option value="[% pr | html %]">[% pr | html %]</option>
554 [% UNLESS empty_relationship_allowed %]
555 <span class="required">Required</span>
559 <input type="hidden" name="new_guarantor_relationship" value="" />
563 <label for="guarantor_cancel"> </label>
564 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
570 <input type="hidden" id="guarantor_id" value="" />
571 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
572 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
575 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
578 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
580 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
581 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
582 [% IF borrower_data.privacy_guarantor_checkouts %]
583 <option value="0">No</option>
584 <option value="1" selected>Yes</option>
586 <option value="0" selected>No</option>
587 <option value="1">Yes</option>
590 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
593 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
595 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
596 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
597 [% IF borrower_data.privacy_guarantor_fines %]
598 <option value="0">No</option>
599 <option value="1" selected>Yes</option>
601 <option value="0" selected>No</option>
602 <option value="1">Yes</option>
605 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
609 </fieldset> <!-- /#memberentry_guarantor -->
610 </div> <!-- #/memberentry_guarantor_anchor -->
612 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
613 <fieldset class="rows" id="non_patron_guarantor">
614 <legend>Non-patron guarantor</legend>
616 [% UNLESS nocontactname %]
618 [% IF ( mandatorycontactname ) %]
619 <label for="contactname" class="required">
621 <label for="contactname">
625 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
626 [% IF ( mandatorycontactname ) %]
627 <span class="required">Required</span>
629 <div class="hint">Non-patron guarantor surname</div>
631 [% END # /UNLESS nocontactname %]
633 [% UNLESS nocontactfirstname %]
635 [% IF ( mandatorycontactfirstname ) %]
636 <label for="contactfirstname" class="required">
638 <label for="contactfirstname">
640 Guarantor first name:
642 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
643 [% IF ( mandatorycontactfirstname ) %]
644 <span class="required">Required</span>
646 <div class="hint">Non-patron guarantor first name</div>
648 [% END # /UNLESS noaltcontactfirstname %]
650 [% UNLESS norelationship %]
651 [% IF possible_relationships %]
653 <label for="relationship">Relationship: </label>
654 <select class="relationship" name="relationship">
655 <option value=""></option>
656 [% FOREACH pr IN possible_relationships.split('\|') %]
657 [% IF pr == borrower_data.relationship %]
658 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
660 <option value="[% pr | html %]">[% pr | html %]</option>
665 [% END #/IF possible_relationships %]
666 [% END # /UNLESS norelationship %]
668 </fieldset> <!-- /#non_patron_guarantor -->
669 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
670 [% END # /IF show_guarantor || guarantor %]
672 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
673 [% PROCESS 'main-address-style' %]
674 [% END # /UNLESS nostreet && nocity etc group%]
676 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
677 <fieldset class="rows" id="memberentry_contact">
678 <legend id="contact_lgd">Contact information</legend>
682 [% IF ( mandatoryphone ) %]
683 <label for="phone" class="required">
689 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
690 [% IF ( mandatoryphone ) %]
691 <span class="required">Required</span>
693 <div class="hint">Shows on transit slips</div>
695 [% END # /UNLESS nophone %]
697 [% UNLESS nophonepro %]
699 [% IF ( mandatoryphonepro ) %]
700 <label for="phonepro" class="required">
702 <label for="phonepro">
706 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
707 [% IF ( mandatoryphonepro ) %]
708 <span class="required">Required</span>
711 [% END # /UNLESS nophonepro %]
713 [% UNLESS nomobile %]
715 [% IF ( mandatorymobile ) %]
716 <label for="mobile" class="required">
722 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
723 [% IF ( mandatorymobile ) %]
724 <span class="required">Required</span>
727 [% END # /UNLESS nomobile %]
731 [% IF ( mandatoryemail ) %]
732 <label for="email" class="required">
738 [% IF ( NoUpdateEmail ) %]
739 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
741 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
743 [% IF ( mandatoryemail ) %]
744 <span class="required">Required</span>
746 <div class="hint">Shows on transit slips</div>
748 [% END #/UNLESS noemail %]
750 [% UNLESS noemailpro %]
752 [% IF ( mandatoryemailpro ) %]
753 <label for="emailpro" class="required">
755 <label for="emailpro">
759 [% IF ( NoUpdateEmail ) %]
760 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
762 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
764 [% IF ( mandatoryemailpro ) %]
765 <span class="required">Required</span>
768 [% END #/UNLESS noemailpro %]
772 [% IF ( mandatoryfax ) %]
773 <label for="fax" class="required">
779 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
780 [% IF ( mandatoryfax ) %]
781 <span class="required">Required</span>
784 [% END #/UNLESS nofax %]
786 [% UNLESS noprimary_contact_method %]
788 [% IF mandatoryprimary_contact_method %]
789 <label for="primary_contact_method" class="required">
791 <label for="primary_contact_method">
793 Main contact method: </label>
795 <select id="primary_contact_method" name="primary_contact_method">
796 <option value=""></option>
798 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
799 <option value="phone" selected="selected">Primary phone</option>
801 <option value="phone">Primary phone</option>
804 [% UNLESS nophonepro %]
805 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
806 <option value="phonepro" selected="selected">Secondary phone</option>
808 <option value="phonepro">Secondary phone</option>
811 [% UNLESS nomobile %]
812 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
813 <option value="mobile" selected="selected">Other phone</option>
815 <option value="mobile">Other phone</option>
819 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
820 <option value="email" selected="selected">Primary email</option>
822 <option value="email">Primary email</option>
825 [% UNLESS noemailpro %]
826 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
827 <option value="emailpro" selected="selected">Secondary email</option>
829 <option value="emailpro">Secondary email</option>
833 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
834 <option value="fax" selected="selected">Fax</option>
836 <option value="fax">Fax</option>
840 [% IF mandatoryprimary_contact_method %]
841 <span class="required">Required</span>
846 </fieldset> <!-- /#memberentry_contact -->
847 [% END # hide fieldset %]
849 <!-- ************************ STEP_1 *********************** -->
850 [% END # /IF ( step_1 ) %]
853 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
854 [% PROCESS 'alt-address-style' %]
855 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
856 [% END # /IF ( step_6 ) %]
859 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
860 [% PROCESS 'alt-contact-style' %]
861 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
862 [% END # /IF ( step_2 ) %]
865 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
866 <fieldset class="rows" id="memberentry_library_management">
867 <legend id="library_management_lgd">Library management</legend>
869 [% UNLESS nocardnumber %]
871 [% IF mandatorycardnumber %]
872 <label for="cardnumber" class="required">
874 <label for="cardnumber" class="validated">
879 <!-- NOTE: div.hint closing tag isn't on the same line -->
880 [% IF minlength_cardnumber == maxlength_cardnumber %]
881 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
882 [% IF mandatorycardnumber %]
883 <span class="required">Required</span>
885 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
886 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
887 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
888 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
889 [% IF mandatorycardnumber %]
890 <span class="required">Required</span>
892 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
893 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
894 [% ELSIF maxlength_cardnumber %]
895 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
896 [% IF mandatorycardnumber %]
897 <span class="required">Required</span>
899 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
900 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
902 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
903 [% IF mandatorycardnumber %]
904 <span class="required">Required</span>
906 <div class="hint">There is no minimum or maximum character length.
908 [% IF autoMemberNum %]
909 [% IF mandatorycardnumber %]
910 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
912 <br/>Leave blank for auto calc during registration
915 </div><!--/div.hint -->
917 [% END # /UNLESS nocardnumber %]
919 [% UNLESS nobranchcode %]
921 <label for="libraries" class="required">Library:</label>
922 <select name="branchcode" id="libraries">
923 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
925 <span class="required">Required</span>
930 <label for="categorycode_entry" class="required">Category: </label>
931 <select id="categorycode_entry" name="categorycode">
932 [% FOREACH typeloo IN typeloop %]
933 [% FOREACH categoryloo IN typeloo.categoryloop %]
934 [% IF ( loop.first ) %]
935 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
936 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
937 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
938 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
939 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
940 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
942 [% IF ( categoryloo.categorycodeselected ) %]
943 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-pwd-length="[% categoryloo.effective_min_password_length | html %]" data-pwd-strong="[% categoryloo.effective_require_strong_password | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
945 <option value="[% categoryloo.categorycode | html %]" data-pwd-length="[% categoryloo.effective_min_password_length | html %]" data-pwd-strong="[% categoryloo.effective_require_strong_password | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
947 [% IF ( loop.last ) %]
950 [% END # /FOREACH categoryloo %]
951 [% END # /FOREACH typeloo %]
953 <span class="required">Required</span>
958 [% IF ( mandatorysort1 ) %]
959 <label for="sort1" class="required">
965 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
966 [% IF ( mandatorysort1 ) %]
967 <span class="required">Required</span>
970 [% END # /UNLESS nosort1 %]
974 [% IF ( mandatorysort2 ) %]
975 <label for="sort2" class="required">
981 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
982 [% IF ( mandatorysort2 ) %]
983 <span class="required">Required</span>
986 [% END # /UNLESS nosort2 %]
988 [% UNLESS noautorenew_checkouts %]
990 <label for="yes-autorenew_checkouts">
991 Allow auto-renewal of items:
993 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
994 <label for="yes-autorenew_checkouts">
996 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
998 <label for="no-autorenew_checkouts">
1000 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1003 <label for="yes-autorenew_checkouts">
1005 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1007 <label for="no-autorenew_checkouts">
1009 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1015 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1017 <label for="checkprevcheckout">Check for previous checkouts: </label>
1018 <select name="checkprevcheckout" id="checkprevcheckout">
1019 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1020 <option value="yes" selected="selected">Yes if settings allow it</option>
1021 <option value="no">No if settings allow it</option>
1022 <option value="inherit">Inherit from settings</option>
1023 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1024 <option value="yes">Yes if settings allow it</option>
1025 <option value="no" selected="selected">No if settings allow it</option>
1026 <option value="inherit">Inherit from settings</option>
1028 <option value="yes">Yes if settings allow it</option>
1029 <option value="no">No if settings allow it</option>
1030 <option value="inherit" selected="selected">Inherit from settings</option>
1034 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1036 [% IF Koha.Preference('TranslateNotices') %]
1038 <label for="lang">Preferred language for notices: </label>
1039 <select id="lang" name="lang">
1040 <option value="default">Default</option>
1041 [% FOR language IN languages %]
1042 [% FOR sublanguage IN language.sublanguages_loop %]
1043 [% IF language.plural %]
1044 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1045 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1047 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1050 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1051 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1053 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1055 [% END # /IF language.plural %]
1056 [% END # /FOR sublanguage %]
1057 [% END #/FOR language %]
1058 </select> <!-- /#lang -->
1060 [% END #/IF Koha.Preference('TranslateNotices') %]
1062 </fieldset> <!-- /#memberentry_library_management -->
1064 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1065 <fieldset class="rows" id="memberentry_subscription">
1066 <legend id="library_setup_lgd">Library setup</legend><ol>
1067 [% UNLESS nodateenrolled %]
1069 [% IF ( mandatorydateenrolled ) %]
1070 <label for="from" class="required">
1076 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1077 [% IF ( mandatorydateenrolled ) %]
1078 <span class="required">Required</span>
1080 [% IF ( ERROR_dateenrolled ) %]
1081 <span class="required">(Error)</span>
1083 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1085 [% END # /UNLESS nodateenrolled %]
1087 [% UNLESS nodateexpiry %]
1090 <li style="display:none">
1092 [% IF ( mandatorydateexpiry ) %]
1093 <label for="to" class="required">
1097 Expiry date (leave blank for auto calc):
1099 [% UNLESS ( opadd ) %]
1100 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1102 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1104 [% IF ( mandatorydateexpiry ) %]
1105 <span class="required">Required</span>
1107 [% IF ( ERROR_dateexpiry ) %]
1108 <span class="required">(Error)</span>
1110 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1113 [% UNLESS noopacnote %]
1115 [% IF ( mandatoryopacnote ) %]
1116 <label for="opacnote" class="required">
1118 <label for="opacnote">
1122 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1123 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1124 [% IF ( mandatoryopacnote ) %]
1125 <span class="required">Required</span>
1128 [% END # /UNLESS noopacnote %]
1130 [% UNLESS noborrowernotes %]
1132 [% IF ( mandatoryborrowernotes ) %]
1133 <label for="borrowernotes" class="required">
1135 <label for="borrowernotes">
1139 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | html UNLESS opduplicate %]</textarea>
1140 <div class="hint">This message displays when checking out to this patron</div>
1141 [% IF ( mandatoryborrowernotes ) %]
1142 <span class="required">Required</span>
1145 [% END # /UNLESS noborrowernotes %]
1147 </fieldset> <!-- /#memberentry_subscription -->
1148 [% END # hide fieldset %]
1150 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1151 <fieldset class="rows" id="memberentry_userid">
1152 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1154 [% UNLESS nouserid %]
1156 [% IF ( mandatoryuserid ) %]
1157 <label for="userid" class="required">
1159 <label for="userid">
1164 [% IF ( NoUpdateLogin ) %]
1165 [% IF ( opduplicate ) %]
1166 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1168 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1171 [% IF ( opduplicate ) %]
1172 <input type="text" id="userid" name="userid" size="20" value="" />
1174 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1176 [% END # /IF ( NoUpdateLogin ) %]
1178 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1179 <input type="text" disabled="disabled" style="display:none" />
1181 [% IF ( mandatoryuserid ) %]
1182 <span class="required">Required</span>
1185 [% END # /UNLESS nouserid %]
1187 [% UNLESS nopassword %]
1189 [% IF ( mandatorypassword ) %]
1190 <label for="password" class="required">
1192 <label for="password">
1197 [% IF ( NoUpdateLogin ) %]
1198 [% IF ( opduplicate ) %]
1199 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1201 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1204 [% IF ( opduplicate ) %]
1205 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1207 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1209 [% END # /IF ( NoUpdateLogin ) %]
1210 [% ELSE # IF ( opadd ) %]
1212 [% IF ( borrower_data.password ) %]
1213 [% IF ( NoUpdateLogin ) %]
1214 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1216 [% IF ( opduplicate ) %]
1217 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1219 <input type="password" id="password" name="password" size="20" value="****" />
1223 [% IF ( NoUpdateLogin ) %]
1224 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1226 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1228 [% END # /IF ( password ) %]
1229 [% END # /IF ( opadd ) %]
1230 [% IF ( mandatorypassword ) %]
1231 <span class="required">Required</span>
1233 [% IF ( ERROR_password_too_short ) %]
1234 <span class="required">Password is too short</span>
1236 [% IF ( ERROR_password_too_weak ) %]
1237 <span class="required">Password is too weak</span>
1239 [% IF ( ERROR_password_has_whitespaces ) %]
1240 <span class="required">Password has leading or trailing whitespaces</span>
1242 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1246 [% IF ( mandatorypassword ) %]
1247 <label for="password2" class="required">
1249 <label for="password2">
1254 [% IF ( NoUpdateLogin ) %]
1255 [% IF ( opduplicate ) %]
1256 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1258 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1261 [% IF ( opduplicate ) %]
1262 <input type="password" id="password2" name="password2" size="20" />
1264 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1267 [% ELSE # IF ( opadd ) %]
1268 [% IF ( borrower_data.password ) %]
1269 [% IF ( NoUpdateLogin ) %]
1270 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1272 [% IF ( opduplicate ) %]
1273 <input type="password" id="password2" name="password2" size="20" />
1275 <input type="password" id="password2" name="password2" size="20" value="****" />
1279 [% IF ( NoUpdateLogin ) %]
1280 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1282 <input type="password" id="password2" name="password2" size="20" value="" />
1285 [% END # /IF ( opadd ) %]
1287 [% IF ( mandatorypassword ) %]
1288 <span class="required">Required</span>
1290 [% IF ( ERROR_password_mismatch ) %]
1291 <span class="required">Passwords do not match</span>
1294 [% END # /UNLESS nopassword %]
1295 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1297 <label for="password_expiration_date">Password expiration date:</label>
1298 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1302 </fieldset> <!-- /#memberentry_userid -->
1303 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1305 <!--this zones are not necessary in modif mode -->
1306 [% UNLESS ( opadd || opduplicate ) %]
1307 <fieldset class="rows" id="memberentry_account_flags">
1308 <legend id="account_flags_lgd">Patron account flags</legend>
1310 [% FOREACH flagloo IN flagloop %]
1312 <label class="radio" for="yes[% flagloo.name | html %]">
1313 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1314 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1316 [% IF CAN_user_circulate_manage_restrictions %]
1317 <label for="yes[% flagloo.name | html %]">
1318 [% IF ( flagloo.yes ) %]
1319 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1321 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1325 <label for="no[% flagloo.name | html %]">
1326 [% IF ( flagloo.no ) %]
1327 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1329 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1334 [% IF flagloo.yes %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1335 [% END # /IF CAN_user_circulate_manage_restrictions %]
1337 [% END # /FOREACH flagloo %]
1339 </fieldset> <!-- /#memberentry_account_flags -->
1341 <fieldset class="rows" id="memberentry_restrictions">
1342 <legend id="restrictions_lgd">Patron restrictions</legend>
1343 [% IF ( debarments ) %]
1350 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1351 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1357 [% FOREACH d IN debarments %]
1359 <td>[% d.type | html %]</td>
1361 [% IF d.comment.search('OVERDUES_PROCESS') %]
1362 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1364 [% d.comment | $raw %]
1368 [% IF d.expiration %]
1369 [% d.expiration | $KohaDates %]
1374 <td>[% d.created | $KohaDates %]</td>
1375 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1377 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1381 [% END # /FOREACH d %]
1385 <p>Patron is currently unrestricted.</p>
1386 [% END # /IF ( debarments ) %]
1388 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1389 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1390 <fieldset id="manual_restriction_form">
1391 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1392 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1395 <label for="debarred_comment">Comment: </label>
1396 <input type="text" id="debarred_comment" name="debarred_comment" />
1399 <label for="debarred_expiration">Expiration: </label>
1400 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1401 <a href="#" id="clear_debarred_expiration">Clear date</a>
1405 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1407 </fieldset> <!-- /#manual_restriction_form -->
1408 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1409 </fieldset> <!-- /#memberentry_restrictions -->
1410 [% END # /UNLESS ( opadd || opduplicate ) %]
1411 [% END # /IF ( step_3 ) %]
1414 [% IF Koha.Preference('HouseboundModule') %]
1415 <fieldset class="rows" id="memberentry_housebound_roles">
1416 <legend id="housebound_roles">Housebound roles</legend>
1419 <label class="radio" for="housebound_chooser">
1422 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1423 <label for="yes_housebound_chooser">Yes </label>
1424 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1425 <label for="no_housebound_chooser">No </label>
1426 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1428 <label for="yes_housebound_chooser">Yes </label>
1429 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1430 <label for="no_housebound_chooser">No </label>
1431 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1435 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1436 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1437 <label for="yes_housebound_deliverer">Yes </label>
1438 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1439 <label for="no_housebound_deliverer">No </label>
1440 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1442 <label for="yes_housebound_deliverer">Yes </label>
1443 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1444 <label for="no_housebound_deliverer">No </label>
1445 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1448 </ol> <!-- /ol.radio -->
1449 </fieldset> <!-- /#memberentry_housebound_roles -->
1450 [% END # hide fieldset %]
1451 [% END # IF step_7 %]
1454 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1455 [% UNLESS ( no_patron_attribute_types ) %]
1456 <fieldset class="rows" id="memberentry_patron_attributes">
1457 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1458 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1459 [% FOREACH pa_loo IN patron_attributes %]
1460 <ol class="attributes_table">
1461 [% IF pa_loo.class %]
1462 <fieldset id="aai_[% pa_loo.class | html %]">
1463 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1465 [% FOREACH patron_attribute IN pa_loo.items %]
1466 <li data-category_code="[% patron_attribute.category_code | html %]">
1467 [% IF patron_attribute.mandatory %]
1468 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1470 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1472 [% IF ( patron_attribute.use_dropdown ) %]
1473 [% IF patron_attribute.mandatory %]
1474 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1476 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1478 <option value=""></option>
1479 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1480 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1481 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1482 [% auth_val_loo.lib | html %]
1485 <option value="[% auth_val_loo.authorised_value | html %]" >
1486 [% auth_val_loo.lib | html %]
1492 [% IF patron_attribute.mandatory %]
1493 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1495 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1497 [% END # /IF ( patron_attribute.use_dropdown ) %]
1498 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1499 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1500 [% IF ( patron_attribute.repeatable ) %]
1501 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1503 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1505 [% END # /FOREACH patron_attribute %]
1506 [% IF pa_loo.class %]</fieldset>[% END %]
1508 [% END # /FOREACH pa_loo %]
1509 </fieldset> <!-- /#memberentry_patron_attributes -->
1510 [% END # UNLESS ( no_patron_attribute_types ) %]
1511 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1512 [% END # IF ( step_4 ) %]
1515 [% IF ( EnhancedMessagingPreferences ) %]
1516 <fieldset class="rows" id="memberentry_messaging_prefs">
1517 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1518 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1519 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1521 <input type="hidden" name="setting_messaging_prefs" value="1" />
1522 [% INCLUDE 'messaging-preference-form.inc' %]
1523 [% IF ( SMSSendDriver ) %]
1525 <label for="SMSnumber">SMS number:</label>
1526 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1527 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1529 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1531 <label for="sms_provider_id">SMS provider:</label>
1532 <select id="sms_provider_id" name="sms_provider_id">
1533 <option value="">Unknown</option>
1534 [% FOREACH s IN sms_providers %]
1535 [% IF s.id == borrower_data.sms_provider_id %]
1536 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1538 <option value="[% s.id | html %]">[% s.name | html %]</option>
1543 [% END # /UNLESS nosms_provider_id %]
1544 [% END # IF ( SMSSendDriver ) %]
1546 [% END # IF ( EnhancedMessagingPreferences ) %]
1547 [% END # /IF step_5 %]
1548 </form> <!-- /#entryform -->
1550 [% IF quickadd && opadd && !check_member %]
1551 <form id="quick_add_form" class="toggler">
1552 <fieldset class="rows quick_add"><legend>Quick add</legend>
1553 <ol id="quick_add_list">
1559 [% END # /UNLESS ( no_add ) %]
1561 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1563 [% UNLESS ( opadd ) %]
1564 <div class="col-sm-2 col-sm-pull-10">
1566 [% INCLUDE 'circ-menu.inc' %]
1568 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1570 </div> <!-- /.row -->
1572 [% MACRO jsinclude BLOCK %]
1573 [% Asset.js("lib/hc-sticky.js") | $raw %]
1574 [% INCLUDE 'calendar.inc' %]
1575 [% INCLUDE 'str/members-menu.inc' %]
1576 [% Asset.js("js/members-menu.js") | $raw %]
1578 function update_cardnumber_warning(size){
1579 var max_len = [% maxlength_cardnumber | html %];
1580 if ( size >= max_len ) {
1581 $("#cn_max").show();
1583 $("#cn_max").hide();
1587 function showHideFields(){
1588 [% UNLESS step == 1 %]
1589 [% IF fieldstohide.match('identity') %]
1590 $("#memberentry_identity").find('legend').nextAll().toggle();
1592 [% IF show_guarantor || guarantor %]
1593 [% IF fieldstohide.match('guarantor') %]
1594 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1595 $("#guarantor_template").toggle();
1598 [% IF fieldstohide.match('primary_address') %]
1599 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1601 [% IF fieldstohide.match('primary_contact') %]
1602 $("#memberentry_contact").find('legend').nextAll().toggle();
1605 [% UNLESS step == 6 %]
1606 [% IF fieldstohide.match('alt_address') %]
1607 $("#memberentry_address").find('legend').nextAll().toggle();
1610 [% UNLESS step == 2 %]
1611 [% IF fieldstohide.match('alt_contact') %]
1612 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1615 [% UNLESS step == 3 %]
1616 [% IF fieldstohide.match('lib_mgmt') %]
1617 $("#memberentry_library_management").find('legend').nextAll().toggle();
1619 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1620 [% IF fieldstohide.match('lib_setup') %]
1621 $("#memberentry_subscription").find('legend').nextAll().toggle();
1624 [% UNLESS nouserid && nopassword %]
1625 [% IF fieldstohide.match('login') %]
1626 $("#memberentry_userid").find('legend').nextAll().toggle();
1629 [% UNLESS ( opadd || opduplicate ) %]
1630 [% IF fieldstohide.match('flags') %]
1631 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1634 [% IF fieldstohide.match('debarments') %]
1635 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1638 [% UNLESS step == 7 %]
1639 [% IF Koha.Preference('HouseboundModule') %]
1640 [% IF fieldstohide.match('housebound') %]
1641 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1645 [% UNLESS step == 4 %]
1646 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1647 [% IF fieldstohide.match('additional') %]
1648 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1652 [% UNLESS step == 5 %]
1653 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1654 [% IF fieldstohide.match('messaging') %]
1655 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1656 $("#messaging_prefs_loading").toggle();
1662 $(document).ready(function() {
1664 $("#toggle_hidden_fields").change(function(){
1668 $("legend").click(function(){
1669 $(this).nextAll().toggle();
1670 $("#messaging_prefs_loading").hide();
1671 $("#guarantor_template").hide();
1674 $("#saverecord").css({ 'margin-left': 0 });
1676 Sticky = $("#toolbar");
1679 stickyClass: "floating"
1682 [% IF borrower_data.categorycode %]
1683 update_category_code( "[% borrower_data.categorycode | html %]" );
1685 if ( $("#categorycode_entry").length > 0 ){
1686 var category_code = $("#categorycode_entry").find("option:selected").val();
1687 update_category_code( category_code );
1691 [% IF new_guarantors %]
1692 [% FOREACH g IN new_guarantors %]
1693 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1697 $("#cn_max").hide();
1699 $("#cardnumber").on("keydown", function(e){
1700 content = $(this).val();
1702 $("#cardnumber").on("keyup", function(e){
1703 // .val() will return the value of the input after the key has been released
1704 var l = $(this).val().length;
1705 if ( l == content.length + 1 ) { l--; }
1706 update_cardnumber_warning(l);
1708 $("#cardnumber").bind("paste", function(e){
1709 var pastedData = e.originalEvent.clipboardData.getData('text');
1710 update_cardnumber_warning(pastedData.length - 1);
1712 var toggle_quick_add = $(".toggle_quick_add");
1713 $(toggle_quick_add).click(function(e){
1714 toggle_quick_add.toggle();
1717 var toggle_from = '';
1718 if( $("#entryform:visible").length ) {
1719 toggle_to = "#quick_add_form label";
1720 toggle_from = "#entryform label";
1721 $("#memberentry_guarantor").appendTo("#quick_add_form");
1723 toggle_to="#entryform label";
1724 toggle_from = "#quick_add_form label";
1725 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1727 $(toggle_from).each(function() {
1728 var input_label = $(this).attr('for');
1729 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1730 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1733 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1736 $(".toggler").toggle();
1739 $("#save_quick_add").click(function(){
1740 $("#quick_add_form").validate();
1741 if( $("#quick_add_form").valid()){
1742 $('.toggle_quick_add').click();
1743 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1744 $('#saverecord').click();
1746 else {return false;}
1749 $("#saverecord").click(function(){
1750 if( check_form_borrowers() ){
1751 $("#entryform").submit();
1755 $('#duplicate').on('click', function() {
1756 $("input[name='op']").val('modify');
1757 $("input[name='borrowernumber']").val('[% check_member | html %]');
1758 $("input[name='check_member']").val('');
1759 $('#entryform').submit();
1762 $('#not-duplicate').on('click', function() {
1763 $("input[name='nodouble']").val('1');
1764 $('#entryform').submit();
1767 $(".popup_patronview").on("click", function(e){
1769 var url = $(this).attr("href");
1770 openWindow( url, "patronview" );
1773 $("#dateofbirth").on("change", function(){
1777 $("#debarred_comment, #debarred_expiration").on("change", function(){
1778 $("#add_debarment").val(1);
1781 $("#clear_debarred_expiration").on("click", function(e){
1783 $('#debarred_expiration').val("");
1786 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1788 clear_entry( this );
1791 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1793 clone_entry( this );
1796 $("#categorycode_entry").on("change", function(){
1797 update_category_code(this);
1801 [% IF quickadd && opadd && !check_member %]
1802 $(document).ready(function () {
1804 $("#entryform,#saverecord").hide();
1805 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1806 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1807 $("#entryform label").each(function () {
1808 var input_label = $(this).attr('for');
1809 if ( input_label == 'sex-female' ) {
1812 else if ( input_label == 'btitle' ) {
1813 input_label='title';
1815 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1816 $(this).parent().clone().appendTo("#quick_add_list");
1817 [% UNLESS mandatorypassword %]
1818 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1822 if ( $("#memberentry_guarantor").length ) {
1823 $("#memberentry_guarantor").appendTo("#quick_add_form");
1825 $("#quick_add_form").show();
1828 $("#guarantor_template").hide();
1831 [% Asset.js("js/members.js") | $raw %]
1832 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1833 [% 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 %]
1836 [% INCLUDE 'intranet-bottom.inc' %]