1 [% PROCESS 'i18n.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Patrons ›
11 [% UNLESS blocking_error %]
14 [% ELSIF ( opduplicate ) %]
19 [% INCLUDE 'patron-title.inc' no_html = 1 %]
20 [% IF categoryname %]([% categoryname | html %])[% END %]
28 [% INCLUDE 'doc-head-close.inc' %]
31 <body id="pat_memberentrygen" class="pat">
32 [% INCLUDE 'header.inc' %]
33 [% INCLUDE 'patron-search.inc' %]
35 <div id="breadcrumbs">
36 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
37 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
38 [% UNLESS blocking_error %]
40 [% IF (firstname || surname ) %]
41 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
42 [% INCLUDE 'patron-title.inc' %]
48 [% ELSIF ( opduplicate ) %]
53 [% IF categoryname %]([% categoryname | html %])[% END %]
56 </div> <!-- /#breadcrumbs -->
58 <div class="main container-fluid">
61 [% FOR message IN messages %]
62 [% SWITCH message.error %]
63 [% CASE 'error_on_insert_patron' %]
64 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
65 [% CASE 'error_on_update_patron' %]
66 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
67 [% CASE %]Unhandled error: [% message.error %]
72 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
74 <div class="col-sm-10 col-sm-push-2">
76 <main class="clearfix">
77 [% INCLUDE 'blocking_errors.inc' %]
80 [% IF ( error_alert == "no_email" ) %]
81 <div class="dialog alert">This member has no email</div>
83 <div class="dialog alert">[% error_alert | html %]</div>
87 <div class="dialog message">Email has been sent.</div>
90 [% INCLUDE 'noadd-warnings.inc' %]
92 [% UNLESS ( no_add ) %]
96 [% ELSIF ( opduplicate ) %]
101 [% INCLUDE 'patron-title.inc' %]
102 [% IF categoryname %]([% categoryname | html %])[% END %]
105 [% IF quickadd && opadd && !check_member %]
106 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
107 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
110 [% IF ( check_member ) %]
111 <div class="dialog alert">
112 <h3>Duplicate patron record?</h3>
113 <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>
114 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
115 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
120 <div class="dialog alert">
121 <p>The following fields are wrong. Please fix them.</p>
123 [% IF ( ERROR_login_exist ) %]
124 <li id="ERROR_login_exist">Username/password already exists.</li>
126 [% IF ERROR_cardnumber_already_exists %]
127 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
129 [% IF ERROR_cardnumber_length %]
130 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
132 [% IF ( ERROR_age_limitations ) %]
133 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
134 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
136 [% IF ( ERROR_branch ) %]
137 <li id="ERROR_branch">Library is invalid.</li>
139 [% IF ( ERROR_dateofbirth ) %]
140 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
142 [% IF ( ERROR_dateenrolled ) %]
143 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
145 [% IF ( ERROR_dateexpiry ) %]
146 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
148 [% IF ( ERROR_password_too_short ) %]
149 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
151 [% IF ( ERROR_password_too_weak ) %]
152 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
154 [% IF ( ERROR_password_has_whitespaces ) %]
155 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
157 [% IF ( ERROR_password_mismatch ) %]
158 <li id="ERROR_password_mismatch">Passwords do not match.</li>
160 [% IF ( ERROR_extended_unique_id_failed ) %]
161 <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>
163 [% IF ERROR_bad_email %]
164 <li id="ERROR_bad_email">The primary email is invalid.</li>
166 [% IF ERROR_bad_email_secondary %]
167 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
169 [% IF ERROR_bad_email_alternative %]
170 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
176 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
177 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
179 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
180 [% FOREACH field IN fieldstohide.split(',') %]
182 [% CASE 'identity' %] Organization/Patron identity |
183 [% CASE 'guarantor' %] Guarantor information |
184 [% CASE 'primary_address' %] Main address |
185 [% CASE 'primary_contact' %] Contact information |
186 [% CASE 'alt_address' %] Alternate address |
187 [% CASE 'alt_contact' %] Alternate contact |
188 [% CASE 'lib_mgmt' %] Library management |
189 [% CASE 'lib_setup' %] Library setup |
190 [% CASE 'login' %] OPAC/Staff login |
191 [% CASE 'flags' %] Patron account flags |
192 [% CASE 'debarments' %] Patron restrictions |
193 [% CASE 'housebound' %] Housebound roles |
194 [% CASE 'additional' %] Additional attributes and identifiers |
195 [% CASE 'messaging' %] Patron messaging preferences |
201 [% UNLESS ( check_member ) %]
202 <div id="toolbar" class="btn-toolbar">
203 [% IF quickadd && opadd %]
204 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
206 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
208 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
210 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
212 <i class="fa fa-times"></i> Cancel
217 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
218 [% UNLESS ( check_member ) %]
219 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
221 <!-- field always hidden in different form (1,2,3) -->
222 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
223 <input type="hidden" name="category_type" value="[% category_type | html %]" />
224 <input type="hidden" name="updtype" value="[% updtype | html %]" />
225 <input type="hidden" name="destination" value="[% destination | html %]" />
226 <input type="hidden" name="check_member" value="[% check_member | html %]" />
227 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
228 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
229 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
231 <input type="hidden" name="step" value="[% step | html %]" />
234 <input type="hidden" name="op" value="insert" />
235 [% ELSIF ( opduplicate ) %]
236 <input type="hidden" name="op" value="insert" />
238 <input type="hidden" name="op" value="save" />
239 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
240 [%# Only put the cardnumber if we arent showing it in the form later %]
242 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
248 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
249 <fieldset class="rows" id="memberentry_identity">
250 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
254 [% IF Koha.Preference('BorrowersTitles') %]
256 [% IF ( mandatorytitle ) %]
257 <label for="btitle" class="required">
262 <select id="btitle" name="title">
263 <option value=""></option>
264 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
266 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
268 <option value="[% t | html %]">[% t | html %]</option>
272 [% IF ( mandatorytitle ) %]
273 <span class="required">Required</span>
276 [% END # /IF Koha.Preference('BorrowersTitles') %]
277 [% END # /UNLESS notitle %]
278 [% END # /UNLESS ( I ) %]
280 [% UNLESS nosurname %]
283 <label for="surname" class="required">
287 [% IF ( mandatorysurname ) %]
288 <label for="surname" class="required">
290 <label for="surname">
295 [% IF ( uppercasesurnames ) %]
296 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
298 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
300 [% IF ( mandatorysurname ) %]
301 <span class="required">Required</span>
304 [% END # /UNLESS nosurname %]
307 [% UNLESS nofirstname %]
309 [% IF ( mandatoryfirstname ) %]
310 <label for="firstname" class="required">
312 <label for="firstname">
316 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
317 [% IF ( mandatoryfirstname ) %]
318 <span class="required">Required</span>
321 [% END #/UNLESS nofirstname %]
322 [% UNLESS nodateofbirth %]
324 [% IF ( mandatorydateofbirth ) %]
325 <label for="dateofbirth" class="required">
327 <label for="dateofbirth">
331 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
332 [% IF ( mandatorydateofbirth ) %]
333 <span class="required">Required</span>
335 [% IF ( ERROR_dateofbirth ) %]
336 <span class="required">(Error)</span>
338 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
340 [% END # /UNLESS nodateofbirth %]
341 [% UNLESS noinitials %]
343 [% IF ( mandatoryinitials ) %]
344 <label for="initials" class="required">
346 <label for="initials">
350 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
351 [% IF ( mandatoryinitials ) %]
352 <span class="required">Required</span>
355 [% END # /UNLESS noinitials %]
356 [% END #/UNLESS ( I ) %]
357 [% UNLESS noothernames %]
359 [% IF ( mandatoryothernames ) %]
360 <label for="othernames" class="required">
362 <label for="othernames">
366 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
367 [% IF ( mandatoryothernames ) %]
368 <span class="required">Required</span>
370 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
372 [% END #/UNLESS noothernames %]
377 [% UNLESS ( opduplicate ) %]
379 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
381 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
384 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
386 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
389 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
391 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
394 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
395 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
396 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
397 [% END # /UNLESS ( opduplicate )%]
399 [% END # /UNLESS nosex %]
400 [% END # /UNLESS ( I ) %]
402 </fieldset> <!-- /#memberentry_identity -->
403 [% END # hide fieldset %]
405 [% IF show_guarantor || guarantor %]
406 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
407 <span id="memberentry_guarantor_anchor">
408 <fieldset id="memberentry_guarantor" class="rows">
409 <legend>Guarantor information</legend>
411 <span id="guarantor_relationships">
412 [% FOREACH r IN relationships %]
413 <fieldset class="rows">
415 [% IF category_type == 'I' %]
416 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
417 <span class="label">Organization #:</span> [% IF ( r.guarantor_id ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>[% END %]
421 <label for="guarantor_surname">Organization name: </label>
422 <span>[% r.guarantor.surname | html %]</span>
425 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
426 <span class="label">Patron card number:</span>
427 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
430 [% IF r.guarantor.surname %]
432 <label for="guarantor_surname">Surname: </label>
433 <span>[% r.guarantor.surname | html %]</span>
437 [% IF r.guarantor.firstname %]
439 <label for="guarantor_firstname">First name: </label>
440 <span>[% r.guarantor.firstname | html %]</span>
445 <label for="relationship">Relationship: </label>
446 <span>[% r.relationship | html %]</span>
450 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
451 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
456 [% END # END relationships foreach %]
457 [% IF guarantor && (!relationships) %]
458 <fieldset class="rows">
460 <li class="guarantor-details" data-borrowernumber="0">
461 <span class="label">Patron card number:</span>
462 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
463 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
467 <label for="guarantor_surname">Surname: </label>
468 <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
472 <label for="guarantor_firstname">First name: </label>
473 <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
477 <label for="guarantor_relationship">Relationship: </label>
478 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
479 [% FOREACH pr IN possible_relationships.split('\|') %]
480 <option value="[% pr | html %]">[% pr | html %]</option>
486 <label for="guarantor_cancel"> </label>
487 <span><a href="#" class="guarantor_cancel">Remove</a></span>
492 </span> <!-- #/guarantor_relationships -->
494 <fieldset class="rows guarantor" id="guarantor_template">
496 <li class="guarantor-details" data-borrowernumber="0">
497 <span class="label">Patron card number:</span>
498 <span class="new_guarantor_id_text"></span>
499 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
503 <label for="guarantor_surname">Surname: </label>
504 <span class="new_guarantor_surname_text"></span>
508 <label for="guarantor_firstname">First name: </label>
509 <span class="new_guarantor_firstname_text"></span>
513 <label for="guarantor_relationship">Relationship: </label>
514 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
515 [% FOREACH pr IN possible_relationships.split('\|') %]
516 <option value="[% pr | html %]">[% pr | html %]</option>
522 <label for="guarantor_cancel"> </label>
523 <span><a href="#" class="guarantor_cancel">Remove</a></span>
529 <input type="hidden" id="guarantor_id" value="" />
530 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
531 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
534 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
537 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
539 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
540 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
541 [% IF privacy_guarantor_checkouts %]
542 <option value="0">No</option>
543 <option value="1" selected>Yes</option>
545 <option value="0" selected>No</option>
546 <option value="1">Yes</option>
549 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
552 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
554 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
555 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
556 [% IF privacy_guarantor_fines %]
557 <option value="0">No</option>
558 <option value="1" selected>Yes</option>
560 <option value="0" selected>No</option>
561 <option value="1">Yes</option>
564 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
568 </fieldset> <!-- /#memberentry_guarantor -->
569 </span> <!-- #/memberentry_guarantor_anchor -->
570 [% END # /IF show_guarantor || guarantor %]
572 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
573 [% IF Koha.Preference( 'AddressFormat' ) %]
574 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
576 [% INCLUDE 'member-main-address-style-us.inc' %]
578 [% END # /UNLESS nostreet && nocity etc group%]
580 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
581 <fieldset class="rows" id="memberentry_contact">
582 <legend id="contact_lgd">Contact</legend>
584 [% UNLESS nocontactname %]
586 [% IF ( mandatorycontactname ) %]
587 <label for="contactname" class="required">
589 <label for="contactname">
593 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
594 [% IF ( mandatorycontactname ) %]
595 <span class="required">Required</span>
597 <div class="hint">Non-patron guarantor surname</div>
599 [% END # /UNLESS nocontactname %]
601 [% UNLESS nocontactfirstname %]
603 [% IF ( mandatorycontactfirstname ) %]
604 <label for="contactfirstname" class="required">
606 <label for="contactfirstname">
608 Guarantor first name:
610 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
611 [% IF ( mandatorycontactfirstname ) %]
612 <span class="required">Required</span>
614 <div class="hint">Non-patron guarantor first name</div>
616 [% END # /UNLESS noaltcontactfirstname %]
618 [% UNLESS norelationship %]
619 [% IF possible_relationships %]
621 <label for="relationship">Relationship: </label>
622 <select class="relationship" name="relationship">
623 <option value=""></option>
624 [% FOREACH pr IN possible_relationships.split('\|') %]
625 [% IF pr == relationship %]
626 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
628 <option value="[% pr | html %]">[% pr | html %]</option>
633 [% END #/IF possible_relationships %]
634 [% END # /UNLESS norelationship %]
638 [% IF ( mandatoryphone ) %]
639 <label for="phone" class="required">
645 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
646 [% IF ( mandatoryphone ) %]
647 <span class="required">Required</span>
649 <div class="hint">Shows on transit slips</div>
651 [% END # /UNLESS nophone %]
653 [% UNLESS nophonepro %]
655 [% IF ( mandatoryphonepro ) %]
656 <label for="phonepro" class="required">
658 <label for="phonepro">
662 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
663 [% IF ( mandatoryphonepro ) %]
664 <span class="required">Required</span>
667 [% END # /UNLESS nophonepro %]
669 [% UNLESS nomobile %]
671 [% IF ( mandatorymobile ) %]
672 <label for="mobile" class="required">
678 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
679 [% IF ( mandatorymobile ) %]
680 <span class="required">Required</span>
683 [% END # /UNLESS nomobile %]
687 [% IF ( mandatoryemail ) %]
688 <label for="email" class="required">
694 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
695 [% IF ( mandatoryemail ) %]
696 <span class="required">Required</span>
698 <div class="hint">Shows on transit slips</div>
700 [% END #/UNLESS noemail %]
702 [% UNLESS noemailpro %]
704 [% IF ( mandatoryemailpro ) %]
705 <label for="emailpro" class="required">
707 <label for="emailpro">
711 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
712 [% IF ( mandatoryemailpro ) %]
713 <span class="required">Required</span>
716 [% END # /UNLESS noemailpro %]
720 [% IF ( mandatoryfax ) %]
721 <label for="fax" class="required">
727 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
728 [% IF ( mandatoryfax ) %]
729 <span class="required">Required</span>
732 [% END #/UNLESS nofax %]
734 </fieldset> <!-- /#memberentry_contact -->
735 [% END # hide fieldset %]
737 <!-- ************************ STEP_1 *********************** -->
738 [% END # /IF ( step_1 ) %]
741 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
742 [% IF Koha.Preference( 'AddressFormat' ) %]
743 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
745 [% INCLUDE 'member-alt-address-style-us.inc' %]
747 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
748 [% END # /IF ( step_6 ) %]
751 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
752 [% IF Koha.Preference( 'AddressFormat' ) %]
753 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
755 [% INCLUDE 'member-alt-contact-style-us.inc' %]
757 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
758 [% END # /IF ( step_2 ) %]
761 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
762 <fieldset class="rows" id="memberentry_library_management">
763 <legend id="library_management_lgd">Library management</legend>
765 [% UNLESS nocardnumber %]
767 [% IF mandatorycardnumber %]
768 <label for="cardnumber" class="required">
770 <label for="cardnumber" class="validated">
775 <!-- NOTE: div.hint closing tag isn't on the same line -->
776 [% IF minlength_cardnumber == maxlength_cardnumber %]
777 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
778 [% IF mandatorycardnumber %]
779 <span class="required">Required</span>
781 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
782 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
783 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
784 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
785 [% IF mandatorycardnumber %]
786 <span class="required">Required</span>
788 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
789 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
790 [% ELSIF maxlength_cardnumber %]
791 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
792 [% IF mandatorycardnumber %]
793 <span class="required">Required</span>
795 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
796 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
798 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
799 [% IF mandatorycardnumber %]
800 <span class="required">Required</span>
802 <div class="hint">There is no minimum or maximum character length.
804 [% IF autoMemberNum %]
805 [% IF mandatorycardnumber %]
806 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
808 <br/>Leave blank for auto calc during registration
811 </div><!--/div.hint -->
813 [% END # /UNLESS nocardnumber %]
815 [% UNLESS nobranchcode %]
817 <label for="libraries" class="required">Library:</label>
818 <select name="branchcode" size="1" id="libraries">
819 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
821 <span class="required">Required</span>
826 <label for="categorycode_entry" class="required">Category: </label>
827 <select id="categorycode_entry" name="categorycode">
828 [% FOREACH typeloo IN typeloop %]
829 [% FOREACH categoryloo IN typeloo.categoryloop %]
830 [% IF ( loop.first ) %]
831 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
832 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
833 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
834 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
835 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
836 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
838 [% IF ( categoryloo.categorycodeselected ) %]
839 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
841 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
843 [% IF ( loop.last ) %]
846 [% END # /FOREACH categoryloo %]
847 [% END # /FOREACH typeloo %]
849 <span class="required">Required</span>
854 [% IF ( mandatorysort1 ) %]
855 <label for="sort1" class="required">
861 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
862 [% IF ( mandatorysort1 ) %]
863 <span class="required">Required</span>
866 [% END # /UNLESS nosort1 %]
870 [% IF ( mandatorysort2 ) %]
871 <label for="sort2" class="required">
877 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
878 [% IF ( mandatorysort2 ) %]
879 <span class="required">Required</span>
882 [% END # /UNLESS nosort2 %]
884 [% UNLESS noautorenew_checkouts %]
886 <label for="yes-autorenew_checkouts">
887 Allow auto-renewal of items:
889 [% IF ( autorenew_checkouts || opadd ) %]
890 <label for="yes-autorenew_checkouts">
892 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
894 <label for="no-autorenew_checkouts">
896 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
899 <label for="yes-autorenew_checkouts">
901 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
903 <label for="no-autorenew_checkouts">
905 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
911 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
913 <label for="checkprevcheckout">Check for previous checkouts: </label>
914 <select name="checkprevcheckout" id="checkprevcheckout">
915 [% IF ( checkprevcheckout == 'yes' ) %]
916 <option value="yes" selected="selected">Yes if settings allow it</option>
917 <option value="no">No if settings allow it</option>
918 <option value="inherit">Inherit from settings</option>
919 [% ELSIF ( checkprevcheckout == 'no' ) %]
920 <option value="yes">Yes if settings allow it</option>
921 <option value="no" selected="selected">No if settings allow it</option>
922 <option value="inherit">Inherit from settings</option>
924 <option value="yes">Yes if settings allow it</option>
925 <option value="no">No if settings allow it</option>
926 <option value="inherit" selected="selected">Inherit from settings</option>
930 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
932 [% IF Koha.Preference('TranslateNotices') %]
934 <label for="lang">Preferred language for notices: </label>
935 <select id="lang" name="lang">
936 <option value="default">Default</option>
937 [% FOR language IN languages %]
938 [% FOR sublanguage IN language.sublanguages_loop %]
939 [% IF language.plural %]
940 [% IF sublanguage.rfc4646_subtag == lang %]
941 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
943 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
946 [% IF sublanguage.rfc4646_subtag == lang %]
947 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
949 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
951 [% END # /IF language.plural %]
952 [% END # /FOR sublanguage %]
953 [% END #/FOR language %]
954 </select> <!-- /#lang -->
956 [% END #/IF Koha.Preference('TranslateNotices') %]
958 </fieldset> <!-- /#memberentry_library_management -->
960 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
961 <fieldset class="rows" id="memberentry_subscription">
962 <legend id="library_setup_lgd">Library set-up</legend><ol>
963 [% UNLESS nodateenrolled %]
965 [% IF ( mandatorydateenrolled ) %]
966 <label for="from" class="required">
972 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
973 [% IF ( mandatorydateenrolled ) %]
974 <span class="required">Required</span>
976 [% IF ( ERROR_dateenrolled ) %]
977 <span class="required">(Error)</span>
979 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
981 [% END # /UNLESS nodateenrolled %]
983 [% UNLESS nodateexpiry %]
986 <li style="display:none">
988 [% IF ( mandatorydateexpiry ) %]
989 <label for="to" class="required">
993 Expiry date (leave blank for auto calc):
995 [% UNLESS ( opadd ) %]
996 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
998 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
1000 [% IF ( mandatorydateexpiry ) %]
1001 <span class="required">Required</span>
1003 [% IF ( ERROR_dateexpiry ) %]
1004 <span class="required">(Error)</span>
1006 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1009 [% UNLESS noopacnote %]
1011 [% IF ( mandatoryopacnote ) %]
1012 <label for="opacnote" class="required">
1014 <label for="opacnote">
1018 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1019 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1020 [% IF ( mandatoryopacnote ) %]
1021 <span class="required">Required</span>
1024 [% END # /UNLESS noopacnote %]
1026 [% UNLESS noborrowernotes %]
1028 [% IF ( mandatoryborrowernotes ) %]
1029 <label for="borrowernotes" class="required">
1031 <label for="borrowernotes">
1035 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1036 <div class="hint">This message displays when checking out to this patron</div>
1037 [% IF ( mandatoryborrowernotes ) %]
1038 <span class="required">Required</span>
1041 [% END # /UNLESS noborrowernotes %]
1043 </fieldset> <!-- /#memberentry_subscription -->
1044 [% END # hide fieldset %]
1046 [% UNLESS nouserid && nopassword %]
1047 <fieldset class="rows" id="memberentry_userid">
1048 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1050 [% UNLESS nouserid %]
1052 [% IF ( mandatoryuserid ) %]
1053 <label for="userid" class="required">
1055 <label for="userid">
1060 [% IF ( NoUpdateLogin ) %]
1061 [% IF ( opduplicate ) %]
1062 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1064 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1067 [% IF ( opduplicate ) %]
1068 <input type="text" id="userid" name="userid" size="20" value="" />
1070 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1072 [% END # /IF ( NoUpdateLogin ) %]
1074 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1075 <input type="text" disabled="disabled" style="display:none" />
1077 [% IF ( mandatoryuserid ) %]
1078 <span class="required">Required</span>
1081 [% END # /UNLESS nouserid %]
1083 [% UNLESS nopassword %]
1085 [% IF ( mandatorypassword ) %]
1086 <label for="password" class="required">
1088 <label for="password">
1093 [% IF ( NoUpdateLogin ) %]
1094 [% IF ( opduplicate ) %]
1095 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1097 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1100 [% IF ( opduplicate ) %]
1101 <input type="password" id="password" name="password" size="20" />
1103 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1105 [% END # /IF ( NoUpdateLogin ) %]
1106 [% ELSE # IF ( opadd ) %]
1108 [% IF ( password ) %]
1109 [% IF ( NoUpdateLogin ) %]
1110 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1112 [% IF ( opduplicate ) %]
1113 <input type="password" id="password" name="password" size="20" />
1115 <input type="password" id="password" name="password" size="20" value="****" />
1119 [% IF ( NoUpdateLogin ) %]
1120 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1122 <input type="password" id="password" name="password" size="20" value="" />
1124 [% END # /IF ( password ) %]
1125 [% END # /IF ( opadd ) %]
1126 [% IF ( mandatorypassword ) %]
1127 <span class="required">Required</span>
1129 [% IF ( ERROR_password_too_short ) %]
1130 <span class="required">Password is too short</span>
1132 [% IF ( ERROR_password_too_weak ) %]
1133 <span class="required">Password is too weak</span>
1135 [% IF ( ERROR_password_has_whitespaces ) %]
1136 <span class="required">Password has leading or trailing whitespaces</span>
1138 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1142 [% IF ( mandatorypassword ) %]
1143 <label for="password2" class="required">
1145 <label for="password2">
1150 [% IF ( NoUpdateLogin ) %]
1151 [% IF ( opduplicate ) %]
1152 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1154 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1157 [% IF ( opduplicate ) %]
1158 <input type="password" id="password2" name="password2" size="20" />
1160 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1163 [% ELSE # IF ( opadd ) %]
1164 [% IF ( password ) %]
1165 [% IF ( NoUpdateLogin ) %]
1166 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1168 [% IF ( opduplicate ) %]
1169 <input type="password" id="password2" name="password2" size="20" />
1171 <input type="password" id="password2" name="password2" size="20" value="****" />
1175 [% IF ( NoUpdateLogin ) %]
1176 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1178 <input type="password" id="password2" name="password2" size="20" value="" />
1181 [% END # /IF ( opadd ) %]
1183 [% IF ( mandatorypassword ) %]
1184 <span class="required">Required</span>
1186 [% IF ( ERROR_password_mismatch ) %]
1187 <span class="required">Passwords do not match</span>
1190 [% END # /UNLESS nopassword %]
1192 </fieldset> <!-- /#memberentry_userid -->
1193 [% END # UNLESS nouserid && nopassword %]
1195 <!--this zones are not necessary in modif mode -->
1196 [% UNLESS ( opadd || opduplicate ) %]
1197 <fieldset class="rows" id="memberentry_account_flags">
1198 <legend id="account_flags_lgd">Patron account flags</legend>
1200 [% FOREACH flagloo IN flagloop %]
1202 <label class="radio" for="yes[% flagloo.name | html %]">
1203 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1204 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1206 [% IF CAN_user_circulate_manage_restrictions %]
1207 <label for="yes[% flagloo.name | html %]">
1208 [% IF ( flagloo.yes ) %]
1209 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1211 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1215 <label for="no[% flagloo.name | html %]">
1216 [% IF ( flagloo.no ) %]
1217 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1219 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1224 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1225 [% END # /IF CAN_user_circulate_manage_restrictions %]
1227 [% END # /FOREACH flagloo %]
1229 </fieldset> <!-- /#memberentry_account_flags -->
1231 <fieldset class="rows" id="memberentry_restrictions">
1232 <legend id="restrictions_lgd">Patron restrictions</legend>
1233 [% IF ( debarments ) %]
1240 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1241 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1247 [% FOREACH d IN debarments %]
1249 <td>[% d.type | html %]</td>
1251 [% IF d.comment.search('OVERDUES_PROCESS') %]
1252 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1254 [% d.comment | $raw %]
1258 [% IF d.expiration %]
1259 [% d.expiration | $KohaDates %]
1264 <td>[% d.created | $KohaDates %]</td>
1265 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1267 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1271 [% END # /FOREACH d %]
1275 <p>Patron is currently unrestricted.</p>
1276 [% END # /IF ( debarments ) %]
1278 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1279 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1280 <fieldset id="manual_restriction_form">
1281 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1282 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1285 <label for="debarred_comment">Comment: </label>
1286 <input type="text" id="debarred_comment" name="debarred_comment" />
1289 <label for="debarred_expiration">Expiration: </label>
1290 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1291 <a href="#" id="clear_debarred_expiration">Clear date</a>
1295 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1297 </fieldset> <!-- /#manual_restriction_form -->
1298 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1299 </fieldset> <!-- /#memberentry_restrictions -->
1300 [% END # /UNLESS ( opadd || opduplicate ) %]
1301 [% END # /IF ( step_3 ) %]
1304 [% IF Koha.Preference('HouseboundModule') %]
1305 <fieldset class="rows" id="memberentry_housebound_roles">
1306 <legend id="housebound_roles">Housebound roles</legend>
1309 <label class="radio" for="housebound_chooser">
1312 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1313 <label for="yes_housebound_chooser">Yes </label>
1314 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1315 <label for="no_housebound_chooser">No </label>
1316 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1318 <label for="yes_housebound_chooser">Yes </label>
1319 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1320 <label for="no_housebound_chooser">No </label>
1321 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1325 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1326 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1327 <label for="yes_housebound_deliverer">Yes </label>
1328 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1329 <label for="no_housebound_deliverer">No </label>
1330 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1332 <label for="yes_housebound_deliverer">Yes </label>
1333 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1334 <label for="no_housebound_deliverer">No </label>
1335 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1338 </ol> <!-- /ol.radio -->
1339 </fieldset> <!-- /#memberentry_housebound_roles -->
1340 [% END # hide fieldset %]
1341 [% END # IF step_7 %]
1344 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1345 [% UNLESS ( no_patron_attribute_types ) %]
1346 <fieldset class="rows" id="memberentry_patron_attributes">
1347 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1348 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1349 [% FOREACH pa_loo IN patron_attributes %]
1350 <ol class="attributes_table">
1351 [% IF pa_loo.class %]
1352 <fieldset id="aai_[% pa_loo.class | html %]">
1353 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1355 [% FOREACH patron_attribute IN pa_loo.items %]
1356 <li data-category_code="[% patron_attribute.category_code | html %]">
1357 <label for="[% patron_attribute.form_id | html %]">
1358 [% patron_attribute.description | html %]:
1360 [% IF ( patron_attribute.use_dropdown ) %]
1361 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1362 <option value=""></option>
1363 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1364 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1365 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1366 [% auth_val_loo.lib | html %]
1369 <option value="[% auth_val_loo.authorised_value | html %]" >
1370 [% auth_val_loo.lib | html %]
1376 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1377 [% END # /IF ( patron_attribute.use_dropdown ) %]
1378 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1379 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1380 [% IF ( patron_attribute.repeatable ) %]
1381 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1384 [% END # /FOREACH patron_attribute %]
1385 [% IF pa_loo.class %]</fieldset>[% END %]
1387 [% END # /FOREACH pa_loo %]
1388 </fieldset> <!-- /#memberentry_patron_attributes -->
1389 [% END # UNLESS ( no_patron_attribute_types ) %]
1390 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1391 [% END # IF ( step_4 ) %]
1394 [% IF ( EnhancedMessagingPreferences ) %]
1395 <fieldset class="rows" id="memberentry_messaging_prefs">
1396 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1397 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1398 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1400 <input type="hidden" name="setting_messaging_prefs" value="1" />
1401 [% INCLUDE 'messaging-preference-form.inc' %]
1402 [% IF ( SMSSendDriver ) %]
1404 <label for="SMSnumber">SMS number:</label>
1405 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1406 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1408 [% UNLESS nosms_provider_id %]
1410 <label for="sms_provider_id">SMS provider:</label>
1411 <select id="sms_provider_id" name="sms_provider_id">
1412 <option value="">Unknown</option>
1413 [% FOREACH s IN sms_providers %]
1414 [% IF s.id == sms_provider_id %]
1415 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1417 <option value="[% s.id | html %]">[% s.name | html %]</option>
1422 [% END # /UNLESS nosms_provider_id %]
1423 [% END # IF ( SMSSendDriver ) %]
1425 [% END # IF ( EnhancedMessagingPreferences ) %]
1426 [% END # /IF step_5 %]
1427 </form> <!-- /#entryform -->
1429 [% IF quickadd && opadd && !check_member %]
1430 <form id="quick_add_form" class="toggler">
1431 <fieldset class="rows quick_add"><legend>Quick add</legend>
1432 <ol id="quick_add_list">
1438 [% END # /UNLESS ( no_add ) %]
1440 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1442 [% UNLESS ( opadd ) %]
1443 <div class="col-sm-2 col-sm-pull-10">
1445 [% INCLUDE 'circ-menu.inc' %]
1447 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1449 </div> <!-- /.row -->
1451 [% MACRO jsinclude BLOCK %]
1452 [% Asset.js("lib/hc-sticky.js") | $raw %]
1453 [% INCLUDE 'calendar.inc' %]
1454 [% INCLUDE 'str/members-menu.inc' %]
1455 [% Asset.js("js/members-menu.js") | $raw %]
1457 function update_cardnumber_warning(size){
1458 var max_len = [% maxlength_cardnumber | html %];
1459 if ( size >= max_len ) {
1460 $("#cn_max").show();
1462 $("#cn_max").hide();
1466 function showHideFields(){
1467 [% UNLESS step == 1 %]
1468 [% IF fieldstohide.match('identity') %]
1469 $("#memberentry_identity").find('legend').nextAll().toggle();
1471 [% IF show_guarantor || guarantor %]
1472 [% IF fieldstohide.match('guarantor') %]
1473 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1474 $("#guarantor_template").toggle();
1477 [% IF fieldstohide.match('primary_address') %]
1478 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1480 [% IF fieldstohide.match('primary_contact') %]
1481 $("#memberentry_contact").find('legend').nextAll().toggle();
1484 [% UNLESS step == 6 %]
1485 [% IF fieldstohide.match('alt_address') %]
1486 $("#memberentry_address").find('legend').nextAll().toggle();
1489 [% UNLESS step == 2 %]
1490 [% IF fieldstohide.match('alt_contact') %]
1491 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1494 [% UNLESS step == 3 %]
1495 [% IF fieldstohide.match('lib_mgmt') %]
1496 $("#memberentry_library_management").find('legend').nextAll().toggle();
1498 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1499 [% IF fieldstohide.match('lib_setup') %]
1500 $("#memberentry_subscription").find('legend').nextAll().toggle();
1503 [% UNLESS nouserid && nopassword %]
1504 [% IF fieldstohide.match('login') %]
1505 $("#memberentry_userid").find('legend').nextAll().toggle();
1508 [% UNLESS ( opadd || opduplicate ) %]
1509 [% IF fieldstohide.match('flags') %]
1510 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1513 [% IF fieldstohide.match('debarments') %]
1514 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1517 [% UNLESS step == 7 %]
1518 [% IF Koha.Preference('HouseboundModule') %]
1519 [% IF fieldstohide.match('housebound') %]
1520 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1524 [% UNLESS step == 4 %]
1525 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1526 [% IF fieldstohide.match('additional') %]
1527 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1531 [% UNLESS step == 5 %]
1532 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1533 [% IF fieldstohide.match('messaging') %]
1534 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1535 $("#messaging_prefs_loading").toggle();
1541 $(document).ready(function() {
1543 $("#toggle_hidden_fields").change(function(){
1547 $("legend").click(function(){
1548 $(this).nextAll().toggle();
1549 $("#messaging_prefs_loading").hide();
1552 $("#saverecord").css({ 'margin-left': 0 });
1554 Sticky = $("#toolbar");
1557 stickyClass: "floating"
1560 [% IF categorycode %]
1561 update_category_code( "[% categorycode | html %]" );
1563 if ( $("#categorycode_entry").length > 0 ){
1564 var category_code = $("#categorycode_entry").find("option:selected").val();
1565 update_category_code( category_code );
1569 [% IF new_guarantors %]
1570 [% FOREACH g IN new_guarantors %]
1571 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1575 $("#cn_max").hide();
1577 $("#cardnumber").on("keydown", function(e){
1578 content = $(this).val();
1580 $("#cardnumber").on("keyup", function(e){
1581 // .val() will return the value of the input after the key has been released
1582 var l = $(this).val().length;
1583 if ( l == content.length + 1 ) { l--; }
1584 update_cardnumber_warning(l);
1586 $("#cardnumber").bind("paste", function(e){
1587 var pastedData = e.originalEvent.clipboardData.getData('text');
1588 update_cardnumber_warning(pastedData.length - 1);
1590 var toggle_quick_add = $(".toggle_quick_add");
1591 $(toggle_quick_add).click(function(e){
1592 toggle_quick_add.toggle();
1595 var toggle_from = '';
1596 if( $("#entryform:visible").length ) {
1597 toggle_to = "#quick_add_form label";
1598 toggle_from = "#entryform label";
1599 $("#memberentry_guarantor").appendTo("#quick_add_form");
1601 toggle_to="#entryform label";
1602 toggle_from = "#quick_add_form label";
1603 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1605 $(toggle_from).each(function() {
1606 var input_label = $(this).attr('for');
1607 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1608 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1611 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1614 $(".toggler").toggle();
1617 $("#save_quick_add").click(function(){
1618 $("#quick_add_form").validate();
1619 if( $("#quick_add_form").valid()){
1620 $('.toggle_quick_add').click();
1621 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1622 $('#saverecord').click();
1624 else {return false;}
1627 $("#saverecord").click(function(){
1628 if( check_form_borrowers() ){
1629 $("#entryform").submit();
1633 $('#duplicate').on('click', function() {
1634 $("input[name='op']").val('modify');
1635 $("input[name='borrowernumber']").val('[% check_member | html %]');
1636 $("input[name='check_member']").val('');
1637 $('#entryform').submit();
1640 $('#not-duplicate').on('click', function() {
1641 $("input[name='nodouble']").val('1');
1642 $('#entryform').submit();
1645 $(".popup_patronview").on("click", function(e){
1647 var url = $(this).attr("href");
1648 openWindow( url, "patronview" );
1651 $("#dateofbirth").on("change", function(){
1655 $("#debarred_comment, #debarred_expiration").on("change", function(){
1656 $("#add_debarment").val(1);
1659 $("#clear_debarred_expiration").on("click", function(e){
1661 $('#debarred_expiration').val("");
1664 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1666 clear_entry( this );
1669 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1671 clone_entry( this );
1674 $("#categorycode_entry").on("change", function(){
1675 update_category_code(this);
1679 var MSG_SEPARATOR = _("Separator must be / in field %s");
1680 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1681 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1682 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1683 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1684 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1685 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1686 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1687 var MSG_MONTH = _("%s month")
1688 var MSG_MONTHS = _("%s months")
1689 var MSG_YEAR = _("%s year")
1690 var MSG_YEARS = _("%s years")
1691 var LABEL_CHANGE = _("Change");
1692 var LABEL_SET_TO_PATRON = _("Set to patron");
1693 var LABEL_AGE = _("Age");
1694 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1696 [% IF quickadd && opadd && !check_member %]
1697 $(document).ready(function () {
1699 $("#entryform,#saverecord").hide();
1700 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1701 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1702 $("#entryform label").each(function () {
1703 var input_label = $(this).attr('for');
1704 if ( input_label == 'sex-female' ) {
1707 else if ( input_label == 'btitle' ) {
1708 input_label='title';
1710 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1711 $(this).parent().clone().appendTo("#quick_add_list");
1712 [% UNLESS mandatorypassword %]
1713 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1717 if ( $("#memberentry_guarantor").length ) {
1718 $("#memberentry_guarantor").appendTo("#quick_add_form");
1720 $("#quick_add_form").show();
1723 $("#guarantor_template").hide();
1726 [% Asset.js("js/members.js") | $raw %]
1727 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1728 [% PROCESS 'password_check.inc' %]
1729 [% PROCESS 'add_password_check' new_password => 'password' %]
1732 [% INCLUDE 'intranet-bottom.inc' %]