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.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 (firstname || surname ) %]
54 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
55 [% INCLUDE 'patron-title.inc' %]
60 <a href="#" aria-current="page">
63 [% ELSIF ( opduplicate ) %]
69 ([% categoryname | html %])
75 </nav> <!-- /#breadcrumbs -->
77 <div class="main container-fluid">
80 [% FOR message IN 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 %]Unhandled error: [% message.error | html %]
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 ) %]
115 [% ELSIF ( opduplicate ) %]
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_extended_unique_id_failed ) %]
180 <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>
182 [% IF ERROR_bad_email %]
183 <li id="ERROR_bad_email">The primary email is invalid.</li>
185 [% IF ERROR_bad_email_secondary %]
186 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
188 [% IF ERROR_bad_email_alternative %]
189 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
195 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
196 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
198 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
199 [% FOREACH field IN fieldstohide.split(',') %]
201 [% CASE 'identity' %] Patron identity |
202 [% CASE 'guarantor' %] Guarantor information |
203 [% CASE 'primary_address' %] Main address |
204 [% CASE 'primary_contact' %] Contact information |
205 [% CASE 'alt_address' %] Alternate address |
206 [% CASE 'alt_contact' %] Alternate contact |
207 [% CASE 'lib_mgmt' %] Library management |
208 [% CASE 'lib_setup' %] Library setup |
209 [% CASE 'login' %] OPAC/Staff interface login |
210 [% CASE 'flags' %] Patron account flags |
211 [% CASE 'debarments' %] Patron restrictions |
212 [% CASE 'housebound' %] Housebound roles |
213 [% CASE 'additional' %] Additional attributes and identifiers |
214 [% CASE 'messaging' %] Patron messaging preferences |
220 [% UNLESS ( check_member ) %]
221 <div id="toolbar" class="btn-toolbar">
222 [% IF quickadd && opadd %]
223 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
225 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
227 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
229 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
231 <i class="fa fa-times"></i> Cancel
236 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
237 [% UNLESS ( check_member ) %]
238 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
240 <!-- field always hidden in different form (1,2,3) -->
241 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
242 <input type="hidden" name="category_type" value="[% category_type | html %]" />
243 <input type="hidden" name="updtype" value="[% updtype | html %]" />
244 <input type="hidden" name="destination" value="[% destination | html %]" />
245 <input type="hidden" name="check_member" value="[% check_member | html %]" />
246 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
247 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
248 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
250 <input type="hidden" name="step" value="[% step | html %]" />
253 <input type="hidden" name="op" value="insert" />
254 [% ELSIF ( opduplicate ) %]
255 <input type="hidden" name="op" value="insert" />
257 <input type="hidden" name="op" value="save" />
258 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
259 [%# Only put the cardnumber if we arent showing it in the form later %]
261 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
267 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
268 <fieldset class="rows" id="memberentry_identity">
269 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
273 [% IF Koha.Preference('BorrowersTitles') %]
275 [% IF ( mandatorytitle ) %]
276 <label for="btitle" class="required">
281 <select id="btitle" name="title">
282 <option value=""></option>
283 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
285 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
287 <option value="[% t | html %]">[% t | html %]</option>
291 [% IF ( mandatorytitle ) %]
292 <span class="required">Required</span>
295 [% END # /IF Koha.Preference('BorrowersTitles') %]
296 [% END # /UNLESS notitle %]
297 [% END # /UNLESS ( I ) %]
299 [% UNLESS nosurname %]
302 <label for="surname" class="required">
306 [% IF ( mandatorysurname ) %]
307 <label for="surname" class="required">
309 <label for="surname">
314 [% IF ( uppercasesurnames ) %]
315 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
317 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
319 [% IF ( mandatorysurname ) %]
320 <span class="required">Required</span>
323 [% END # /UNLESS nosurname %]
326 [% UNLESS nofirstname %]
328 [% IF ( mandatoryfirstname ) %]
329 <label for="firstname" class="required">
331 <label for="firstname">
335 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
336 [% IF ( mandatoryfirstname ) %]
337 <span class="required">Required</span>
340 [% END #/UNLESS nofirstname %]
341 [% UNLESS nodateofbirth %]
343 [% IF ( mandatorydateofbirth ) %]
344 <label for="dateofbirth" class="required">
346 <label for="dateofbirth">
350 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
351 [% IF ( mandatorydateofbirth ) %]
352 <span class="required">Required</span>
354 [% IF ( ERROR_dateofbirth ) %]
355 <span class="required">(Error)</span>
357 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
359 [% END # /UNLESS nodateofbirth %]
360 [% UNLESS noinitials %]
362 [% IF ( mandatoryinitials ) %]
363 <label for="initials" class="required">
365 <label for="initials">
369 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
370 [% IF ( mandatoryinitials ) %]
371 <span class="required">Required</span>
374 [% END # /UNLESS noinitials %]
375 [% END #/UNLESS ( I ) %]
376 [% UNLESS noothernames %]
378 [% IF ( mandatoryothernames ) %]
379 <label for="othernames" class="required">
381 <label for="othernames">
385 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
386 [% IF ( mandatoryothernames ) %]
387 <span class="required">Required</span>
389 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
391 [% END #/UNLESS noothernames %]
396 [% UNLESS ( opduplicate ) %]
398 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
400 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
403 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
405 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
408 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
410 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
413 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label>
415 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label>
418 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
419 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
420 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
421 <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
422 [% END # /UNLESS ( opduplicate )%]
424 [% END # /UNLESS nosex %]
425 [% END # /UNLESS ( I ) %]
427 </fieldset> <!-- /#memberentry_identity -->
428 [% END # hide fieldset %]
430 [% IF show_guarantor || guarantor %]
431 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
432 <div id="memberentry_guarantor_anchor">
433 <fieldset id="memberentry_guarantor" class="rows">
434 <legend>Patron guarantor</legend>
436 <div id="guarantor_relationships">
437 [% FOREACH r IN relationships %]
440 [% IF category_type == 'I' %]
441 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
442 <span class="label">Organization:</span>
443 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
446 <span class="label">Relationship:</span>
447 <span>[% r.relationship | html %]</span>
450 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
451 <span class="label">Guarantor:</span>
452 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
455 <span class="label">Relationship:</span>
456 <span>[% r.relationship | html %]</span>
460 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
461 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
466 [% END # END relationships foreach %]
467 [% IF guarantor && (!relationships) %]
468 <fieldset class="guarantor">
470 <li class="guarantor-details" data-borrowernumber="0">
471 <span class="label">Guarantor:</span>
472 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
473 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
476 [% IF possible_relationships %]
478 [% UNLESS empty_relationship_allowed %]
479 <label for="guarantor_relationship" class="required">Relationship: </label>
480 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
482 <label for="guarantor_relationship">Relationship: </label>
483 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
485 <option value="" selected>Empty option</option>
486 [% FOREACH pr IN possible_relationships.split('\|') %]
488 <option value="[% pr | html %]">[% pr | html %]</option>
492 [% UNLESS empty_relationship_allowed %]
493 <span class="required">Required</span>
497 <input type="hidden" name="new_guarantor_relationship" value="" />
501 <label for="guarantor_cancel"> </label>
502 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
507 </div> <!-- #/guarantor_relationships -->
509 <fieldset class="guarantor" id="guarantor_template">
511 <li class="guarantor-details" data-borrowernumber="0">
512 <span class="label">Guarantor:</span>
513 <a class="new_guarantor_link" href="#" target="blank">
514 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
515 (<span class="new_guarantor_id_text"></span>)
517 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
520 [% IF possible_relationships %]
522 [% UNLESS empty_relationship_allowed %]
523 <label for="guarantor_relationship" class="required">Relationship: </label>
524 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
526 <label for="guarantor_relationship">Relationship: </label>
527 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
529 <option value="" selected></option>
530 [% FOREACH pr IN possible_relationships.split('\|') %]
532 <option value="[% pr | html %]">[% pr | html %]</option>
536 [% UNLESS empty_relationship_allowed %]
537 <span class="required">Required</span>
541 <input type="hidden" name="new_guarantor_relationship" value="" />
545 <label for="guarantor_cancel"> </label>
546 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
552 <input type="hidden" id="guarantor_id" value="" />
553 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
554 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
557 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Add guarantor</a>
560 [% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
562 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
563 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
564 [% IF privacy_guarantor_checkouts %]
565 <option value="0">No</option>
566 <option value="1" selected>Yes</option>
568 <option value="0" selected>No</option>
569 <option value="1">Yes</option>
572 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
575 [% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
577 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
578 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
579 [% IF privacy_guarantor_fines %]
580 <option value="0">No</option>
581 <option value="1" selected>Yes</option>
583 <option value="0" selected>No</option>
584 <option value="1">Yes</option>
587 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
591 </fieldset> <!-- /#memberentry_guarantor -->
592 </div> <!-- #/memberentry_guarantor_anchor -->
594 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
595 <fieldset class="rows" id="non_patron_guarantor">
596 <legend>Non-patron guarantor</legend>
598 [% UNLESS nocontactname %]
600 [% IF ( mandatorycontactname ) %]
601 <label for="contactname" class="required">
603 <label for="contactname">
607 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
608 [% IF ( mandatorycontactname ) %]
609 <span class="required">Required</span>
611 <div class="hint">Non-patron guarantor surname</div>
613 [% END # /UNLESS nocontactname %]
615 [% UNLESS nocontactfirstname %]
617 [% IF ( mandatorycontactfirstname ) %]
618 <label for="contactfirstname" class="required">
620 <label for="contactfirstname">
622 Guarantor first name:
624 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
625 [% IF ( mandatorycontactfirstname ) %]
626 <span class="required">Required</span>
628 <div class="hint">Non-patron guarantor first name</div>
630 [% END # /UNLESS noaltcontactfirstname %]
632 [% UNLESS norelationship %]
633 [% IF possible_relationships %]
635 <label for="relationship">Relationship: </label>
636 <select class="relationship" name="relationship">
637 <option value=""></option>
638 [% FOREACH pr IN possible_relationships.split('\|') %]
639 [% IF pr == relationship %]
640 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
642 <option value="[% pr | html %]">[% pr | html %]</option>
647 [% END #/IF possible_relationships %]
648 [% END # /UNLESS norelationship %]
650 </fieldset> <!-- /#non_patron_guarantor -->
651 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
652 [% END # /IF show_guarantor || guarantor %]
654 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
655 [% PROCESS 'main-address-style' %]
656 [% END # /UNLESS nostreet && nocity etc group%]
658 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
659 <fieldset class="rows" id="memberentry_contact">
660 <legend id="contact_lgd">Contact information</legend>
664 [% IF ( mandatoryphone ) %]
665 <label for="phone" class="required">
671 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
672 [% IF ( mandatoryphone ) %]
673 <span class="required">Required</span>
675 <div class="hint">Shows on transit slips</div>
677 [% END # /UNLESS nophone %]
679 [% UNLESS nophonepro %]
681 [% IF ( mandatoryphonepro ) %]
682 <label for="phonepro" class="required">
684 <label for="phonepro">
688 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
689 [% IF ( mandatoryphonepro ) %]
690 <span class="required">Required</span>
693 [% END # /UNLESS nophonepro %]
695 [% UNLESS nomobile %]
697 [% IF ( mandatorymobile ) %]
698 <label for="mobile" class="required">
704 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
705 [% IF ( mandatorymobile ) %]
706 <span class="required">Required</span>
709 [% END # /UNLESS nomobile %]
713 [% IF ( mandatoryemail ) %]
714 <label for="email" class="required">
720 [% IF ( NoUpdateEmail ) %]
721 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" />
723 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
725 [% IF ( mandatoryemail ) %]
726 <span class="required">Required</span>
728 <div class="hint">Shows on transit slips</div>
730 [% END #/UNLESS noemail %]
732 [% UNLESS noemailpro %]
734 [% IF ( mandatoryemailpro ) %]
735 <label for="emailpro" class="required">
737 <label for="emailpro">
741 [% IF ( NoUpdateEmail ) %]
742 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled"/>
744 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
746 [% IF ( mandatoryemailpro ) %]
747 <span class="required">Required</span>
750 [% END #/UNLESS noemailpro %]
754 [% IF ( mandatoryfax ) %]
755 <label for="fax" class="required">
761 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
762 [% IF ( mandatoryfax ) %]
763 <span class="required">Required</span>
766 [% END #/UNLESS nofax %]
769 [% IF mandatoryprimary_contact_method %]
770 <label for="primary_contact_method" class="required">
772 <label for="primary_contact_method">
774 Main contact method: </label>
776 <select id="primary_contact_method" name="primary_contact_method">
777 <option value=""></option>
779 [% IF ( primary_contact_method == 'phone' ) %]
780 <option value="phone" selected="selected">Primary phone</option>
782 <option value="phone">Primary phone</option>
785 [% UNLESS nophonepro %]
786 [% IF ( primary_contact_method == 'phonepro' ) %]
787 <option value="phonepro" selected="selected">Secondary phone</option>
789 <option value="phonepro">Secondary phone</option>
792 [% UNLESS nomobile %]
793 [% IF ( primary_contact_method == 'mobile' ) %]
794 <option value="mobile" selected="selected">Other phone</option>
796 <option value="mobile">Other phone</option>
800 [% IF ( primary_contact_method == 'email' ) %]
801 <option value="email" selected="selected">Primary email</option>
803 <option value="email">Primary email</option>
806 [% UNLESS noemailpro %]
807 [% IF ( primary_contact_method == 'emailpro' ) %]
808 <option value="emailpro" selected="selected">Secondary email</option>
810 <option value="emailpro">Secondary email</option>
814 [% IF ( primary_contact_method == 'fax' ) %]
815 <option value="fax" selected="selected">Fax</option>
817 <option value="fax">Fax</option>
821 [% IF mandatoryprimary_contact_method %]
822 <span class="required">Required</span>
826 </fieldset> <!-- /#memberentry_contact -->
827 [% END # hide fieldset %]
829 <!-- ************************ STEP_1 *********************** -->
830 [% END # /IF ( step_1 ) %]
833 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
834 [% PROCESS 'alt-address-style' %]
835 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
836 [% END # /IF ( step_6 ) %]
839 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
840 [% PROCESS 'alt-contact-style' %]
841 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
842 [% END # /IF ( step_2 ) %]
845 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
846 <fieldset class="rows" id="memberentry_library_management">
847 <legend id="library_management_lgd">Library management</legend>
849 [% UNLESS nocardnumber %]
851 [% IF mandatorycardnumber %]
852 <label for="cardnumber" class="required">
854 <label for="cardnumber" class="validated">
859 <!-- NOTE: div.hint closing tag isn't on the same line -->
860 [% IF minlength_cardnumber == maxlength_cardnumber %]
861 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
862 [% IF mandatorycardnumber %]
863 <span class="required">Required</span>
865 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
866 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
867 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
868 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
869 [% IF mandatorycardnumber %]
870 <span class="required">Required</span>
872 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
873 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
874 [% ELSIF maxlength_cardnumber %]
875 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
876 [% IF mandatorycardnumber %]
877 <span class="required">Required</span>
879 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
880 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
882 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
883 [% IF mandatorycardnumber %]
884 <span class="required">Required</span>
886 <div class="hint">There is no minimum or maximum character length.
888 [% IF autoMemberNum %]
889 [% IF mandatorycardnumber %]
890 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
892 <br/>Leave blank for auto calc during registration
895 </div><!--/div.hint -->
897 [% END # /UNLESS nocardnumber %]
899 [% UNLESS nobranchcode %]
901 <label for="libraries" class="required">Library:</label>
902 <select name="branchcode" id="libraries">
903 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
905 <span class="required">Required</span>
910 <label for="categorycode_entry" class="required">Category: </label>
911 <select id="categorycode_entry" name="categorycode">
912 [% FOREACH typeloo IN typeloop %]
913 [% FOREACH categoryloo IN typeloo.categoryloop %]
914 [% IF ( loop.first ) %]
915 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
916 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
917 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
918 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
919 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
920 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
922 [% IF ( categoryloo.categorycodeselected ) %]
923 <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>
925 <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>
927 [% IF ( loop.last ) %]
930 [% END # /FOREACH categoryloo %]
931 [% END # /FOREACH typeloo %]
933 <span class="required">Required</span>
938 [% IF ( mandatorysort1 ) %]
939 <label for="sort1" class="required">
945 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
946 [% IF ( mandatorysort1 ) %]
947 <span class="required">Required</span>
950 [% END # /UNLESS nosort1 %]
954 [% IF ( mandatorysort2 ) %]
955 <label for="sort2" class="required">
961 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
962 [% IF ( mandatorysort2 ) %]
963 <span class="required">Required</span>
966 [% END # /UNLESS nosort2 %]
968 [% UNLESS noautorenew_checkouts %]
970 <label for="yes-autorenew_checkouts">
971 Allow auto-renewal of items:
973 [% IF ( autorenew_checkouts || opadd ) %]
974 <label for="yes-autorenew_checkouts">
976 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
978 <label for="no-autorenew_checkouts">
980 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
983 <label for="yes-autorenew_checkouts">
985 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
987 <label for="no-autorenew_checkouts">
989 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
995 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
997 <label for="checkprevcheckout">Check for previous checkouts: </label>
998 <select name="checkprevcheckout" id="checkprevcheckout">
999 [% IF ( checkprevcheckout == 'yes' ) %]
1000 <option value="yes" selected="selected">Yes if settings allow it</option>
1001 <option value="no">No if settings allow it</option>
1002 <option value="inherit">Inherit from settings</option>
1003 [% ELSIF ( checkprevcheckout == 'no' ) %]
1004 <option value="yes">Yes if settings allow it</option>
1005 <option value="no" selected="selected">No if settings allow it</option>
1006 <option value="inherit">Inherit from settings</option>
1008 <option value="yes">Yes if settings allow it</option>
1009 <option value="no">No if settings allow it</option>
1010 <option value="inherit" selected="selected">Inherit from settings</option>
1014 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
1016 [% IF Koha.Preference('TranslateNotices') %]
1018 <label for="lang">Preferred language for notices: </label>
1019 <select id="lang" name="lang">
1020 <option value="default">Default</option>
1021 [% FOR language IN languages %]
1022 [% FOR sublanguage IN language.sublanguages_loop %]
1023 [% IF language.plural %]
1024 [% IF sublanguage.rfc4646_subtag == lang %]
1025 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1027 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1030 [% IF sublanguage.rfc4646_subtag == lang %]
1031 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1033 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
1035 [% END # /IF language.plural %]
1036 [% END # /FOR sublanguage %]
1037 [% END #/FOR language %]
1038 </select> <!-- /#lang -->
1040 [% END #/IF Koha.Preference('TranslateNotices') %]
1042 </fieldset> <!-- /#memberentry_library_management -->
1044 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1045 <fieldset class="rows" id="memberentry_subscription">
1046 <legend id="library_setup_lgd">Library setup</legend><ol>
1047 [% UNLESS nodateenrolled %]
1049 [% IF ( mandatorydateenrolled ) %]
1050 <label for="from" class="required">
1056 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
1057 [% IF ( mandatorydateenrolled ) %]
1058 <span class="required">Required</span>
1060 [% IF ( ERROR_dateenrolled ) %]
1061 <span class="required">(Error)</span>
1063 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1065 [% END # /UNLESS nodateenrolled %]
1067 [% UNLESS nodateexpiry %]
1070 <li style="display:none">
1072 [% IF ( mandatorydateexpiry ) %]
1073 <label for="to" class="required">
1077 Expiry date (leave blank for auto calc):
1079 [% UNLESS ( opadd ) %]
1080 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
1082 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
1084 [% IF ( mandatorydateexpiry ) %]
1085 <span class="required">Required</span>
1087 [% IF ( ERROR_dateexpiry ) %]
1088 <span class="required">(Error)</span>
1090 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1093 [% UNLESS noopacnote %]
1095 [% IF ( mandatoryopacnote ) %]
1096 <label for="opacnote" class="required">
1098 <label for="opacnote">
1102 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1103 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1104 [% IF ( mandatoryopacnote ) %]
1105 <span class="required">Required</span>
1108 [% END # /UNLESS noopacnote %]
1110 [% UNLESS noborrowernotes %]
1112 [% IF ( mandatoryborrowernotes ) %]
1113 <label for="borrowernotes" class="required">
1115 <label for="borrowernotes">
1119 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1120 <div class="hint">This message displays when checking out to this patron</div>
1121 [% IF ( mandatoryborrowernotes ) %]
1122 <span class="required">Required</span>
1125 [% END # /UNLESS noborrowernotes %]
1127 </fieldset> <!-- /#memberentry_subscription -->
1128 [% END # hide fieldset %]
1130 [% UNLESS nouserid && nopassword %]
1131 <fieldset class="rows" id="memberentry_userid">
1132 <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1134 [% UNLESS nouserid %]
1136 [% IF ( mandatoryuserid ) %]
1137 <label for="userid" class="required">
1139 <label for="userid">
1144 [% IF ( NoUpdateLogin ) %]
1145 [% IF ( opduplicate ) %]
1146 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1148 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1151 [% IF ( opduplicate ) %]
1152 <input type="text" id="userid" name="userid" size="20" value="" />
1154 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1156 [% END # /IF ( NoUpdateLogin ) %]
1158 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1159 <input type="text" disabled="disabled" style="display:none" />
1161 [% IF ( mandatoryuserid ) %]
1162 <span class="required">Required</span>
1165 [% END # /UNLESS nouserid %]
1167 [% UNLESS nopassword %]
1169 [% IF ( mandatorypassword ) %]
1170 <label for="password" class="required">
1172 <label for="password">
1177 [% IF ( NoUpdateLogin ) %]
1178 [% IF ( opduplicate ) %]
1179 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1181 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1184 [% IF ( opduplicate ) %]
1185 <input type="password" id="password" name="password" size="20" />
1187 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1189 [% END # /IF ( NoUpdateLogin ) %]
1190 [% ELSE # IF ( opadd ) %]
1192 [% IF ( password ) %]
1193 [% IF ( NoUpdateLogin ) %]
1194 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1196 [% IF ( opduplicate ) %]
1197 <input type="password" id="password" name="password" size="20" />
1199 <input type="password" id="password" name="password" size="20" value="****" />
1203 [% IF ( NoUpdateLogin ) %]
1204 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1206 <input type="password" id="password" name="password" size="20" value="" />
1208 [% END # /IF ( password ) %]
1209 [% END # /IF ( opadd ) %]
1210 [% IF ( mandatorypassword ) %]
1211 <span class="required">Required</span>
1213 [% IF ( ERROR_password_too_short ) %]
1214 <span class="required">Password is too short</span>
1216 [% IF ( ERROR_password_too_weak ) %]
1217 <span class="required">Password is too weak</span>
1219 [% IF ( ERROR_password_has_whitespaces ) %]
1220 <span class="required">Password has leading or trailing whitespaces</span>
1222 <div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div>
1226 [% IF ( mandatorypassword ) %]
1227 <label for="password2" class="required">
1229 <label for="password2">
1234 [% IF ( NoUpdateLogin ) %]
1235 [% IF ( opduplicate ) %]
1236 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1238 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1241 [% IF ( opduplicate ) %]
1242 <input type="password" id="password2" name="password2" size="20" />
1244 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1247 [% ELSE # IF ( opadd ) %]
1248 [% IF ( password ) %]
1249 [% IF ( NoUpdateLogin ) %]
1250 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1252 [% IF ( opduplicate ) %]
1253 <input type="password" id="password2" name="password2" size="20" />
1255 <input type="password" id="password2" name="password2" size="20" value="****" />
1259 [% IF ( NoUpdateLogin ) %]
1260 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1262 <input type="password" id="password2" name="password2" size="20" value="" />
1265 [% END # /IF ( opadd ) %]
1267 [% IF ( mandatorypassword ) %]
1268 <span class="required">Required</span>
1270 [% IF ( ERROR_password_mismatch ) %]
1271 <span class="required">Passwords do not match</span>
1274 [% END # /UNLESS nopassword %]
1276 </fieldset> <!-- /#memberentry_userid -->
1277 [% END # UNLESS nouserid && nopassword %]
1279 <!--this zones are not necessary in modif mode -->
1280 [% UNLESS ( opadd || opduplicate ) %]
1281 <fieldset class="rows" id="memberentry_account_flags">
1282 <legend id="account_flags_lgd">Patron account flags</legend>
1284 [% FOREACH flagloo IN flagloop %]
1286 <label class="radio" for="yes[% flagloo.name | html %]">
1287 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1288 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1290 [% IF CAN_user_circulate_manage_restrictions %]
1291 <label for="yes[% flagloo.name | html %]">
1292 [% IF ( flagloo.yes ) %]
1293 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1295 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1299 <label for="no[% flagloo.name | html %]">
1300 [% IF ( flagloo.no ) %]
1301 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1303 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1308 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1309 [% END # /IF CAN_user_circulate_manage_restrictions %]
1311 [% END # /FOREACH flagloo %]
1313 </fieldset> <!-- /#memberentry_account_flags -->
1315 <fieldset class="rows" id="memberentry_restrictions">
1316 <legend id="restrictions_lgd">Patron restrictions</legend>
1317 [% IF ( debarments ) %]
1324 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1325 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1331 [% FOREACH d IN debarments %]
1333 <td>[% d.type | html %]</td>
1335 [% IF d.comment.search('OVERDUES_PROCESS') %]
1336 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1338 [% d.comment | $raw %]
1342 [% IF d.expiration %]
1343 [% d.expiration | $KohaDates %]
1348 <td>[% d.created | $KohaDates %]</td>
1349 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1351 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1355 [% END # /FOREACH d %]
1359 <p>Patron is currently unrestricted.</p>
1360 [% END # /IF ( debarments ) %]
1362 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1363 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1364 <fieldset id="manual_restriction_form">
1365 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1366 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1369 <label for="debarred_comment">Comment: </label>
1370 <input type="text" id="debarred_comment" name="debarred_comment" />
1373 <label for="debarred_expiration">Expiration: </label>
1374 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1375 <a href="#" id="clear_debarred_expiration">Clear date</a>
1379 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1381 </fieldset> <!-- /#manual_restriction_form -->
1382 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1383 </fieldset> <!-- /#memberentry_restrictions -->
1384 [% END # /UNLESS ( opadd || opduplicate ) %]
1385 [% END # /IF ( step_3 ) %]
1388 [% IF Koha.Preference('HouseboundModule') %]
1389 <fieldset class="rows" id="memberentry_housebound_roles">
1390 <legend id="housebound_roles">Housebound roles</legend>
1393 <label class="radio" for="housebound_chooser">
1396 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1397 <label for="yes_housebound_chooser">Yes </label>
1398 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1399 <label for="no_housebound_chooser">No </label>
1400 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1402 <label for="yes_housebound_chooser">Yes </label>
1403 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1404 <label for="no_housebound_chooser">No </label>
1405 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1409 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1410 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1411 <label for="yes_housebound_deliverer">Yes </label>
1412 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1413 <label for="no_housebound_deliverer">No </label>
1414 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1416 <label for="yes_housebound_deliverer">Yes </label>
1417 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1418 <label for="no_housebound_deliverer">No </label>
1419 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1422 </ol> <!-- /ol.radio -->
1423 </fieldset> <!-- /#memberentry_housebound_roles -->
1424 [% END # hide fieldset %]
1425 [% END # IF step_7 %]
1428 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1429 [% UNLESS ( no_patron_attribute_types ) %]
1430 <fieldset class="rows" id="memberentry_patron_attributes">
1431 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1432 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1433 [% FOREACH pa_loo IN patron_attributes %]
1434 <ol class="attributes_table">
1435 [% IF pa_loo.class %]
1436 <fieldset id="aai_[% pa_loo.class | html %]">
1437 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1439 [% FOREACH patron_attribute IN pa_loo.items %]
1440 <li data-category_code="[% patron_attribute.category_code | html %]">
1441 [% IF patron_attribute.mandatory %]
1442 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1444 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1446 [% IF ( patron_attribute.use_dropdown ) %]
1447 [% IF patron_attribute.mandatory %]
1448 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1450 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1452 <option value=""></option>
1453 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1454 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1455 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1456 [% auth_val_loo.lib | html %]
1459 <option value="[% auth_val_loo.authorised_value | html %]" >
1460 [% auth_val_loo.lib | html %]
1466 [% IF patron_attribute.mandatory %]
1467 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1469 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1471 [% END # /IF ( patron_attribute.use_dropdown ) %]
1472 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1473 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1474 [% IF ( patron_attribute.repeatable ) %]
1475 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1477 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1479 [% END # /FOREACH patron_attribute %]
1480 [% IF pa_loo.class %]</fieldset>[% END %]
1482 [% END # /FOREACH pa_loo %]
1483 </fieldset> <!-- /#memberentry_patron_attributes -->
1484 [% END # UNLESS ( no_patron_attribute_types ) %]
1485 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1486 [% END # IF ( step_4 ) %]
1489 [% IF ( EnhancedMessagingPreferences ) %]
1490 <fieldset class="rows" id="memberentry_messaging_prefs">
1491 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1492 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1493 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1495 <input type="hidden" name="setting_messaging_prefs" value="1" />
1496 [% INCLUDE 'messaging-preference-form.inc' %]
1497 [% IF ( SMSSendDriver ) %]
1499 <label for="SMSnumber">SMS number:</label>
1500 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1501 <span class="hint sms_number_help">Please enter numbers only. Prefix the number with + if including the country code.</span>
1503 [% UNLESS nosms_provider_id %]
1505 <label for="sms_provider_id">SMS provider:</label>
1506 <select id="sms_provider_id" name="sms_provider_id">
1507 <option value="">Unknown</option>
1508 [% FOREACH s IN sms_providers %]
1509 [% IF s.id == sms_provider_id %]
1510 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1512 <option value="[% s.id | html %]">[% s.name | html %]</option>
1517 [% END # /UNLESS nosms_provider_id %]
1518 [% END # IF ( SMSSendDriver ) %]
1520 [% END # IF ( EnhancedMessagingPreferences ) %]
1521 [% END # /IF step_5 %]
1522 </form> <!-- /#entryform -->
1524 [% IF quickadd && opadd && !check_member %]
1525 <form id="quick_add_form" class="toggler">
1526 <fieldset class="rows quick_add"><legend>Quick add</legend>
1527 <ol id="quick_add_list">
1533 [% END # /UNLESS ( no_add ) %]
1535 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1537 [% UNLESS ( opadd ) %]
1538 <div class="col-sm-2 col-sm-pull-10">
1540 [% INCLUDE 'circ-menu.inc' %]
1542 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1544 </div> <!-- /.row -->
1546 [% MACRO jsinclude BLOCK %]
1547 [% Asset.js("lib/hc-sticky.js") | $raw %]
1548 [% INCLUDE 'calendar.inc' %]
1549 [% INCLUDE 'str/members-menu.inc' %]
1550 [% Asset.js("js/members-menu.js") | $raw %]
1552 function update_cardnumber_warning(size){
1553 var max_len = [% maxlength_cardnumber | html %];
1554 if ( size >= max_len ) {
1555 $("#cn_max").show();
1557 $("#cn_max").hide();
1561 function showHideFields(){
1562 [% UNLESS step == 1 %]
1563 [% IF fieldstohide.match('identity') %]
1564 $("#memberentry_identity").find('legend').nextAll().toggle();
1566 [% IF show_guarantor || guarantor %]
1567 [% IF fieldstohide.match('guarantor') %]
1568 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1569 $("#guarantor_template").toggle();
1572 [% IF fieldstohide.match('primary_address') %]
1573 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1575 [% IF fieldstohide.match('primary_contact') %]
1576 $("#memberentry_contact").find('legend').nextAll().toggle();
1579 [% UNLESS step == 6 %]
1580 [% IF fieldstohide.match('alt_address') %]
1581 $("#memberentry_address").find('legend').nextAll().toggle();
1584 [% UNLESS step == 2 %]
1585 [% IF fieldstohide.match('alt_contact') %]
1586 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1589 [% UNLESS step == 3 %]
1590 [% IF fieldstohide.match('lib_mgmt') %]
1591 $("#memberentry_library_management").find('legend').nextAll().toggle();
1593 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1594 [% IF fieldstohide.match('lib_setup') %]
1595 $("#memberentry_subscription").find('legend').nextAll().toggle();
1598 [% UNLESS nouserid && nopassword %]
1599 [% IF fieldstohide.match('login') %]
1600 $("#memberentry_userid").find('legend').nextAll().toggle();
1603 [% UNLESS ( opadd || opduplicate ) %]
1604 [% IF fieldstohide.match('flags') %]
1605 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1608 [% IF fieldstohide.match('debarments') %]
1609 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1612 [% UNLESS step == 7 %]
1613 [% IF Koha.Preference('HouseboundModule') %]
1614 [% IF fieldstohide.match('housebound') %]
1615 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1619 [% UNLESS step == 4 %]
1620 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1621 [% IF fieldstohide.match('additional') %]
1622 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1626 [% UNLESS step == 5 %]
1627 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1628 [% IF fieldstohide.match('messaging') %]
1629 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1630 $("#messaging_prefs_loading").toggle();
1636 $(document).ready(function() {
1638 $("#toggle_hidden_fields").change(function(){
1642 $("legend").click(function(){
1643 $(this).nextAll().toggle();
1644 $("#messaging_prefs_loading").hide();
1647 $("#saverecord").css({ 'margin-left': 0 });
1649 Sticky = $("#toolbar");
1652 stickyClass: "floating"
1655 [% IF categorycode %]
1656 update_category_code( "[% categorycode | html %]" );
1658 if ( $("#categorycode_entry").length > 0 ){
1659 var category_code = $("#categorycode_entry").find("option:selected").val();
1660 update_category_code( category_code );
1664 [% IF new_guarantors %]
1665 [% FOREACH g IN new_guarantors %]
1666 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1670 $("#cn_max").hide();
1672 $("#cardnumber").on("keydown", function(e){
1673 content = $(this).val();
1675 $("#cardnumber").on("keyup", function(e){
1676 // .val() will return the value of the input after the key has been released
1677 var l = $(this).val().length;
1678 if ( l == content.length + 1 ) { l--; }
1679 update_cardnumber_warning(l);
1681 $("#cardnumber").bind("paste", function(e){
1682 var pastedData = e.originalEvent.clipboardData.getData('text');
1683 update_cardnumber_warning(pastedData.length - 1);
1685 var toggle_quick_add = $(".toggle_quick_add");
1686 $(toggle_quick_add).click(function(e){
1687 toggle_quick_add.toggle();
1690 var toggle_from = '';
1691 if( $("#entryform:visible").length ) {
1692 toggle_to = "#quick_add_form label";
1693 toggle_from = "#entryform label";
1694 $("#memberentry_guarantor").appendTo("#quick_add_form");
1696 toggle_to="#entryform label";
1697 toggle_from = "#quick_add_form label";
1698 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1700 $(toggle_from).each(function() {
1701 var input_label = $(this).attr('for');
1702 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1703 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1706 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1709 $(".toggler").toggle();
1712 $("#save_quick_add").click(function(){
1713 $("#quick_add_form").validate();
1714 if( $("#quick_add_form").valid()){
1715 $('.toggle_quick_add').click();
1716 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1717 $('#saverecord').click();
1719 else {return false;}
1722 $("#saverecord").click(function(){
1723 if( check_form_borrowers() ){
1724 $("#entryform").submit();
1728 $('#duplicate').on('click', function() {
1729 $("input[name='op']").val('modify');
1730 $("input[name='borrowernumber']").val('[% check_member | html %]');
1731 $("input[name='check_member']").val('');
1732 $('#entryform').submit();
1735 $('#not-duplicate').on('click', function() {
1736 $("input[name='nodouble']").val('1');
1737 $('#entryform').submit();
1740 $(".popup_patronview").on("click", function(e){
1742 var url = $(this).attr("href");
1743 openWindow( url, "patronview" );
1746 $("#dateofbirth").on("change", function(){
1750 $("#debarred_comment, #debarred_expiration").on("change", function(){
1751 $("#add_debarment").val(1);
1754 $("#clear_debarred_expiration").on("click", function(e){
1756 $('#debarred_expiration').val("");
1759 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1761 clear_entry( this );
1764 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1766 clone_entry( this );
1769 $("#categorycode_entry").on("change", function(){
1770 update_category_code(this);
1774 var MSG_SEPARATOR = _("Separator must be / in field %s");
1775 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1776 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1777 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1778 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1779 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1780 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1781 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1782 var MSG_MONTH = _("%s month")
1783 var MSG_MONTHS = _("%s months")
1784 var MSG_YEAR = _("%s year")
1785 var MSG_YEARS = _("%s years")
1786 var LABEL_CHANGE = _("Change");
1787 var LABEL_SET_TO_PATRON = _("Set to patron");
1788 var LABEL_AGE = _("Age");
1789 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1790 var MSG_PASSWORD_LENGTH = _("Minimum password length: %s");
1792 [% IF quickadd && opadd && !check_member %]
1793 $(document).ready(function () {
1795 $("#entryform,#saverecord").hide();
1796 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1797 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1798 $("#entryform label").each(function () {
1799 var input_label = $(this).attr('for');
1800 if ( input_label == 'sex-female' ) {
1803 else if ( input_label == 'btitle' ) {
1804 input_label='title';
1806 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1807 $(this).parent().clone().appendTo("#quick_add_list");
1808 [% UNLESS mandatorypassword %]
1809 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1813 if ( $("#memberentry_guarantor").length ) {
1814 $("#memberentry_guarantor").appendTo("#quick_add_form");
1816 $("#quick_add_form").show();
1819 $("#guarantor_template").hide();
1822 [% Asset.js("js/members.js") | $raw %]
1823 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1824 [% 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 %]
1827 [% INCLUDE 'intranet-bottom.inc' %]