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 && 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 nodateofbirth %]
346 [% IF ( mandatorydateofbirth ) %]
347 <label for="dateofbirth" class="required">
349 <label for="dateofbirth">
353 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
354 [% IF ( mandatorydateofbirth ) %]
355 <span class="required">Required</span>
357 [% IF ( ERROR_dateofbirth ) %]
358 <span class="required">(Error)</span>
360 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
362 [% END # /UNLESS nodateofbirth %]
363 [% UNLESS noinitials %]
365 [% IF ( mandatoryinitials ) %]
366 <label for="initials" class="required">
368 <label for="initials">
372 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
373 [% IF ( mandatoryinitials ) %]
374 <span class="required">Required</span>
377 [% END # /UNLESS noinitials %]
378 [% END #/UNLESS ( I ) %]
379 [% UNLESS noothernames %]
381 [% IF ( mandatoryothernames ) %]
382 <label for="othernames" class="required">
384 <label for="othernames">
388 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
389 [% IF ( mandatoryothernames ) %]
390 <span class="required">Required</span>
392 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
394 [% END #/UNLESS noothernames %]
399 [% UNLESS ( opduplicate ) %]
401 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
403 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
406 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
408 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
411 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
413 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
416 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
418 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
421 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
422 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
423 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
424 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
425 [% END # /UNLESS ( opduplicate )%]
427 [% END # /UNLESS nosex %]
428 [% END # /UNLESS ( I ) %]
430 </fieldset> <!-- /#memberentry_identity -->
431 [% END # hide fieldset %]
433 [% IF show_guarantor || guarantor %]
434 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
435 <div id="memberentry_guarantor_anchor">
436 <fieldset id="memberentry_guarantor" class="rows">
437 <legend>Patron guarantor</legend>
439 <div id="guarantor_relationships">
440 [% FOREACH r IN relationships %]
443 [% IF category_type == 'I' %]
444 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
445 <span class="label">Organization:</span>
446 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
449 <span class="label">Relationship:</span>
450 <span>[% r.relationship | html %]</span>
453 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
454 <span class="label">Guarantor:</span>
455 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
458 <span class="label">Relationship:</span>
459 <span>[% r.relationship | html %]</span>
463 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
464 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
469 [% END # END relationships foreach %]
470 [% IF guarantor && (!relationships) %]
471 <fieldset class="guarantor">
473 <li class="guarantor-details" data-borrowernumber="0">
474 <span class="label">Guarantor:</span>
475 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
476 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
479 [% IF possible_relationships %]
481 [% UNLESS empty_relationship_allowed %]
482 <label for="guarantor_relationship" class="required">Relationship: </label>
483 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
485 <label for="guarantor_relationship">Relationship: </label>
486 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
488 <option value="" selected>Empty option</option>
489 [% FOREACH pr IN possible_relationships.split('\|') %]
491 <option value="[% pr | html %]">[% pr | html %]</option>
495 [% UNLESS empty_relationship_allowed %]
496 <span class="required">Required</span>
500 <input type="hidden" name="new_guarantor_relationship" value="" />
504 <label for="guarantor_cancel"> </label>
505 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
510 </div> <!-- #/guarantor_relationships -->
512 <fieldset class="guarantor" id="guarantor_template">
514 <li class="guarantor-details" data-borrowernumber="0">
515 <span class="label">Guarantor:</span>
516 <a class="new_guarantor_link" href="#" target="blank">
517 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
518 (<span class="new_guarantor_id_text"></span>)
520 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
523 [% IF possible_relationships %]
525 [% UNLESS empty_relationship_allowed %]
526 <label for="guarantor_relationship" class="required">Relationship: </label>
527 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
529 <label for="guarantor_relationship">Relationship: </label>
530 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
532 <option value="" selected></option>
533 [% FOREACH pr IN possible_relationships.split('\|') %]
535 <option value="[% pr | html %]">[% pr | html %]</option>
539 [% UNLESS empty_relationship_allowed %]
540 <span class="required">Required</span>
544 <input type="hidden" name="new_guarantor_relationship" value="" />
548 <label for="guarantor_cancel"> </label>
549 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
555 <input type="hidden" id="guarantor_id" value="" />
556 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
557 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
560 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
563 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
565 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
566 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
567 [% IF borrower_data.privacy_guarantor_checkouts %]
568 <option value="0">No</option>
569 <option value="1" selected>Yes</option>
571 <option value="0" selected>No</option>
572 <option value="1">Yes</option>
575 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
578 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
580 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
581 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
582 [% IF borrower_data.privacy_guarantor_fines %]
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 fines from the OPAC</div>
594 </fieldset> <!-- /#memberentry_guarantor -->
595 </div> <!-- #/memberentry_guarantor_anchor -->
597 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
598 <fieldset class="rows" id="non_patron_guarantor">
599 <legend>Non-patron guarantor</legend>
601 [% UNLESS nocontactname %]
603 [% IF ( mandatorycontactname ) %]
604 <label for="contactname" class="required">
606 <label for="contactname">
610 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
611 [% IF ( mandatorycontactname ) %]
612 <span class="required">Required</span>
614 <div class="hint">Non-patron guarantor surname</div>
616 [% END # /UNLESS nocontactname %]
618 [% UNLESS nocontactfirstname %]
620 [% IF ( mandatorycontactfirstname ) %]
621 <label for="contactfirstname" class="required">
623 <label for="contactfirstname">
625 Guarantor first name:
627 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
628 [% IF ( mandatorycontactfirstname ) %]
629 <span class="required">Required</span>
631 <div class="hint">Non-patron guarantor first name</div>
633 [% END # /UNLESS noaltcontactfirstname %]
635 [% UNLESS norelationship %]
636 [% IF possible_relationships %]
638 <label for="relationship">Relationship: </label>
639 <select class="relationship" name="relationship">
640 <option value=""></option>
641 [% FOREACH pr IN possible_relationships.split('\|') %]
642 [% IF pr == borrower_data.relationship %]
643 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
645 <option value="[% pr | html %]">[% pr | html %]</option>
650 [% END #/IF possible_relationships %]
651 [% END # /UNLESS norelationship %]
653 </fieldset> <!-- /#non_patron_guarantor -->
654 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
655 [% END # /IF show_guarantor || guarantor %]
657 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
658 [% PROCESS 'main-address-style' %]
659 [% END # /UNLESS nostreet && nocity etc group%]
661 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
662 <fieldset class="rows" id="memberentry_contact">
663 <legend id="contact_lgd">Contact information</legend>
667 [% IF ( mandatoryphone ) %]
668 <label for="phone" class="required">
674 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
675 [% IF ( mandatoryphone ) %]
676 <span class="required">Required</span>
678 <div class="hint">Shows on transit slips</div>
680 [% END # /UNLESS nophone %]
682 [% UNLESS nophonepro %]
684 [% IF ( mandatoryphonepro ) %]
685 <label for="phonepro" class="required">
687 <label for="phonepro">
691 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
692 [% IF ( mandatoryphonepro ) %]
693 <span class="required">Required</span>
696 [% END # /UNLESS nophonepro %]
698 [% UNLESS nomobile %]
700 [% IF ( mandatorymobile ) %]
701 <label for="mobile" class="required">
707 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
708 [% IF ( mandatorymobile ) %]
709 <span class="required">Required</span>
712 [% END # /UNLESS nomobile %]
716 [% IF ( mandatoryemail ) %]
717 <label for="email" class="required">
723 [% IF ( NoUpdateEmail ) %]
724 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
726 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
728 [% IF ( mandatoryemail ) %]
729 <span class="required">Required</span>
731 <div class="hint">Shows on transit slips</div>
733 [% END #/UNLESS noemail %]
735 [% UNLESS noemailpro %]
737 [% IF ( mandatoryemailpro ) %]
738 <label for="emailpro" class="required">
740 <label for="emailpro">
744 [% IF ( NoUpdateEmail ) %]
745 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
747 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
749 [% IF ( mandatoryemailpro ) %]
750 <span class="required">Required</span>
753 [% END #/UNLESS noemailpro %]
757 [% IF ( mandatoryfax ) %]
758 <label for="fax" class="required">
764 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
765 [% IF ( mandatoryfax ) %]
766 <span class="required">Required</span>
769 [% END #/UNLESS nofax %]
771 [% UNLESS noprimary_contact_method %]
773 [% IF mandatoryprimary_contact_method %]
774 <label for="primary_contact_method" class="required">
776 <label for="primary_contact_method">
778 Main contact method: </label>
780 <select id="primary_contact_method" name="primary_contact_method">
781 <option value=""></option>
783 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
784 <option value="phone" selected="selected">Primary phone</option>
786 <option value="phone">Primary phone</option>
789 [% UNLESS nophonepro %]
790 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
791 <option value="phonepro" selected="selected">Secondary phone</option>
793 <option value="phonepro">Secondary phone</option>
796 [% UNLESS nomobile %]
797 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
798 <option value="mobile" selected="selected">Other phone</option>
800 <option value="mobile">Other phone</option>
804 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
805 <option value="email" selected="selected">Primary email</option>
807 <option value="email">Primary email</option>
810 [% UNLESS noemailpro %]
811 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
812 <option value="emailpro" selected="selected">Secondary email</option>
814 <option value="emailpro">Secondary email</option>
818 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
819 <option value="fax" selected="selected">Fax</option>
821 <option value="fax">Fax</option>
825 [% IF mandatoryprimary_contact_method %]
826 <span class="required">Required</span>
831 </fieldset> <!-- /#memberentry_contact -->
832 [% END # hide fieldset %]
834 <!-- ************************ STEP_1 *********************** -->
835 [% END # /IF ( step_1 ) %]
838 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
839 [% PROCESS 'alt-address-style' %]
840 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
841 [% END # /IF ( step_6 ) %]
844 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
845 [% PROCESS 'alt-contact-style' %]
846 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
847 [% END # /IF ( step_2 ) %]
850 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
851 <fieldset class="rows" id="memberentry_library_management">
852 <legend id="library_management_lgd">Library management</legend>
854 [% UNLESS nocardnumber %]
856 [% IF mandatorycardnumber %]
857 <label for="cardnumber" class="required">
859 <label for="cardnumber" class="validated">
864 <!-- NOTE: div.hint closing tag isn't on the same line -->
865 [% IF minlength_cardnumber == maxlength_cardnumber %]
866 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
867 [% IF mandatorycardnumber %]
868 <span class="required">Required</span>
870 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
871 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
872 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
873 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
874 [% IF mandatorycardnumber %]
875 <span class="required">Required</span>
877 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
878 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
879 [% ELSIF maxlength_cardnumber %]
880 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
881 [% IF mandatorycardnumber %]
882 <span class="required">Required</span>
884 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
885 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
887 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
888 [% IF mandatorycardnumber %]
889 <span class="required">Required</span>
891 <div class="hint">There is no minimum or maximum character length.
893 [% IF autoMemberNum %]
894 [% IF mandatorycardnumber %]
895 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
897 <br/>Leave blank for auto calc during registration
900 </div><!--/div.hint -->
902 [% END # /UNLESS nocardnumber %]
904 [% UNLESS nobranchcode %]
906 <label for="libraries" class="required">Library:</label>
907 <select name="branchcode" id="libraries">
908 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
910 <span class="required">Required</span>
915 <label for="categorycode_entry" class="required">Category: </label>
916 <select id="categorycode_entry" name="categorycode">
917 [% FOREACH typeloo IN typeloop %]
918 [% FOREACH categoryloo IN typeloo.categoryloop %]
919 [% IF ( loop.first ) %]
920 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
921 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
922 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
923 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
924 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
925 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
927 [% IF ( categoryloo.categorycodeselected ) %]
928 <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>
930 <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>
932 [% IF ( loop.last ) %]
935 [% END # /FOREACH categoryloo %]
936 [% END # /FOREACH typeloo %]
938 <span class="required">Required</span>
943 [% IF ( mandatorysort1 ) %]
944 <label for="sort1" class="required">
950 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
951 [% IF ( mandatorysort1 ) %]
952 <span class="required">Required</span>
955 [% END # /UNLESS nosort1 %]
959 [% IF ( mandatorysort2 ) %]
960 <label for="sort2" class="required">
966 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
967 [% IF ( mandatorysort2 ) %]
968 <span class="required">Required</span>
971 [% END # /UNLESS nosort2 %]
973 [% UNLESS noautorenew_checkouts %]
975 <label for="yes-autorenew_checkouts">
976 Allow auto-renewal of items:
978 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
979 <label for="yes-autorenew_checkouts">
981 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
983 <label for="no-autorenew_checkouts">
985 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
988 <label for="yes-autorenew_checkouts">
990 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
992 <label for="no-autorenew_checkouts">
994 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1000 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1002 <label for="checkprevcheckout">Check for previous checkouts: </label>
1003 <select name="checkprevcheckout" id="checkprevcheckout">
1004 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1005 <option value="yes" selected="selected">Yes if settings allow it</option>
1006 <option value="no">No if settings allow it</option>
1007 <option value="inherit">Inherit from settings</option>
1008 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1009 <option value="yes">Yes if settings allow it</option>
1010 <option value="no" selected="selected">No if settings allow it</option>
1011 <option value="inherit">Inherit from settings</option>
1013 <option value="yes">Yes if settings allow it</option>
1014 <option value="no">No if settings allow it</option>
1015 <option value="inherit" selected="selected">Inherit from settings</option>
1019 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1021 [% IF Koha.Preference('TranslateNotices') %]
1023 <label for="lang">Preferred language for notices: </label>
1024 <select id="lang" name="lang">
1025 <option value="default">Default</option>
1026 [% FOR language IN languages %]
1027 [% FOR sublanguage IN language.sublanguages_loop %]
1028 [% IF language.plural %]
1029 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1030 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1032 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1035 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1036 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1038 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1040 [% END # /IF language.plural %]
1041 [% END # /FOR sublanguage %]
1042 [% END #/FOR language %]
1043 </select> <!-- /#lang -->
1045 [% END #/IF Koha.Preference('TranslateNotices') %]
1047 </fieldset> <!-- /#memberentry_library_management -->
1049 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1050 <fieldset class="rows" id="memberentry_subscription">
1051 <legend id="library_setup_lgd">Library setup</legend><ol>
1052 [% UNLESS nodateenrolled %]
1054 [% IF ( mandatorydateenrolled ) %]
1055 <label for="from" class="required">
1061 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1062 [% IF ( mandatorydateenrolled ) %]
1063 <span class="required">Required</span>
1065 [% IF ( ERROR_dateenrolled ) %]
1066 <span class="required">(Error)</span>
1068 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1070 [% END # /UNLESS nodateenrolled %]
1072 [% UNLESS nodateexpiry %]
1075 <li style="display:none">
1077 [% IF ( mandatorydateexpiry ) %]
1078 <label for="to" class="required">
1082 Expiry date (leave blank for auto calc):
1084 [% UNLESS ( opadd ) %]
1085 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1087 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1089 [% IF ( mandatorydateexpiry ) %]
1090 <span class="required">Required</span>
1092 [% IF ( ERROR_dateexpiry ) %]
1093 <span class="required">(Error)</span>
1095 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1098 [% UNLESS noopacnote %]
1100 [% IF ( mandatoryopacnote ) %]
1101 <label for="opacnote" class="required">
1103 <label for="opacnote">
1107 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1108 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1109 [% IF ( mandatoryopacnote ) %]
1110 <span class="required">Required</span>
1113 [% END # /UNLESS noopacnote %]
1115 [% UNLESS noborrowernotes %]
1117 [% IF ( mandatoryborrowernotes ) %]
1118 <label for="borrowernotes" class="required">
1120 <label for="borrowernotes">
1124 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | html UNLESS opduplicate %]</textarea>
1125 <div class="hint">This message displays when checking out to this patron</div>
1126 [% IF ( mandatoryborrowernotes ) %]
1127 <span class="required">Required</span>
1130 [% END # /UNLESS noborrowernotes %]
1132 </fieldset> <!-- /#memberentry_subscription -->
1133 [% END # hide fieldset %]
1135 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1136 <fieldset class="rows" id="memberentry_userid">
1137 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1139 [% UNLESS nouserid %]
1141 [% IF ( mandatoryuserid ) %]
1142 <label for="userid" class="required">
1144 <label for="userid">
1149 [% IF ( NoUpdateLogin ) %]
1150 [% IF ( opduplicate ) %]
1151 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1153 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1156 [% IF ( opduplicate ) %]
1157 <input type="text" id="userid" name="userid" size="20" value="" />
1159 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1161 [% END # /IF ( NoUpdateLogin ) %]
1163 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1164 <input type="text" disabled="disabled" style="display:none" />
1166 [% IF ( mandatoryuserid ) %]
1167 <span class="required">Required</span>
1170 [% END # /UNLESS nouserid %]
1172 [% UNLESS nopassword %]
1174 [% IF ( mandatorypassword ) %]
1175 <label for="password" class="required">
1177 <label for="password">
1182 [% IF ( NoUpdateLogin ) %]
1183 [% IF ( opduplicate ) %]
1184 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1186 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1189 [% IF ( opduplicate ) %]
1190 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1192 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1194 [% END # /IF ( NoUpdateLogin ) %]
1195 [% ELSE # IF ( opadd ) %]
1197 [% IF ( borrower_data.password ) %]
1198 [% IF ( NoUpdateLogin ) %]
1199 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1201 [% IF ( opduplicate ) %]
1202 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1204 <input type="password" id="password" name="password" size="20" value="****" />
1208 [% IF ( NoUpdateLogin ) %]
1209 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1211 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1213 [% END # /IF ( password ) %]
1214 [% END # /IF ( opadd ) %]
1215 [% IF ( mandatorypassword ) %]
1216 <span class="required">Required</span>
1218 [% IF ( ERROR_password_too_short ) %]
1219 <span class="required">Password is too short</span>
1221 [% IF ( ERROR_password_too_weak ) %]
1222 <span class="required">Password is too weak</span>
1224 [% IF ( ERROR_password_has_whitespaces ) %]
1225 <span class="required">Password has leading or trailing whitespaces</span>
1227 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1231 [% IF ( mandatorypassword ) %]
1232 <label for="password2" class="required">
1234 <label for="password2">
1239 [% IF ( NoUpdateLogin ) %]
1240 [% IF ( opduplicate ) %]
1241 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1243 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1246 [% IF ( opduplicate ) %]
1247 <input type="password" id="password2" name="password2" size="20" />
1249 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1252 [% ELSE # IF ( opadd ) %]
1253 [% IF ( borrower_data.password ) %]
1254 [% IF ( NoUpdateLogin ) %]
1255 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1257 [% IF ( opduplicate ) %]
1258 <input type="password" id="password2" name="password2" size="20" />
1260 <input type="password" id="password2" name="password2" size="20" value="****" />
1264 [% IF ( NoUpdateLogin ) %]
1265 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1267 <input type="password" id="password2" name="password2" size="20" value="" />
1270 [% END # /IF ( opadd ) %]
1272 [% IF ( mandatorypassword ) %]
1273 <span class="required">Required</span>
1275 [% IF ( ERROR_password_mismatch ) %]
1276 <span class="required">Passwords do not match</span>
1279 [% END # /UNLESS nopassword %]
1280 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1282 <label for="password_expiration_date">Password expiration date:</label>
1283 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1287 </fieldset> <!-- /#memberentry_userid -->
1288 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1290 <!--this zones are not necessary in modif mode -->
1291 [% UNLESS ( opadd || opduplicate ) %]
1292 <fieldset class="rows" id="memberentry_account_flags">
1293 <legend id="account_flags_lgd">Patron account flags</legend>
1295 [% FOREACH flagloo IN flagloop %]
1297 <label class="radio" for="yes[% flagloo.name | html %]">
1298 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1299 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1301 [% IF CAN_user_circulate_manage_restrictions %]
1302 <label for="yes[% flagloo.name | html %]">
1303 [% IF ( flagloo.yes ) %]
1304 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1306 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1310 <label for="no[% flagloo.name | html %]">
1311 [% IF ( flagloo.no ) %]
1312 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1314 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1319 [% IF flagloo.yes %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1320 [% END # /IF CAN_user_circulate_manage_restrictions %]
1322 [% END # /FOREACH flagloo %]
1324 </fieldset> <!-- /#memberentry_account_flags -->
1326 <fieldset class="rows" id="memberentry_restrictions">
1327 <legend id="restrictions_lgd">Patron restrictions</legend>
1328 [% IF ( debarments ) %]
1335 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1336 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1342 [% FOREACH d IN debarments %]
1344 <td>[% d.type | html %]</td>
1346 [% IF d.comment.search('OVERDUES_PROCESS') %]
1347 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1349 [% d.comment | $raw %]
1353 [% IF d.expiration %]
1354 [% d.expiration | $KohaDates %]
1359 <td>[% d.created | $KohaDates %]</td>
1360 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1362 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1366 [% END # /FOREACH d %]
1370 <p>Patron is currently unrestricted.</p>
1371 [% END # /IF ( debarments ) %]
1373 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1374 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1375 <fieldset id="manual_restriction_form">
1376 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1377 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1380 <label for="debarred_comment">Comment: </label>
1381 <input type="text" id="debarred_comment" name="debarred_comment" />
1384 <label for="debarred_expiration">Expiration: </label>
1385 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1386 <a href="#" id="clear_debarred_expiration">Clear date</a>
1390 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1392 </fieldset> <!-- /#manual_restriction_form -->
1393 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1394 </fieldset> <!-- /#memberentry_restrictions -->
1395 [% END # /UNLESS ( opadd || opduplicate ) %]
1396 [% END # /IF ( step_3 ) %]
1399 [% IF Koha.Preference('HouseboundModule') %]
1400 <fieldset class="rows" id="memberentry_housebound_roles">
1401 <legend id="housebound_roles">Housebound roles</legend>
1404 <label class="radio" for="housebound_chooser">
1407 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1408 <label for="yes_housebound_chooser">Yes </label>
1409 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1410 <label for="no_housebound_chooser">No </label>
1411 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1413 <label for="yes_housebound_chooser">Yes </label>
1414 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1415 <label for="no_housebound_chooser">No </label>
1416 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1420 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1421 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1422 <label for="yes_housebound_deliverer">Yes </label>
1423 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1424 <label for="no_housebound_deliverer">No </label>
1425 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1427 <label for="yes_housebound_deliverer">Yes </label>
1428 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1429 <label for="no_housebound_deliverer">No </label>
1430 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1433 </ol> <!-- /ol.radio -->
1434 </fieldset> <!-- /#memberentry_housebound_roles -->
1435 [% END # hide fieldset %]
1436 [% END # IF step_7 %]
1439 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1440 [% UNLESS ( no_patron_attribute_types ) %]
1441 <fieldset class="rows" id="memberentry_patron_attributes">
1442 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1443 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1444 [% FOREACH pa_loo IN patron_attributes %]
1445 <ol class="attributes_table">
1446 [% IF pa_loo.class %]
1447 <fieldset id="aai_[% pa_loo.class | html %]">
1448 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1450 [% FOREACH patron_attribute IN pa_loo.items %]
1451 <li data-category_code="[% patron_attribute.category_code | html %]">
1452 [% IF patron_attribute.mandatory %]
1453 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1455 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1457 [% IF ( patron_attribute.use_dropdown ) %]
1458 [% IF patron_attribute.mandatory %]
1459 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1461 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1463 <option value=""></option>
1464 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1465 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1466 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1467 [% auth_val_loo.lib | html %]
1470 <option value="[% auth_val_loo.authorised_value | html %]" >
1471 [% auth_val_loo.lib | html %]
1477 [% IF patron_attribute.mandatory %]
1478 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1480 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1482 [% END # /IF ( patron_attribute.use_dropdown ) %]
1483 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1484 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1485 [% IF ( patron_attribute.repeatable ) %]
1486 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1488 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1490 [% END # /FOREACH patron_attribute %]
1491 [% IF pa_loo.class %]</fieldset>[% END %]
1493 [% END # /FOREACH pa_loo %]
1494 </fieldset> <!-- /#memberentry_patron_attributes -->
1495 [% END # UNLESS ( no_patron_attribute_types ) %]
1496 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1497 [% END # IF ( step_4 ) %]
1500 [% IF ( EnhancedMessagingPreferences ) %]
1501 <fieldset class="rows" id="memberentry_messaging_prefs">
1502 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1503 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1504 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1506 <input type="hidden" name="setting_messaging_prefs" value="1" />
1507 [% INCLUDE 'messaging-preference-form.inc' %]
1508 [% IF ( SMSSendDriver ) %]
1510 <label for="SMSnumber">SMS number:</label>
1511 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1512 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1514 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1516 <label for="sms_provider_id">SMS provider:</label>
1517 <select id="sms_provider_id" name="sms_provider_id">
1518 <option value="">Unknown</option>
1519 [% FOREACH s IN sms_providers %]
1520 [% IF s.id == borrower_data.sms_provider_id %]
1521 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1523 <option value="[% s.id | html %]">[% s.name | html %]</option>
1528 [% END # /UNLESS nosms_provider_id %]
1529 [% END # IF ( SMSSendDriver ) %]
1531 [% END # IF ( EnhancedMessagingPreferences ) %]
1532 [% END # /IF step_5 %]
1533 </form> <!-- /#entryform -->
1535 [% IF quickadd && opadd && !check_member %]
1536 <form id="quick_add_form" class="toggler">
1537 <fieldset class="rows quick_add"><legend>Quick add</legend>
1538 <ol id="quick_add_list">
1544 [% END # /UNLESS ( no_add ) %]
1546 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1548 [% UNLESS ( opadd ) %]
1549 <div class="col-sm-2 col-sm-pull-10">
1551 [% INCLUDE 'circ-menu.inc' %]
1553 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1555 </div> <!-- /.row -->
1557 [% MACRO jsinclude BLOCK %]
1558 [% Asset.js("lib/hc-sticky.js") | $raw %]
1559 [% INCLUDE 'calendar.inc' %]
1560 [% INCLUDE 'str/members-menu.inc' %]
1561 [% Asset.js("js/members-menu.js") | $raw %]
1563 function update_cardnumber_warning(size){
1564 var max_len = [% maxlength_cardnumber | html %];
1565 if ( size >= max_len ) {
1566 $("#cn_max").show();
1568 $("#cn_max").hide();
1572 function showHideFields(){
1573 [% UNLESS step == 1 %]
1574 [% IF fieldstohide.match('identity') %]
1575 $("#memberentry_identity").find('legend').nextAll().toggle();
1577 [% IF show_guarantor || guarantor %]
1578 [% IF fieldstohide.match('guarantor') %]
1579 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1580 $("#guarantor_template").toggle();
1583 [% IF fieldstohide.match('primary_address') %]
1584 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1586 [% IF fieldstohide.match('primary_contact') %]
1587 $("#memberentry_contact").find('legend').nextAll().toggle();
1590 [% UNLESS step == 6 %]
1591 [% IF fieldstohide.match('alt_address') %]
1592 $("#memberentry_address").find('legend').nextAll().toggle();
1595 [% UNLESS step == 2 %]
1596 [% IF fieldstohide.match('alt_contact') %]
1597 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1600 [% UNLESS step == 3 %]
1601 [% IF fieldstohide.match('lib_mgmt') %]
1602 $("#memberentry_library_management").find('legend').nextAll().toggle();
1604 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1605 [% IF fieldstohide.match('lib_setup') %]
1606 $("#memberentry_subscription").find('legend').nextAll().toggle();
1609 [% UNLESS nouserid && nopassword %]
1610 [% IF fieldstohide.match('login') %]
1611 $("#memberentry_userid").find('legend').nextAll().toggle();
1614 [% UNLESS ( opadd || opduplicate ) %]
1615 [% IF fieldstohide.match('flags') %]
1616 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1619 [% IF fieldstohide.match('debarments') %]
1620 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1623 [% UNLESS step == 7 %]
1624 [% IF Koha.Preference('HouseboundModule') %]
1625 [% IF fieldstohide.match('housebound') %]
1626 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1630 [% UNLESS step == 4 %]
1631 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1632 [% IF fieldstohide.match('additional') %]
1633 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1637 [% UNLESS step == 5 %]
1638 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1639 [% IF fieldstohide.match('messaging') %]
1640 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1641 $("#messaging_prefs_loading").toggle();
1647 $(document).ready(function() {
1649 $("#toggle_hidden_fields").change(function(){
1653 $("legend").click(function(){
1654 $(this).nextAll().toggle();
1655 $("#messaging_prefs_loading").hide();
1656 $("#guarantor_template").hide();
1659 $("#saverecord").css({ 'margin-left': 0 });
1661 Sticky = $("#toolbar");
1664 stickyClass: "floating"
1667 [% IF borrower_data.categorycode %]
1668 update_category_code( "[% borrower_data.categorycode | html %]" );
1670 if ( $("#categorycode_entry").length > 0 ){
1671 var category_code = $("#categorycode_entry").find("option:selected").val();
1672 update_category_code( category_code );
1676 [% IF new_guarantors %]
1677 [% FOREACH g IN new_guarantors %]
1678 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1682 $("#cn_max").hide();
1684 $("#cardnumber").on("keydown", function(e){
1685 content = $(this).val();
1687 $("#cardnumber").on("keyup", function(e){
1688 // .val() will return the value of the input after the key has been released
1689 var l = $(this).val().length;
1690 if ( l == content.length + 1 ) { l--; }
1691 update_cardnumber_warning(l);
1693 $("#cardnumber").bind("paste", function(e){
1694 var pastedData = e.originalEvent.clipboardData.getData('text');
1695 update_cardnumber_warning(pastedData.length - 1);
1697 var toggle_quick_add = $(".toggle_quick_add");
1698 $(toggle_quick_add).click(function(e){
1699 toggle_quick_add.toggle();
1702 var toggle_from = '';
1703 if( $("#entryform:visible").length ) {
1704 toggle_to = "#quick_add_form label";
1705 toggle_from = "#entryform label";
1706 $("#memberentry_guarantor").appendTo("#quick_add_form");
1708 toggle_to="#entryform label";
1709 toggle_from = "#quick_add_form label";
1710 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1712 $(toggle_from).each(function() {
1713 var input_label = $(this).attr('for');
1714 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1715 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1718 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1721 $(".toggler").toggle();
1724 $("#save_quick_add").click(function(){
1725 $("#quick_add_form").validate();
1726 if( $("#quick_add_form").valid()){
1727 $('.toggle_quick_add').click();
1728 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1729 $('#saverecord').click();
1731 else {return false;}
1734 $("#saverecord").click(function(){
1735 if( check_form_borrowers() ){
1736 $("#entryform").submit();
1740 $('#duplicate').on('click', function() {
1741 $("input[name='op']").val('modify');
1742 $("input[name='borrowernumber']").val('[% check_member | html %]');
1743 $("input[name='check_member']").val('');
1744 $('#entryform').submit();
1747 $('#not-duplicate').on('click', function() {
1748 $("input[name='nodouble']").val('1');
1749 $('#entryform').submit();
1752 $(".popup_patronview").on("click", function(e){
1754 var url = $(this).attr("href");
1755 openWindow( url, "patronview" );
1758 $("#dateofbirth").on("change", function(){
1762 $("#debarred_comment, #debarred_expiration").on("change", function(){
1763 $("#add_debarment").val(1);
1766 $("#clear_debarred_expiration").on("click", function(e){
1768 $('#debarred_expiration').val("");
1771 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1773 clear_entry( this );
1776 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1778 clone_entry( this );
1781 $("#categorycode_entry").on("change", function(){
1782 update_category_code(this);
1786 [% IF quickadd && opadd && !check_member %]
1787 $(document).ready(function () {
1789 $("#entryform,#saverecord").hide();
1790 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1791 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1792 $("#entryform label").each(function () {
1793 var input_label = $(this).attr('for');
1794 if ( input_label == 'sex-female' ) {
1797 else if ( input_label == 'btitle' ) {
1798 input_label='title';
1800 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1801 $(this).parent().clone().appendTo("#quick_add_list");
1802 [% UNLESS mandatorypassword %]
1803 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1807 if ( $("#memberentry_guarantor").length ) {
1808 $("#memberentry_guarantor").appendTo("#quick_add_form");
1810 $("#quick_add_form").show();
1813 $("#guarantor_template").hide();
1816 [% Asset.js("js/members.js") | $raw %]
1817 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1818 [% 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 %]
1821 [% INCLUDE 'intranet-bottom.inc' %]