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 patron_category %]([% patron_category.description | 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>
68 [% IF patron_category %]
69 ([% patron_category.description | 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 patron_category %]([% patron_category.description | 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="updtype" value="[% updtype | html %]" />
246 <input type="hidden" name="destination" value="[% destination | html %]" />
247 <input type="hidden" name="check_member" value="[% check_member | html %]" />
248 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
249 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
250 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
252 <input type="hidden" name="step" value="[% step | html %]" />
255 <input type="hidden" name="op" value="insert" />
256 [% ELSIF ( opduplicate ) %]
257 <input type="hidden" name="op" value="insert" />
259 <input type="hidden" name="op" value="save" />
260 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
261 [%# Only put the card number if we arent showing it in the form later %]
262 [% IF borrower_data.cardnumber %]
263 <input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" />
269 [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex %]
270 <fieldset class="rows" id="memberentry_identity">
271 <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization</span> [% ELSE %]<span>Patron</span> [% END %]<span>identity</span></legend>
273 [% UNLESS ( patron_category.category_type == 'I' ) %]
275 [% IF Koha.Preference('BorrowersTitles') %]
277 [% IF ( mandatorytitle ) %]
278 <label for="btitle" class="required">
283 <select id="btitle" name="title">
284 <option value=""></option>
285 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
287 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
289 <option value="[% t | html %]">[% t | html %]</option>
293 [% IF ( mandatorytitle ) %]
294 <span class="required">Required</span>
297 [% END # /IF Koha.Preference('BorrowersTitles') %]
298 [% END # /UNLESS notitle %]
299 [% END # /UNLESS ( I ) %]
301 [% UNLESS nosurname %]
303 [% IF ( patron_category.category_type == 'I' ) %]
304 <label for="surname" class="required">
308 [% IF ( mandatorysurname ) %]
309 <label for="surname" class="required">
311 <label for="surname">
316 [% IF ( uppercasesurnames ) %]
317 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" />
319 <input type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" />
321 [% IF ( mandatorysurname ) %]
322 <span class="required">Required</span>
325 [% END # /UNLESS nosurname %]
327 [% UNLESS ( patron_category.category_type == 'I' ) %]
328 [% UNLESS nofirstname %]
330 [% IF ( mandatoryfirstname ) %]
331 <label for="firstname" class="required">
333 <label for="firstname">
337 <input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS opduplicate %]" />
338 [% IF ( mandatoryfirstname ) %]
339 <span class="required">Required</span>
342 [% END #/UNLESS nofirstname %]
343 [% UNLESS nomiddle_name %]
345 [% IF ( mandatorymiddle_name ) %]
346 <label for="middle_name" class="required">
348 <label for="middle_name">
352 <input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS opduplicate %]" />
353 [% IF ( mandatorymiddle_name ) %]
354 <span class="required">Required</span>
357 [% END #/UNLESS nomiddle_name %]
358 [% UNLESS nodateofbirth %]
360 [% IF ( mandatorydateofbirth ) %]
361 <label for="dateofbirth" class="required">
363 <label for="dateofbirth">
367 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% borrower_data.dateofbirth | html UNLESS opduplicate %]" class="flatpickr" data-flatpickr-pastinclusive="true" />
368 [% IF ( mandatorydateofbirth ) %]
369 <span class="required">Required</span>
371 [% IF ( ERROR_dateofbirth ) %]
372 <span class="required">(Error)</span>
374 <div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div>
376 [% END # /UNLESS nodateofbirth %]
377 [% UNLESS noinitials %]
379 [% IF ( mandatoryinitials ) %]
380 <label for="initials" class="required">
382 <label for="initials">
386 <input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS opduplicate %]" />
387 [% IF ( mandatoryinitials ) %]
388 <span class="required">Required</span>
391 [% END # /UNLESS noinitials %]
392 [% END #/UNLESS ( I ) %]
393 [% UNLESS noothernames %]
395 [% IF ( mandatoryothernames ) %]
396 <label for="othernames" class="required">
398 <label for="othernames">
402 <input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS opduplicate %]" />
403 [% IF ( mandatoryothernames ) %]
404 <span class="required">Required</span>
406 [% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %]
408 [% END #/UNLESS noothernames %]
410 [% UNLESS ( patron_category.category_type == 'I' ) %]
413 [% UNLESS ( opduplicate ) %]
415 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
417 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
420 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
422 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
425 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
427 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
430 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
432 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
435 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
436 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
437 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
438 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
439 [% END # /UNLESS ( opduplicate )%]
441 [% END # /UNLESS nosex %]
442 [% END # /UNLESS ( I ) %]
444 </fieldset> <!-- /#memberentry_identity -->
445 [% END # hide fieldset %]
447 [% IF show_guarantor || guarantor %]
448 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
449 <div id="memberentry_guarantor_anchor">
450 <fieldset id="memberentry_guarantor" class="rows">
451 <legend>Patron guarantor</legend>
453 <div id="guarantor_relationships">
454 [% FOREACH r IN relationships %]
457 [% IF patron_category.category_type == 'I' %]
458 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
459 <span class="label">Organization:</span>
460 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
463 <span class="label">Relationship:</span>
464 <span>[% r.relationship | html %]</span>
467 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
468 <span class="label">Guarantor:</span>
469 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
472 <span class="label">Relationship:</span>
473 <span>[% r.relationship | html %]</span>
477 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
478 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
483 [% END # END relationships foreach %]
484 [% IF guarantor && (!relationships) %]
485 <fieldset class="guarantor">
487 <li class="guarantor-details" data-borrowernumber="0">
488 <span class="label">Guarantor:</span>
489 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
490 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
493 [% IF possible_relationships %]
495 [% UNLESS empty_relationship_allowed %]
496 <label for="guarantor_relationship" class="required">Relationship: </label>
497 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
499 <label for="guarantor_relationship">Relationship: </label>
500 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
502 <option value="" selected>Empty option</option>
503 [% FOREACH pr IN possible_relationships.split('\|') %]
505 <option value="[% pr | html %]">[% pr | html %]</option>
509 [% UNLESS empty_relationship_allowed %]
510 <span class="required">Required</span>
514 <input type="hidden" name="new_guarantor_relationship" value="" />
518 <label for="guarantor_cancel"> </label>
519 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
524 </div> <!-- #/guarantor_relationships -->
526 <fieldset class="guarantor" id="guarantor_template">
528 <li class="guarantor-details" data-borrowernumber="0">
529 <span class="label">Guarantor:</span>
530 <a class="new_guarantor_link" href="#" target="blank">
531 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
532 (<span class="new_guarantor_id_text"></span>)
534 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
537 [% IF possible_relationships %]
539 [% UNLESS empty_relationship_allowed %]
540 <label for="guarantor_relationship" class="required">Relationship: </label>
541 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
543 <label for="guarantor_relationship">Relationship: </label>
544 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
546 <option value="" selected></option>
547 [% FOREACH pr IN possible_relationships.split('\|') %]
549 <option value="[% pr | html %]">[% pr | html %]</option>
553 [% UNLESS empty_relationship_allowed %]
554 <span class="required">Required</span>
558 <input type="hidden" name="new_guarantor_relationship" value="" />
562 <label for="guarantor_cancel"> </label>
563 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
569 <input type="hidden" id="guarantor_id" value="" />
570 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
571 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
574 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
577 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
579 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
580 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
581 [% IF borrower_data.privacy_guarantor_checkouts %]
582 <option value="0">No</option>
583 <option value="1" selected>Yes</option>
585 <option value="0" selected>No</option>
586 <option value="1">Yes</option>
589 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
592 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
594 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
595 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
596 [% IF borrower_data.privacy_guarantor_fines %]
597 <option value="0">No</option>
598 <option value="1" selected>Yes</option>
600 <option value="0" selected>No</option>
601 <option value="1">Yes</option>
604 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
608 </fieldset> <!-- /#memberentry_guarantor -->
609 </div> <!-- #/memberentry_guarantor_anchor -->
611 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
612 <fieldset class="rows" id="non_patron_guarantor">
613 <legend>Non-patron guarantor</legend>
615 [% UNLESS nocontactname %]
617 [% IF ( mandatorycontactname ) %]
618 <label for="contactname" class="required">
620 <label for="contactname">
624 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
625 [% IF ( mandatorycontactname ) %]
626 <span class="required">Required</span>
628 <div class="hint">Non-patron guarantor surname</div>
630 [% END # /UNLESS nocontactname %]
632 [% UNLESS nocontactfirstname %]
634 [% IF ( mandatorycontactfirstname ) %]
635 <label for="contactfirstname" class="required">
637 <label for="contactfirstname">
639 Guarantor first name:
641 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
642 [% IF ( mandatorycontactfirstname ) %]
643 <span class="required">Required</span>
645 <div class="hint">Non-patron guarantor first name</div>
647 [% END # /UNLESS noaltcontactfirstname %]
649 [% UNLESS norelationship %]
650 [% IF possible_relationships %]
652 <label for="relationship">Relationship: </label>
653 <select class="relationship" name="relationship">
654 <option value=""></option>
655 [% FOREACH pr IN possible_relationships.split('\|') %]
656 [% IF pr == borrower_data.relationship %]
657 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
659 <option value="[% pr | html %]">[% pr | html %]</option>
664 [% END #/IF possible_relationships %]
665 [% END # /UNLESS norelationship %]
667 </fieldset> <!-- /#non_patron_guarantor -->
668 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
669 [% END # /IF show_guarantor || guarantor %]
671 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
672 [% PROCESS 'main-address-style' %]
673 [% END # /UNLESS nostreet && nocity etc group%]
675 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
676 <fieldset class="rows" id="memberentry_contact">
677 <legend id="contact_lgd">Contact information</legend>
681 [% IF ( mandatoryphone ) %]
682 <label for="phone" class="required">
688 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
689 [% IF ( mandatoryphone ) %]
690 <span class="required">Required</span>
692 <div class="hint">Shows on transit slips</div>
694 [% END # /UNLESS nophone %]
696 [% UNLESS nophonepro %]
698 [% IF ( mandatoryphonepro ) %]
699 <label for="phonepro" class="required">
701 <label for="phonepro">
705 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
706 [% IF ( mandatoryphonepro ) %]
707 <span class="required">Required</span>
710 [% END # /UNLESS nophonepro %]
712 [% UNLESS nomobile %]
714 [% IF ( mandatorymobile ) %]
715 <label for="mobile" class="required">
721 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
722 [% IF ( mandatorymobile ) %]
723 <span class="required">Required</span>
726 [% END # /UNLESS nomobile %]
730 [% IF ( mandatoryemail ) %]
731 <label for="email" class="required">
737 [% IF ( NoUpdateEmail ) %]
738 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
740 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
742 [% IF ( mandatoryemail ) %]
743 <span class="required">Required</span>
745 <div class="hint">Shows on transit slips</div>
747 [% END #/UNLESS noemail %]
749 [% UNLESS noemailpro %]
751 [% IF ( mandatoryemailpro ) %]
752 <label for="emailpro" class="required">
754 <label for="emailpro">
758 [% IF ( NoUpdateEmail ) %]
759 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
761 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
763 [% IF ( mandatoryemailpro ) %]
764 <span class="required">Required</span>
767 [% END #/UNLESS noemailpro %]
771 [% IF ( mandatoryfax ) %]
772 <label for="fax" class="required">
778 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
779 [% IF ( mandatoryfax ) %]
780 <span class="required">Required</span>
783 [% END #/UNLESS nofax %]
785 [% UNLESS noprimary_contact_method %]
787 [% IF mandatoryprimary_contact_method %]
788 <label for="primary_contact_method" class="required">
790 <label for="primary_contact_method">
792 Main contact method: </label>
794 <select id="primary_contact_method" name="primary_contact_method">
795 <option value=""></option>
797 [% IF ( borrower_data.primary_contact_method == 'phone' ) %]
798 <option value="phone" selected="selected">Primary phone</option>
800 <option value="phone">Primary phone</option>
803 [% UNLESS nophonepro %]
804 [% IF ( borrower_data.primary_contact_method == 'phonepro' ) %]
805 <option value="phonepro" selected="selected">Secondary phone</option>
807 <option value="phonepro">Secondary phone</option>
810 [% UNLESS nomobile %]
811 [% IF ( borrower_data.primary_contact_method == 'mobile' ) %]
812 <option value="mobile" selected="selected">Other phone</option>
814 <option value="mobile">Other phone</option>
818 [% IF ( borrower_data.primary_contact_method == 'email' ) %]
819 <option value="email" selected="selected">Primary email</option>
821 <option value="email">Primary email</option>
824 [% UNLESS noemailpro %]
825 [% IF ( borrower_data.primary_contact_method == 'emailpro' ) %]
826 <option value="emailpro" selected="selected">Secondary email</option>
828 <option value="emailpro">Secondary email</option>
832 [% IF ( borrower_data.primary_contact_method == 'fax' ) %]
833 <option value="fax" selected="selected">Fax</option>
835 <option value="fax">Fax</option>
839 [% IF mandatoryprimary_contact_method %]
840 <span class="required">Required</span>
845 </fieldset> <!-- /#memberentry_contact -->
846 [% END # hide fieldset %]
848 <!-- ************************ STEP_1 *********************** -->
849 [% END # /IF ( step_1 ) %]
852 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
853 [% PROCESS 'alt-address-style' %]
854 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
855 [% END # /IF ( step_6 ) %]
858 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
859 [% PROCESS 'alt-contact-style' %]
860 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
861 [% END # /IF ( step_2 ) %]
864 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
865 <fieldset class="rows" id="memberentry_library_management">
866 <legend id="library_management_lgd">Library management</legend>
868 [% UNLESS nocardnumber %]
870 [% IF mandatorycardnumber %]
871 <label for="cardnumber" class="required">
873 <label for="cardnumber" class="validated">
878 <!-- NOTE: div.hint closing tag isn't on the same line -->
879 [% IF minlength_cardnumber == maxlength_cardnumber %]
880 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_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 must be exactly [% minlength_cardnumber | html %] characters.
886 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
887 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
888 [% IF mandatorycardnumber %]
889 <span class="required">Required</span>
891 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
892 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
893 [% ELSIF maxlength_cardnumber %]
894 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
895 [% IF mandatorycardnumber %]
896 <span class="required">Required</span>
898 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
899 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
901 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" />
902 [% IF mandatorycardnumber %]
903 <span class="required">Required</span>
905 <div class="hint">There is no minimum or maximum character length.
907 [% IF autoMemberNum %]
908 [% IF mandatorycardnumber %]
909 <br/><span class="error">AutoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
911 <br/>Leave blank for auto calc during registration
914 </div><!--/div.hint -->
916 [% END # /UNLESS nocardnumber %]
918 [% UNLESS nobranchcode %]
920 <label for="libraries" class="required">Library:</label>
921 <select name="branchcode" id="libraries">
922 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
924 <span class="required">Required</span>
929 <label for="categorycode_entry" class="required">Category: </label>
930 <select id="categorycode_entry" name="categorycode">
931 [% FOREACH category_type IN patron_categories.keys %]
932 [% SWITCH category_type %]
934 <optgroup label="Child">
936 <optgroup label="Adult">
938 <optgroup label="Staff">
940 <optgroup label="Organization">
942 <optgroup label="Professional">
944 <optgroup label="Statistical">
946 <optgroup label="Unknown">
948 [% FOREACH category IN patron_categories.$category_type %]
949 [% IF category.categorycode == patron_category.categorycode %]
950 <option value="[% category.categorycode | html %]" selected="selected" data-pwd-length="[% category.effective_min_password_length | html %]" data-pwd-strong="[% category.effective_require_strong_password | html %]" data-typename="[% category_type | html %]">[% category.description | html %]</option>
952 <option value="[% category.categorycode | html %]" data-pwd-length="[% category.effective_min_password_length | html %]" data-pwd-strong="[% category.effective_require_strong_password | html %]" data-typename="[% category_type | html %]">[% category.description | html %]</option>
958 <span class="required">Required</span>
963 [% IF ( mandatorysort1 ) %]
964 <label for="sort1" class="required">
970 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %]
971 [% IF ( mandatorysort1 ) %]
972 <span class="required">Required</span>
975 [% END # /UNLESS nosort1 %]
979 [% IF ( mandatorysort2 ) %]
980 <label for="sort2" class="required">
986 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %]
987 [% IF ( mandatorysort2 ) %]
988 <span class="required">Required</span>
991 [% END # /UNLESS nosort2 %]
993 [% UNLESS noautorenew_checkouts %]
995 <label for="yes-autorenew_checkouts">
996 Allow auto-renewal of items:
998 [% IF ( borrower_data.autorenew_checkouts || opadd ) %]
999 <label for="yes-autorenew_checkouts">
1001 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
1003 <label for="no-autorenew_checkouts">
1005 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
1008 <label for="yes-autorenew_checkouts">
1010 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
1012 <label for="no-autorenew_checkouts">
1014 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
1020 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
1022 <label for="checkprevcheckout">Check for previous checkouts: </label>
1023 <select name="checkprevcheckout" id="checkprevcheckout">
1024 [% IF ( borrower_data.checkprevcheckout == 'yes' ) %]
1025 <option value="yes" selected="selected">Yes if settings allow it</option>
1026 <option value="no">No if settings allow it</option>
1027 <option value="inherit">Inherit from settings</option>
1028 [% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %]
1029 <option value="yes">Yes if settings allow it</option>
1030 <option value="no" selected="selected">No if settings allow it</option>
1031 <option value="inherit">Inherit from settings</option>
1033 <option value="yes">Yes if settings allow it</option>
1034 <option value="no">No if settings allow it</option>
1035 <option value="inherit" selected="selected">Inherit from settings</option>
1039 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1041 [% IF Koha.Preference('TranslateNotices') %]
1043 <label for="lang">Preferred language for notices: </label>
1044 <select id="lang" name="lang">
1045 <option value="default">Default</option>
1046 [% FOR language IN languages %]
1047 [% FOR sublanguage IN language.sublanguages_loop %]
1048 [% IF language.plural %]
1049 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1050 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1052 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1055 [% IF sublanguage.rfc4646_subtag == borrower_data.lang %]
1056 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1058 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1060 [% END # /IF language.plural %]
1061 [% END # /FOR sublanguage %]
1062 [% END #/FOR language %]
1063 </select> <!-- /#lang -->
1065 [% END #/IF Koha.Preference('TranslateNotices') %]
1067 </fieldset> <!-- /#memberentry_library_management -->
1069 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1070 <fieldset class="rows" id="memberentry_subscription">
1071 <legend id="library_setup_lgd">Library setup</legend><ol>
1072 [% UNLESS nodateenrolled %]
1074 [% IF ( mandatorydateenrolled ) %]
1075 <label for="from" class="required">
1081 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" />
1082 [% IF ( mandatorydateenrolled ) %]
1083 <span class="required">Required</span>
1085 [% IF ( ERROR_dateenrolled ) %]
1086 <span class="required">(Error)</span>
1088 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1090 [% END # /UNLESS nodateenrolled %]
1092 [% UNLESS nodateexpiry %]
1095 <li style="display:none">
1097 [% IF ( mandatorydateexpiry ) %]
1098 <label for="to" class="required">
1102 Expiry date (leave blank for auto calc):
1104 [% UNLESS ( opadd ) %]
1105 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS opduplicate %]" class="flatpickr" />
1107 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" />
1109 [% IF ( mandatorydateexpiry ) %]
1110 <span class="required">Required</span>
1112 [% IF ( ERROR_dateexpiry ) %]
1113 <span class="required">(Error)</span>
1115 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1118 [% UNLESS noopacnote %]
1120 [% IF ( mandatoryopacnote ) %]
1121 <label for="opacnote" class="required">
1123 <label for="opacnote">
1127 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS opduplicate %]</textarea>
1128 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1129 [% IF ( mandatoryopacnote ) %]
1130 <span class="required">Required</span>
1133 [% END # /UNLESS noopacnote %]
1135 [% UNLESS noborrowernotes %]
1137 [% IF ( mandatoryborrowernotes ) %]
1138 <label for="borrowernotes" class="required">
1140 <label for="borrowernotes">
1144 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | html UNLESS opduplicate %]</textarea>
1145 <div class="hint">This message displays when checking out to this patron</div>
1146 [% IF ( mandatoryborrowernotes ) %]
1147 <span class="required">Required</span>
1150 [% END # /UNLESS noborrowernotes %]
1152 </fieldset> <!-- /#memberentry_subscription -->
1153 [% END # hide fieldset %]
1155 [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1156 <fieldset class="rows" id="memberentry_userid">
1157 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1159 [% UNLESS nouserid %]
1161 [% IF ( mandatoryuserid ) %]
1162 <label for="userid" class="required">
1164 <label for="userid">
1169 [% IF ( NoUpdateLogin ) %]
1170 [% IF ( opduplicate ) %]
1171 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1173 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" />
1176 [% IF ( opduplicate ) %]
1177 <input type="text" id="userid" name="userid" size="20" value="" />
1179 <input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" />
1181 [% END # /IF ( NoUpdateLogin ) %]
1183 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1184 <input type="text" disabled="disabled" style="display:none" />
1186 [% IF ( mandatoryuserid ) %]
1187 <span class="required">Required</span>
1190 [% END # /UNLESS nouserid %]
1192 [% UNLESS nopassword %]
1194 [% IF ( mandatorypassword ) %]
1195 <label for="password" class="required">
1197 <label for="password">
1202 [% IF ( NoUpdateLogin ) %]
1203 [% IF ( opduplicate ) %]
1204 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1206 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1209 [% IF ( opduplicate ) %]
1210 <input type="password" id="password" name="password" size="20" autocomplete="new-password" />
1212 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" />
1214 [% END # /IF ( NoUpdateLogin ) %]
1215 [% ELSE # IF ( opadd ) %]
1217 [% IF ( borrower_data.password ) %]
1218 [% IF ( NoUpdateLogin ) %]
1219 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1221 [% IF ( opduplicate ) %]
1222 <input type="password" id="password" name="password" autocomplete="new-password" size="20" />
1224 <input type="password" id="password" name="password" size="20" value="****" />
1228 [% IF ( NoUpdateLogin ) %]
1229 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1231 <input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" />
1233 [% END # /IF ( password ) %]
1234 [% END # /IF ( opadd ) %]
1235 [% IF ( mandatorypassword ) %]
1236 <span class="required">Required</span>
1238 [% IF ( ERROR_password_too_short ) %]
1239 <span class="required">Password is too short</span>
1241 [% IF ( ERROR_password_too_weak ) %]
1242 <span class="required">Password is too weak</span>
1244 [% IF ( ERROR_password_has_whitespaces ) %]
1245 <span class="required">Password has leading or trailing whitespaces</span>
1247 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1251 [% IF ( mandatorypassword ) %]
1252 <label for="password2" class="required">
1254 <label for="password2">
1259 [% IF ( NoUpdateLogin ) %]
1260 [% IF ( opduplicate ) %]
1261 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1263 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" />
1266 [% IF ( opduplicate ) %]
1267 <input type="password" id="password2" name="password2" size="20" />
1269 <input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" />
1272 [% ELSE # IF ( opadd ) %]
1273 [% IF ( borrower_data.password ) %]
1274 [% IF ( NoUpdateLogin ) %]
1275 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1277 [% IF ( opduplicate ) %]
1278 <input type="password" id="password2" name="password2" size="20" />
1280 <input type="password" id="password2" name="password2" size="20" value="****" />
1284 [% IF ( NoUpdateLogin ) %]
1285 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1287 <input type="password" id="password2" name="password2" size="20" value="" />
1290 [% END # /IF ( opadd ) %]
1292 [% IF ( mandatorypassword ) %]
1293 <span class="required">Required</span>
1295 [% IF ( ERROR_password_mismatch ) %]
1296 <span class="required">Passwords do not match</span>
1299 [% END # /UNLESS nopassword %]
1300 [% UNLESS ( !CanUpdatePasswordExpiration ) %]
1302 <label for="password_expiration_date">Password expiration date:</label>
1303 <input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% password_expiration_date | html %]" class="flatpickr" />
1307 </fieldset> <!-- /#memberentry_userid -->
1308 [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1310 <!--this zones are not necessary in modif mode -->
1311 [% UNLESS ( opadd || opduplicate ) %]
1312 <fieldset class="rows" id="memberentry_account_flags">
1313 <legend id="account_flags_lgd">Patron account flags</legend>
1315 [% FOREACH flagloo IN flagloop %]
1317 <label class="radio" for="yes[% flagloo.name | html %]">
1318 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1319 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1321 [% IF CAN_user_circulate_manage_restrictions %]
1322 <label for="yes[% flagloo.name | html %]">
1323 [% IF ( flagloo.yes ) %]
1324 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1326 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1330 <label for="no[% flagloo.name | html %]">
1331 [% IF ( flagloo.no ) %]
1332 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1334 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1339 [% IF flagloo.yes %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1340 [% END # /IF CAN_user_circulate_manage_restrictions %]
1342 [% END # /FOREACH flagloo %]
1344 </fieldset> <!-- /#memberentry_account_flags -->
1346 <fieldset class="rows" id="memberentry_restrictions">
1347 <legend id="restrictions_lgd">Patron restrictions</legend>
1348 [% IF ( debarments ) %]
1355 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1356 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1362 [% FOREACH d IN debarments %]
1363 [% dtype = d.type %]
1365 <td>[% restriction_types.$dtype.display_text | html %]</td>
1367 [% IF d.comment.search('OVERDUES_PROCESS') %]
1368 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1370 [% d.comment | $raw %]
1374 [% IF d.expiration %]
1375 [% d.expiration | $KohaDates %]
1380 <td>[% d.created | $KohaDates %]</td>
1381 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1383 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1387 [% END # /FOREACH d %]
1391 <p>Patron is currently unrestricted.</p>
1392 [% END # /IF ( debarments ) %]
1394 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1395 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1396 <fieldset id="manual_restriction_form">
1397 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1398 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1401 <label for="debarred_comment">Comment: </label>
1402 <input type="text" id="debarred_comment" name="debarred_comment" />
1405 <label for="debarred_expiration">Expiration: </label>
1406 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" />
1407 <a href="#" id="clear_debarred_expiration">Clear date</a>
1411 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1413 </fieldset> <!-- /#manual_restriction_form -->
1414 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1415 </fieldset> <!-- /#memberentry_restrictions -->
1416 [% END # /UNLESS ( opadd || opduplicate ) %]
1417 [% END # /IF ( step_3 ) %]
1420 [% IF Koha.Preference('HouseboundModule') %]
1421 <fieldset class="rows" id="memberentry_housebound_roles">
1422 <legend id="housebound_roles">Housebound roles</legend>
1425 <label class="radio" for="housebound_chooser">
1428 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1429 <label for="yes_housebound_chooser">Yes </label>
1430 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1431 <label for="no_housebound_chooser">No </label>
1432 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1434 <label for="yes_housebound_chooser">Yes </label>
1435 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1436 <label for="no_housebound_chooser">No </label>
1437 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1441 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1442 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1443 <label for="yes_housebound_deliverer">Yes </label>
1444 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1445 <label for="no_housebound_deliverer">No </label>
1446 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1448 <label for="yes_housebound_deliverer">Yes </label>
1449 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1450 <label for="no_housebound_deliverer">No </label>
1451 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1454 </ol> <!-- /ol.radio -->
1455 </fieldset> <!-- /#memberentry_housebound_roles -->
1456 [% END # hide fieldset %]
1457 [% END # IF step_7 %]
1460 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1461 [% UNLESS ( no_patron_attribute_types ) %]
1462 <fieldset class="rows" id="memberentry_patron_attributes">
1463 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1464 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1465 [% FOREACH pa_loo IN patron_attributes %]
1466 <ol class="attributes_table">
1467 [% IF pa_loo.class %]
1468 <fieldset id="aai_[% pa_loo.class | html %]">
1469 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1471 [% FOREACH patron_attribute IN pa_loo.items %]
1472 <li data-category_code="[% patron_attribute.category_code | html %]">
1473 [% IF patron_attribute.mandatory %]
1474 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1476 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1478 [% IF ( patron_attribute.use_dropdown ) %]
1479 [% IF patron_attribute.mandatory %]
1480 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1482 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1484 <option value=""></option>
1485 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1486 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1487 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1488 [% auth_val_loo.lib | html %]
1491 <option value="[% auth_val_loo.authorised_value | html %]" >
1492 [% auth_val_loo.lib | html %]
1498 [% IF patron_attribute.mandatory %]
1499 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1501 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1503 [% END # /IF ( patron_attribute.use_dropdown ) %]
1504 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1505 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1506 [% IF ( patron_attribute.repeatable ) %]
1507 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1509 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1511 [% END # /FOREACH patron_attribute %]
1512 [% IF pa_loo.class %]</fieldset>[% END %]
1514 [% END # /FOREACH pa_loo %]
1515 </fieldset> <!-- /#memberentry_patron_attributes -->
1516 [% END # UNLESS ( no_patron_attribute_types ) %]
1517 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1518 [% END # IF ( step_4 ) %]
1521 [% IF ( EnhancedMessagingPreferences ) %]
1522 <fieldset class="rows" id="memberentry_messaging_prefs">
1523 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1524 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1525 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1527 <input type="hidden" name="setting_messaging_prefs" value="1" />
1528 [% INCLUDE 'messaging-preference-form.inc' %]
1529 [% IF ( SMSSendDriver ) %]
1531 <label for="SMSnumber">SMS number:</label>
1532 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1533 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span>
1535 [% IF SMSSendDriver == 'Email' && !nosms_provider_id %]
1537 <label for="sms_provider_id">SMS provider:</label>
1538 <select id="sms_provider_id" name="sms_provider_id">
1539 <option value="">Unknown</option>
1540 [% FOREACH s IN sms_providers %]
1541 [% IF s.id == borrower_data.sms_provider_id %]
1542 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1544 <option value="[% s.id | html %]">[% s.name | html %]</option>
1549 [% END # /UNLESS nosms_provider_id %]
1550 [% END # IF ( SMSSendDriver ) %]
1552 [% END # IF ( EnhancedMessagingPreferences ) %]
1553 [% END # /IF step_5 %]
1554 </form> <!-- /#entryform -->
1556 [% IF quickadd && opadd && !check_member %]
1557 <form id="quick_add_form" class="toggler">
1558 <fieldset class="rows quick_add"><legend>Quick add</legend>
1559 <ol id="quick_add_list">
1565 [% END # /UNLESS ( no_add ) %]
1567 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1569 [% UNLESS ( opadd ) %]
1570 <div class="col-sm-2 col-sm-pull-10">
1572 [% INCLUDE 'circ-menu.inc' %]
1574 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1576 </div> <!-- /.row -->
1578 [% MACRO jsinclude BLOCK %]
1579 [% Asset.js("lib/hc-sticky.js") | $raw %]
1580 [% INCLUDE 'calendar.inc' %]
1581 [% INCLUDE 'str/members-menu.inc' %]
1582 [% Asset.js("js/members-menu.js") | $raw %]
1584 function update_cardnumber_warning(size){
1585 var max_len = [% maxlength_cardnumber | html %];
1586 if ( size >= max_len ) {
1587 $("#cn_max").show();
1589 $("#cn_max").hide();
1593 function showHideFields(){
1594 [% UNLESS step == 1 %]
1595 [% IF fieldstohide.match('identity') %]
1596 $("#memberentry_identity").find('legend').nextAll().toggle();
1598 [% IF show_guarantor || guarantor %]
1599 [% IF fieldstohide.match('guarantor') %]
1600 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1601 $("#guarantor_template").toggle();
1604 [% IF fieldstohide.match('primary_address') %]
1605 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1607 [% IF fieldstohide.match('primary_contact') %]
1608 $("#memberentry_contact").find('legend').nextAll().toggle();
1611 [% UNLESS step == 6 %]
1612 [% IF fieldstohide.match('alt_address') %]
1613 $("#memberentry_address").find('legend').nextAll().toggle();
1616 [% UNLESS step == 2 %]
1617 [% IF fieldstohide.match('alt_contact') %]
1618 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1621 [% UNLESS step == 3 %]
1622 [% IF fieldstohide.match('lib_mgmt') %]
1623 $("#memberentry_library_management").find('legend').nextAll().toggle();
1625 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1626 [% IF fieldstohide.match('lib_setup') %]
1627 $("#memberentry_subscription").find('legend').nextAll().toggle();
1630 [% UNLESS nouserid && nopassword %]
1631 [% IF fieldstohide.match('login') %]
1632 $("#memberentry_userid").find('legend').nextAll().toggle();
1635 [% UNLESS ( opadd || opduplicate ) %]
1636 [% IF fieldstohide.match('flags') %]
1637 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1640 [% IF fieldstohide.match('debarments') %]
1641 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1644 [% UNLESS step == 7 %]
1645 [% IF Koha.Preference('HouseboundModule') %]
1646 [% IF fieldstohide.match('housebound') %]
1647 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1651 [% UNLESS step == 4 %]
1652 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1653 [% IF fieldstohide.match('additional') %]
1654 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1658 [% UNLESS step == 5 %]
1659 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1660 [% IF fieldstohide.match('messaging') %]
1661 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1662 $("#messaging_prefs_loading").toggle();
1668 $(document).ready(function() {
1670 $("#toggle_hidden_fields").change(function(){
1674 $("legend").click(function(){
1675 $(this).nextAll().toggle();
1676 $("#messaging_prefs_loading").hide();
1677 $("#guarantor_template").hide();
1680 $("#saverecord").css({ 'margin-left': 0 });
1682 Sticky = $("#toolbar");
1685 stickyClass: "floating"
1688 [% IF borrower_data.categorycode %]
1689 update_category_code( "[% borrower_data.categorycode | html %]" );
1691 if ( $("#categorycode_entry").length > 0 ){
1692 var category_code = $("#categorycode_entry").find("option:selected").val();
1693 update_category_code( category_code );
1697 [% IF new_guarantors %]
1698 [% FOREACH g IN new_guarantors %]
1699 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1703 $("#cn_max").hide();
1705 $("#cardnumber").on("keydown", function(e){
1706 content = $(this).val();
1708 $("#cardnumber").on("keyup", function(e){
1709 // .val() will return the value of the input after the key has been released
1710 var l = $(this).val().length;
1711 if ( l == content.length + 1 ) { l--; }
1712 update_cardnumber_warning(l);
1714 $("#cardnumber").bind("paste", function(e){
1715 var pastedData = e.originalEvent.clipboardData.getData('text');
1716 update_cardnumber_warning(pastedData.length - 1);
1718 var toggle_quick_add = $(".toggle_quick_add");
1719 $(toggle_quick_add).click(function(e){
1720 toggle_quick_add.toggle();
1723 var toggle_from = '';
1724 if( $("#entryform:visible").length ) {
1725 toggle_to = "#quick_add_form label";
1726 toggle_from = "#entryform label";
1727 $("#memberentry_guarantor").appendTo("#quick_add_form");
1729 toggle_to="#entryform label";
1730 toggle_from = "#quick_add_form label";
1731 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1733 $(toggle_from).each(function() {
1734 var input_label = $(this).attr('for');
1735 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1736 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1739 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1742 $(".toggler").toggle();
1745 $("#save_quick_add").click(function(){
1746 $("#quick_add_form").validate();
1747 if( $("#quick_add_form").valid()){
1748 $('.toggle_quick_add').click();
1749 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1750 $('#saverecord').click();
1752 else {return false;}
1755 $("#saverecord").click(function(){
1756 if( check_form_borrowers() ){
1757 $("#entryform").submit();
1761 $('#duplicate').on('click', function() {
1762 $("input[name='op']").val('modify');
1763 $("input[name='borrowernumber']").val('[% check_member | html %]');
1764 $("input[name='check_member']").val('');
1765 $('#entryform').submit();
1768 $('#not-duplicate').on('click', function() {
1769 $("input[name='nodouble']").val('1');
1770 $('#entryform').submit();
1773 $(".popup_patronview").on("click", function(e){
1775 var url = $(this).attr("href");
1776 openWindow( url, "patronview" );
1779 $("#dateofbirth").on("change", function(){
1783 $("#debarred_comment, #debarred_expiration").on("change", function(){
1784 $("#add_debarment").val(1);
1787 $("#clear_debarred_expiration").on("click", function(e){
1789 $('#debarred_expiration').val("");
1792 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1794 clear_entry( this );
1797 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1799 clone_entry( this );
1802 $("#categorycode_entry").on("change", function(){
1803 update_category_code(this);
1807 [% IF quickadd && opadd && !check_member %]
1808 $(document).ready(function () {
1810 $("#entryform,#saverecord").hide();
1811 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1812 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1813 $("#entryform label").each(function () {
1814 var input_label = $(this).attr('for');
1815 if ( input_label == 'sex-female' ) {
1818 else if ( input_label == 'btitle' ) {
1819 input_label='title';
1821 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1822 $(this).parent().clone().appendTo("#quick_add_list");
1823 [% UNLESS mandatorypassword %]
1824 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1828 if ( $("#memberentry_guarantor").length ) {
1829 $("#memberentry_guarantor").appendTo("#quick_add_form");
1831 $("#quick_add_form").show();
1834 $("#guarantor_template").hide();
1837 [% Asset.js("js/members.js") | $raw %]
1838 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1839 [% 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 %]
1842 [% INCLUDE 'intranet-bottom.inc' %]