1 [% PROCESS 'i18n.inc' %]
8 [% PROCESS 'member-alt-address-style.inc' %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Patrons ›
12 [% UNLESS blocking_error %]
15 [% ELSIF ( opduplicate ) %]
20 [% INCLUDE 'patron-title.inc' no_html = 1 %]
21 [% IF categoryname %]([% categoryname | html %])[% END %]
29 [% INCLUDE 'doc-head-close.inc' %]
32 <body id="pat_memberentrygen" class="pat">
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'patron-search.inc' %]
36 <div id="breadcrumbs">
37 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
38 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
39 [% UNLESS blocking_error %]
41 [% IF (firstname || surname ) %]
42 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
43 [% INCLUDE 'patron-title.inc' %]
49 [% ELSIF ( opduplicate ) %]
54 [% IF categoryname %]([% categoryname | html %])[% END %]
57 </div> <!-- /#breadcrumbs -->
59 <div class="main container-fluid">
62 [% FOR message IN messages %]
63 [% SWITCH message.error %]
64 [% CASE 'error_on_insert_patron' %]
65 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
66 [% CASE 'error_on_update_patron' %]
67 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
68 [% CASE %]Unhandled error: [% message.error | html %]
73 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
75 <div class="col-sm-10 col-sm-push-2">
77 <main class="clearfix">
78 [% INCLUDE 'blocking_errors.inc' %]
81 [% IF ( error_alert == "no_email" ) %]
82 <div class="dialog alert">This member has no email</div>
84 <div class="dialog alert">[% error_alert | html %]</div>
88 <div class="dialog message">Email has been sent.</div>
91 [% INCLUDE 'noadd-warnings.inc' %]
93 [% UNLESS ( no_add ) %]
97 [% ELSIF ( opduplicate ) %]
102 [% INCLUDE 'patron-title.inc' %]
103 [% IF categoryname %]([% categoryname | html %])[% END %]
106 [% IF quickadd && opadd && !check_member %]
107 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
108 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
111 [% IF ( check_member ) %]
112 <div class="dialog alert">
113 <h3>Duplicate patron record?</h3>
114 <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>
115 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
116 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
121 <div class="dialog alert">
122 <p>The following fields are wrong. Please fix them.</p>
124 [% IF ( ERROR_login_exist ) %]
125 <li id="ERROR_login_exist">Username/password already exists.</li>
127 [% IF ERROR_cardnumber_already_exists %]
128 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
130 [% IF ERROR_cardnumber_length %]
131 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
133 [% IF ( ERROR_age_limitations ) %]
134 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
135 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
137 [% IF ( ERROR_branch ) %]
138 <li id="ERROR_branch">Library is invalid.</li>
140 [% IF ( ERROR_dateofbirth ) %]
141 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
143 [% IF ( ERROR_dateenrolled ) %]
144 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
146 [% IF ( ERROR_dateexpiry ) %]
147 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
149 [% IF ( ERROR_password_too_short ) %]
150 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
152 [% IF ( ERROR_password_too_weak ) %]
153 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
155 [% IF ( ERROR_password_has_whitespaces ) %]
156 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
158 [% IF ( ERROR_password_mismatch ) %]
159 <li id="ERROR_password_mismatch">Passwords do not match.</li>
161 [% IF ( ERROR_extended_unique_id_failed ) %]
162 <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>
164 [% IF ERROR_bad_email %]
165 <li id="ERROR_bad_email">The primary email is invalid.</li>
167 [% IF ERROR_bad_email_secondary %]
168 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
170 [% IF ERROR_bad_email_alternative %]
171 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
177 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
178 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
180 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
181 [% FOREACH field IN fieldstohide.split(',') %]
183 [% CASE 'identity' %] Organization/Patron identity |
184 [% CASE 'guarantor' %] Guarantor information |
185 [% CASE 'primary_address' %] Main address |
186 [% CASE 'primary_contact' %] Contact information |
187 [% CASE 'alt_address' %] Alternate address |
188 [% CASE 'alt_contact' %] Alternate contact |
189 [% CASE 'lib_mgmt' %] Library management |
190 [% CASE 'lib_setup' %] Library setup |
191 [% CASE 'login' %] OPAC/Staff login |
192 [% CASE 'flags' %] Patron account flags |
193 [% CASE 'debarments' %] Patron restrictions |
194 [% CASE 'housebound' %] Housebound roles |
195 [% CASE 'additional' %] Additional attributes and identifiers |
196 [% CASE 'messaging' %] Patron messaging preferences |
202 [% UNLESS ( check_member ) %]
203 <div id="toolbar" class="btn-toolbar">
204 [% IF quickadd && opadd %]
205 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
207 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
209 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
211 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
213 <i class="fa fa-times"></i> Cancel
218 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
219 [% UNLESS ( check_member ) %]
220 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
222 <!-- field always hidden in different form (1,2,3) -->
223 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
224 <input type="hidden" name="category_type" value="[% category_type | html %]" />
225 <input type="hidden" name="updtype" value="[% updtype | html %]" />
226 <input type="hidden" name="destination" value="[% destination | html %]" />
227 <input type="hidden" name="check_member" value="[% check_member | html %]" />
228 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
229 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
230 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
232 <input type="hidden" name="step" value="[% step | html %]" />
235 <input type="hidden" name="op" value="insert" />
236 [% ELSIF ( opduplicate ) %]
237 <input type="hidden" name="op" value="insert" />
239 <input type="hidden" name="op" value="save" />
240 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
241 [%# Only put the cardnumber if we arent showing it in the form later %]
243 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
249 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
250 <fieldset class="rows" id="memberentry_identity">
251 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
255 [% IF Koha.Preference('BorrowersTitles') %]
257 [% IF ( mandatorytitle ) %]
258 <label for="btitle" class="required">
263 <select id="btitle" name="title">
264 <option value=""></option>
265 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
267 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
269 <option value="[% t | html %]">[% t | html %]</option>
273 [% IF ( mandatorytitle ) %]
274 <span class="required">Required</span>
277 [% END # /IF Koha.Preference('BorrowersTitles') %]
278 [% END # /UNLESS notitle %]
279 [% END # /UNLESS ( I ) %]
281 [% UNLESS nosurname %]
284 <label for="surname" class="required">
288 [% IF ( mandatorysurname ) %]
289 <label for="surname" class="required">
291 <label for="surname">
296 [% IF ( uppercasesurnames ) %]
297 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
299 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
301 [% IF ( mandatorysurname ) %]
302 <span class="required">Required</span>
305 [% END # /UNLESS nosurname %]
308 [% UNLESS nofirstname %]
310 [% IF ( mandatoryfirstname ) %]
311 <label for="firstname" class="required">
313 <label for="firstname">
317 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
318 [% IF ( mandatoryfirstname ) %]
319 <span class="required">Required</span>
322 [% END #/UNLESS nofirstname %]
323 [% UNLESS nodateofbirth %]
325 [% IF ( mandatorydateofbirth ) %]
326 <label for="dateofbirth" class="required">
328 <label for="dateofbirth">
332 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
333 [% IF ( mandatorydateofbirth ) %]
334 <span class="required">Required</span>
336 [% IF ( ERROR_dateofbirth ) %]
337 <span class="required">(Error)</span>
339 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
341 [% END # /UNLESS nodateofbirth %]
342 [% UNLESS noinitials %]
344 [% IF ( mandatoryinitials ) %]
345 <label for="initials" class="required">
347 <label for="initials">
351 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
352 [% IF ( mandatoryinitials ) %]
353 <span class="required">Required</span>
356 [% END # /UNLESS noinitials %]
357 [% END #/UNLESS ( I ) %]
358 [% UNLESS noothernames %]
360 [% IF ( mandatoryothernames ) %]
361 <label for="othernames" class="required">
363 <label for="othernames">
367 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
368 [% IF ( mandatoryothernames ) %]
369 <span class="required">Required</span>
371 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
373 [% END #/UNLESS noothernames %]
378 [% UNLESS ( opduplicate ) %]
380 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
382 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
385 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
387 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
390 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
392 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
395 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
396 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
397 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
398 [% END # /UNLESS ( opduplicate )%]
400 [% END # /UNLESS nosex %]
401 [% END # /UNLESS ( I ) %]
403 </fieldset> <!-- /#memberentry_identity -->
404 [% END # hide fieldset %]
406 [% IF show_guarantor || guarantor %]
407 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
408 <span id="memberentry_guarantor_anchor">
409 <fieldset id="memberentry_guarantor" class="rows">
410 <legend>Guarantor information</legend>
412 <span id="guarantor_relationships">
413 [% FOREACH r IN relationships %]
414 <fieldset class="rows">
416 [% IF category_type == 'I' %]
417 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
418 <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 %]
422 <label for="guarantor_surname">Organization name: </label>
423 <span>[% r.guarantor.surname | html %]</span>
426 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
427 <span class="label">Patron card number:</span>
428 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
431 [% IF r.guarantor.surname %]
433 <label for="guarantor_surname">Surname: </label>
434 <span>[% r.guarantor.surname | html %]</span>
438 [% IF r.guarantor.firstname %]
440 <label for="guarantor_firstname">First name: </label>
441 <span>[% r.guarantor.firstname | html %]</span>
446 <label for="relationship">Relationship: </label>
447 <span>[% r.relationship | html %]</span>
451 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
452 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
457 [% END # END relationships foreach %]
458 [% IF guarantor && (!relationships) %]
459 <fieldset class="rows">
461 <li class="guarantor-details" data-borrowernumber="0">
462 <span class="label">Patron card number:</span>
463 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
464 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
468 <label for="guarantor_surname">Surname: </label>
469 <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
473 <label for="guarantor_firstname">First name: </label>
474 <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
478 <label for="guarantor_relationship">Relationship: </label>
479 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
480 [% FOREACH pr IN possible_relationships.split('\|') %]
481 <option value="[% pr | html %]">[% pr | html %]</option>
487 <label for="guarantor_cancel"> </label>
488 <span><a href="#" class="guarantor_cancel">Remove</a></span>
493 </span> <!-- #/guarantor_relationships -->
495 <fieldset class="rows guarantor" id="guarantor_template">
497 <li class="guarantor-details" data-borrowernumber="0">
498 <span class="label">Patron card number:</span>
499 <span class="new_guarantor_id_text"></span>
500 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
504 <label for="guarantor_surname">Surname: </label>
505 <span class="new_guarantor_surname_text"></span>
509 <label for="guarantor_firstname">First name: </label>
510 <span class="new_guarantor_firstname_text"></span>
514 <label for="guarantor_relationship">Relationship: </label>
515 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
516 [% FOREACH pr IN possible_relationships.split('\|') %]
517 <option value="[% pr | html %]">[% pr | html %]</option>
523 <label for="guarantor_cancel"> </label>
524 <span><a href="#" class="guarantor_cancel">Remove</a></span>
530 <input type="hidden" id="guarantor_id" value="" />
531 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
532 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
535 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
538 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
540 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
541 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
542 [% IF privacy_guarantor_checkouts %]
543 <option value="0">No</option>
544 <option value="1" selected>Yes</option>
546 <option value="0" selected>No</option>
547 <option value="1">Yes</option>
550 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
553 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
555 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
556 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
557 [% IF privacy_guarantor_fines %]
558 <option value="0">No</option>
559 <option value="1" selected>Yes</option>
561 <option value="0" selected>No</option>
562 <option value="1">Yes</option>
565 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
569 </fieldset> <!-- /#memberentry_guarantor -->
570 </span> <!-- #/memberentry_guarantor_anchor -->
571 [% END # /IF show_guarantor || guarantor %]
573 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
574 [% IF Koha.Preference( 'AddressFormat' ) %]
575 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
577 [% INCLUDE 'member-main-address-style-us.inc' %]
579 [% END # /UNLESS nostreet && nocity etc group%]
581 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
582 <fieldset class="rows" id="memberentry_contact">
583 <legend id="contact_lgd">Contact</legend>
585 [% UNLESS nocontactname %]
587 [% IF ( mandatorycontactname ) %]
588 <label for="contactname" class="required">
590 <label for="contactname">
594 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
595 [% IF ( mandatorycontactname ) %]
596 <span class="required">Required</span>
598 <div class="hint">Non-patron guarantor surname</div>
600 [% END # /UNLESS nocontactname %]
602 [% UNLESS nocontactfirstname %]
604 [% IF ( mandatorycontactfirstname ) %]
605 <label for="contactfirstname" class="required">
607 <label for="contactfirstname">
609 Guarantor first name:
611 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
612 [% IF ( mandatorycontactfirstname ) %]
613 <span class="required">Required</span>
615 <div class="hint">Non-patron guarantor first name</div>
617 [% END # /UNLESS noaltcontactfirstname %]
619 [% UNLESS norelationship %]
620 [% IF possible_relationships %]
622 <label for="relationship">Relationship: </label>
623 <select class="relationship" name="relationship">
624 <option value=""></option>
625 [% FOREACH pr IN possible_relationships.split('\|') %]
626 [% IF pr == relationship %]
627 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
629 <option value="[% pr | html %]">[% pr | html %]</option>
634 [% END #/IF possible_relationships %]
635 [% END # /UNLESS norelationship %]
639 [% IF ( mandatoryphone ) %]
640 <label for="phone" class="required">
646 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
647 [% IF ( mandatoryphone ) %]
648 <span class="required">Required</span>
650 <div class="hint">Shows on transit slips</div>
652 [% END # /UNLESS nophone %]
654 [% UNLESS nophonepro %]
656 [% IF ( mandatoryphonepro ) %]
657 <label for="phonepro" class="required">
659 <label for="phonepro">
663 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
664 [% IF ( mandatoryphonepro ) %]
665 <span class="required">Required</span>
668 [% END # /UNLESS nophonepro %]
670 [% UNLESS nomobile %]
672 [% IF ( mandatorymobile ) %]
673 <label for="mobile" class="required">
679 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
680 [% IF ( mandatorymobile ) %]
681 <span class="required">Required</span>
684 [% END # /UNLESS nomobile %]
688 [% IF ( mandatoryemail ) %]
689 <label for="email" class="required">
695 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
696 [% IF ( mandatoryemail ) %]
697 <span class="required">Required</span>
699 <div class="hint">Shows on transit slips</div>
701 [% END #/UNLESS noemail %]
703 [% UNLESS noemailpro %]
705 [% IF ( mandatoryemailpro ) %]
706 <label for="emailpro" class="required">
708 <label for="emailpro">
712 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
713 [% IF ( mandatoryemailpro ) %]
714 <span class="required">Required</span>
717 [% END # /UNLESS noemailpro %]
721 [% IF ( mandatoryfax ) %]
722 <label for="fax" class="required">
728 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
729 [% IF ( mandatoryfax ) %]
730 <span class="required">Required</span>
733 [% END #/UNLESS nofax %]
735 </fieldset> <!-- /#memberentry_contact -->
736 [% END # hide fieldset %]
738 <!-- ************************ STEP_1 *********************** -->
739 [% END # /IF ( step_1 ) %]
742 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
743 [% PROCESS 'alt-address-style' %]
744 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
745 [% END # /IF ( step_6 ) %]
748 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
749 [% IF Koha.Preference( 'AddressFormat' ) %]
750 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
752 [% INCLUDE 'member-alt-contact-style-us.inc' %]
754 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
755 [% END # /IF ( step_2 ) %]
758 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
759 <fieldset class="rows" id="memberentry_library_management">
760 <legend id="library_management_lgd">Library management</legend>
762 [% UNLESS nocardnumber %]
764 [% IF mandatorycardnumber %]
765 <label for="cardnumber" class="required">
767 <label for="cardnumber" class="validated">
772 <!-- NOTE: div.hint closing tag isn't on the same line -->
773 [% IF minlength_cardnumber == maxlength_cardnumber %]
774 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
775 [% IF mandatorycardnumber %]
776 <span class="required">Required</span>
778 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
779 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
780 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
781 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
782 [% IF mandatorycardnumber %]
783 <span class="required">Required</span>
785 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
786 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
787 [% ELSIF maxlength_cardnumber %]
788 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
789 [% IF mandatorycardnumber %]
790 <span class="required">Required</span>
792 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
793 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
795 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
796 [% IF mandatorycardnumber %]
797 <span class="required">Required</span>
799 <div class="hint">There is no minimum or maximum character length.
801 [% IF autoMemberNum %]
802 [% IF mandatorycardnumber %]
803 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
805 <br/>Leave blank for auto calc during registration
808 </div><!--/div.hint -->
810 [% END # /UNLESS nocardnumber %]
812 [% UNLESS nobranchcode %]
814 <label for="libraries" class="required">Library:</label>
815 <select name="branchcode" size="1" id="libraries">
816 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
818 <span class="required">Required</span>
823 <label for="categorycode_entry" class="required">Category: </label>
824 <select id="categorycode_entry" name="categorycode">
825 [% FOREACH typeloo IN typeloop %]
826 [% FOREACH categoryloo IN typeloo.categoryloop %]
827 [% IF ( loop.first ) %]
828 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
829 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
830 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
831 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
832 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
833 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
835 [% IF ( categoryloo.categorycodeselected ) %]
836 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
838 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
840 [% IF ( loop.last ) %]
843 [% END # /FOREACH categoryloo %]
844 [% END # /FOREACH typeloo %]
846 <span class="required">Required</span>
851 [% IF ( mandatorysort1 ) %]
852 <label for="sort1" class="required">
858 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
859 [% IF ( mandatorysort1 ) %]
860 <span class="required">Required</span>
863 [% END # /UNLESS nosort1 %]
867 [% IF ( mandatorysort2 ) %]
868 <label for="sort2" class="required">
874 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
875 [% IF ( mandatorysort2 ) %]
876 <span class="required">Required</span>
879 [% END # /UNLESS nosort2 %]
881 [% UNLESS noautorenew_checkouts %]
883 <label for="yes-autorenew_checkouts">
884 Allow auto-renewal of items:
886 [% IF ( autorenew_checkouts || opadd ) %]
887 <label for="yes-autorenew_checkouts">
889 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
891 <label for="no-autorenew_checkouts">
893 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
896 <label for="yes-autorenew_checkouts">
898 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
900 <label for="no-autorenew_checkouts">
902 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
908 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
910 <label for="checkprevcheckout">Check for previous checkouts: </label>
911 <select name="checkprevcheckout" id="checkprevcheckout">
912 [% IF ( checkprevcheckout == 'yes' ) %]
913 <option value="yes" selected="selected">Yes if settings allow it</option>
914 <option value="no">No if settings allow it</option>
915 <option value="inherit">Inherit from settings</option>
916 [% ELSIF ( checkprevcheckout == 'no' ) %]
917 <option value="yes">Yes if settings allow it</option>
918 <option value="no" selected="selected">No if settings allow it</option>
919 <option value="inherit">Inherit from settings</option>
921 <option value="yes">Yes if settings allow it</option>
922 <option value="no">No if settings allow it</option>
923 <option value="inherit" selected="selected">Inherit from settings</option>
927 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
929 [% IF Koha.Preference('TranslateNotices') %]
931 <label for="lang">Preferred language for notices: </label>
932 <select id="lang" name="lang">
933 <option value="default">Default</option>
934 [% FOR language IN languages %]
935 [% FOR sublanguage IN language.sublanguages_loop %]
936 [% IF language.plural %]
937 [% IF sublanguage.rfc4646_subtag == lang %]
938 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
940 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
943 [% IF sublanguage.rfc4646_subtag == lang %]
944 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
946 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
948 [% END # /IF language.plural %]
949 [% END # /FOR sublanguage %]
950 [% END #/FOR language %]
951 </select> <!-- /#lang -->
953 [% END #/IF Koha.Preference('TranslateNotices') %]
955 </fieldset> <!-- /#memberentry_library_management -->
957 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
958 <fieldset class="rows" id="memberentry_subscription">
959 <legend id="library_setup_lgd">Library set-up</legend><ol>
960 [% UNLESS nodateenrolled %]
962 [% IF ( mandatorydateenrolled ) %]
963 <label for="from" class="required">
969 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
970 [% IF ( mandatorydateenrolled ) %]
971 <span class="required">Required</span>
973 [% IF ( ERROR_dateenrolled ) %]
974 <span class="required">(Error)</span>
976 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
978 [% END # /UNLESS nodateenrolled %]
980 [% UNLESS nodateexpiry %]
983 <li style="display:none">
985 [% IF ( mandatorydateexpiry ) %]
986 <label for="to" class="required">
990 Expiry date (leave blank for auto calc):
992 [% UNLESS ( opadd ) %]
993 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
995 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
997 [% IF ( mandatorydateexpiry ) %]
998 <span class="required">Required</span>
1000 [% IF ( ERROR_dateexpiry ) %]
1001 <span class="required">(Error)</span>
1003 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1006 [% UNLESS noopacnote %]
1008 [% IF ( mandatoryopacnote ) %]
1009 <label for="opacnote" class="required">
1011 <label for="opacnote">
1015 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1016 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1017 [% IF ( mandatoryopacnote ) %]
1018 <span class="required">Required</span>
1021 [% END # /UNLESS noopacnote %]
1023 [% UNLESS noborrowernotes %]
1025 [% IF ( mandatoryborrowernotes ) %]
1026 <label for="borrowernotes" class="required">
1028 <label for="borrowernotes">
1032 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1033 <div class="hint">This message displays when checking out to this patron</div>
1034 [% IF ( mandatoryborrowernotes ) %]
1035 <span class="required">Required</span>
1038 [% END # /UNLESS noborrowernotes %]
1040 </fieldset> <!-- /#memberentry_subscription -->
1041 [% END # hide fieldset %]
1043 [% UNLESS nouserid && nopassword %]
1044 <fieldset class="rows" id="memberentry_userid">
1045 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1047 [% UNLESS nouserid %]
1049 [% IF ( mandatoryuserid ) %]
1050 <label for="userid" class="required">
1052 <label for="userid">
1057 [% IF ( NoUpdateLogin ) %]
1058 [% IF ( opduplicate ) %]
1059 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1061 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1064 [% IF ( opduplicate ) %]
1065 <input type="text" id="userid" name="userid" size="20" value="" />
1067 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1069 [% END # /IF ( NoUpdateLogin ) %]
1071 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1072 <input type="text" disabled="disabled" style="display:none" />
1074 [% IF ( mandatoryuserid ) %]
1075 <span class="required">Required</span>
1078 [% END # /UNLESS nouserid %]
1080 [% UNLESS nopassword %]
1082 [% IF ( mandatorypassword ) %]
1083 <label for="password" class="required">
1085 <label for="password">
1090 [% IF ( NoUpdateLogin ) %]
1091 [% IF ( opduplicate ) %]
1092 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1094 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1097 [% IF ( opduplicate ) %]
1098 <input type="password" id="password" name="password" size="20" />
1100 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1102 [% END # /IF ( NoUpdateLogin ) %]
1103 [% ELSE # IF ( opadd ) %]
1105 [% IF ( password ) %]
1106 [% IF ( NoUpdateLogin ) %]
1107 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1109 [% IF ( opduplicate ) %]
1110 <input type="password" id="password" name="password" size="20" />
1112 <input type="password" id="password" name="password" size="20" value="****" />
1116 [% IF ( NoUpdateLogin ) %]
1117 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1119 <input type="password" id="password" name="password" size="20" value="" />
1121 [% END # /IF ( password ) %]
1122 [% END # /IF ( opadd ) %]
1123 [% IF ( mandatorypassword ) %]
1124 <span class="required">Required</span>
1126 [% IF ( ERROR_password_too_short ) %]
1127 <span class="required">Password is too short</span>
1129 [% IF ( ERROR_password_too_weak ) %]
1130 <span class="required">Password is too weak</span>
1132 [% IF ( ERROR_password_has_whitespaces ) %]
1133 <span class="required">Password has leading or trailing whitespaces</span>
1135 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1139 [% IF ( mandatorypassword ) %]
1140 <label for="password2" class="required">
1142 <label for="password2">
1147 [% IF ( NoUpdateLogin ) %]
1148 [% IF ( opduplicate ) %]
1149 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1151 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1154 [% IF ( opduplicate ) %]
1155 <input type="password" id="password2" name="password2" size="20" />
1157 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1160 [% ELSE # IF ( opadd ) %]
1161 [% IF ( password ) %]
1162 [% IF ( NoUpdateLogin ) %]
1163 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1165 [% IF ( opduplicate ) %]
1166 <input type="password" id="password2" name="password2" size="20" />
1168 <input type="password" id="password2" name="password2" size="20" value="****" />
1172 [% IF ( NoUpdateLogin ) %]
1173 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1175 <input type="password" id="password2" name="password2" size="20" value="" />
1178 [% END # /IF ( opadd ) %]
1180 [% IF ( mandatorypassword ) %]
1181 <span class="required">Required</span>
1183 [% IF ( ERROR_password_mismatch ) %]
1184 <span class="required">Passwords do not match</span>
1187 [% END # /UNLESS nopassword %]
1189 </fieldset> <!-- /#memberentry_userid -->
1190 [% END # UNLESS nouserid && nopassword %]
1192 <!--this zones are not necessary in modif mode -->
1193 [% UNLESS ( opadd || opduplicate ) %]
1194 <fieldset class="rows" id="memberentry_account_flags">
1195 <legend id="account_flags_lgd">Patron account flags</legend>
1197 [% FOREACH flagloo IN flagloop %]
1199 <label class="radio" for="yes[% flagloo.name | html %]">
1200 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1201 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1203 [% IF CAN_user_circulate_manage_restrictions %]
1204 <label for="yes[% flagloo.name | html %]">
1205 [% IF ( flagloo.yes ) %]
1206 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1208 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1212 <label for="no[% flagloo.name | html %]">
1213 [% IF ( flagloo.no ) %]
1214 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1216 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1221 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1222 [% END # /IF CAN_user_circulate_manage_restrictions %]
1224 [% END # /FOREACH flagloo %]
1226 </fieldset> <!-- /#memberentry_account_flags -->
1228 <fieldset class="rows" id="memberentry_restrictions">
1229 <legend id="restrictions_lgd">Patron restrictions</legend>
1230 [% IF ( debarments ) %]
1237 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1238 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1244 [% FOREACH d IN debarments %]
1246 <td>[% d.type | html %]</td>
1248 [% IF d.comment.search('OVERDUES_PROCESS') %]
1249 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1251 [% d.comment | $raw %]
1255 [% IF d.expiration %]
1256 [% d.expiration | $KohaDates %]
1261 <td>[% d.created | $KohaDates %]</td>
1262 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1264 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1268 [% END # /FOREACH d %]
1272 <p>Patron is currently unrestricted.</p>
1273 [% END # /IF ( debarments ) %]
1275 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1276 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1277 <fieldset id="manual_restriction_form">
1278 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1279 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1282 <label for="debarred_comment">Comment: </label>
1283 <input type="text" id="debarred_comment" name="debarred_comment" />
1286 <label for="debarred_expiration">Expiration: </label>
1287 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1288 <a href="#" id="clear_debarred_expiration">Clear date</a>
1292 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1294 </fieldset> <!-- /#manual_restriction_form -->
1295 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1296 </fieldset> <!-- /#memberentry_restrictions -->
1297 [% END # /UNLESS ( opadd || opduplicate ) %]
1298 [% END # /IF ( step_3 ) %]
1301 [% IF Koha.Preference('HouseboundModule') %]
1302 <fieldset class="rows" id="memberentry_housebound_roles">
1303 <legend id="housebound_roles">Housebound roles</legend>
1306 <label class="radio" for="housebound_chooser">
1309 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1310 <label for="yes_housebound_chooser">Yes </label>
1311 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1312 <label for="no_housebound_chooser">No </label>
1313 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1315 <label for="yes_housebound_chooser">Yes </label>
1316 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1317 <label for="no_housebound_chooser">No </label>
1318 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1322 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1323 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1324 <label for="yes_housebound_deliverer">Yes </label>
1325 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1326 <label for="no_housebound_deliverer">No </label>
1327 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1329 <label for="yes_housebound_deliverer">Yes </label>
1330 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1331 <label for="no_housebound_deliverer">No </label>
1332 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1335 </ol> <!-- /ol.radio -->
1336 </fieldset> <!-- /#memberentry_housebound_roles -->
1337 [% END # hide fieldset %]
1338 [% END # IF step_7 %]
1341 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1342 [% UNLESS ( no_patron_attribute_types ) %]
1343 <fieldset class="rows" id="memberentry_patron_attributes">
1344 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1345 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1346 [% FOREACH pa_loo IN patron_attributes %]
1347 <ol class="attributes_table">
1348 [% IF pa_loo.class %]
1349 <fieldset id="aai_[% pa_loo.class | html %]">
1350 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1352 [% FOREACH patron_attribute IN pa_loo.items %]
1353 <li data-category_code="[% patron_attribute.category_code | html %]">
1354 <label for="[% patron_attribute.form_id | html %]">
1355 [% patron_attribute.description | html %]:
1357 [% IF ( patron_attribute.use_dropdown ) %]
1358 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1359 <option value=""></option>
1360 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1361 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1362 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1363 [% auth_val_loo.lib | html %]
1366 <option value="[% auth_val_loo.authorised_value | html %]" >
1367 [% auth_val_loo.lib | html %]
1373 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1374 [% END # /IF ( patron_attribute.use_dropdown ) %]
1375 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1376 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1377 [% IF ( patron_attribute.repeatable ) %]
1378 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1381 [% END # /FOREACH patron_attribute %]
1382 [% IF pa_loo.class %]</fieldset>[% END %]
1384 [% END # /FOREACH pa_loo %]
1385 </fieldset> <!-- /#memberentry_patron_attributes -->
1386 [% END # UNLESS ( no_patron_attribute_types ) %]
1387 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1388 [% END # IF ( step_4 ) %]
1391 [% IF ( EnhancedMessagingPreferences ) %]
1392 <fieldset class="rows" id="memberentry_messaging_prefs">
1393 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1394 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1395 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1397 <input type="hidden" name="setting_messaging_prefs" value="1" />
1398 [% INCLUDE 'messaging-preference-form.inc' %]
1399 [% IF ( SMSSendDriver ) %]
1401 <label for="SMSnumber">SMS number:</label>
1402 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1403 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1405 [% UNLESS nosms_provider_id %]
1407 <label for="sms_provider_id">SMS provider:</label>
1408 <select id="sms_provider_id" name="sms_provider_id">
1409 <option value="">Unknown</option>
1410 [% FOREACH s IN sms_providers %]
1411 [% IF s.id == sms_provider_id %]
1412 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1414 <option value="[% s.id | html %]">[% s.name | html %]</option>
1419 [% END # /UNLESS nosms_provider_id %]
1420 [% END # IF ( SMSSendDriver ) %]
1422 [% END # IF ( EnhancedMessagingPreferences ) %]
1423 [% END # /IF step_5 %]
1424 </form> <!-- /#entryform -->
1426 [% IF quickadd && opadd && !check_member %]
1427 <form id="quick_add_form" class="toggler">
1428 <fieldset class="rows quick_add"><legend>Quick add</legend>
1429 <ol id="quick_add_list">
1435 [% END # /UNLESS ( no_add ) %]
1437 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1439 [% UNLESS ( opadd ) %]
1440 <div class="col-sm-2 col-sm-pull-10">
1442 [% INCLUDE 'circ-menu.inc' %]
1444 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1446 </div> <!-- /.row -->
1448 [% MACRO jsinclude BLOCK %]
1449 [% Asset.js("lib/hc-sticky.js") | $raw %]
1450 [% INCLUDE 'calendar.inc' %]
1451 [% INCLUDE 'str/members-menu.inc' %]
1452 [% Asset.js("js/members-menu.js") | $raw %]
1454 function update_cardnumber_warning(size){
1455 var max_len = [% maxlength_cardnumber | html %];
1456 if ( size >= max_len ) {
1457 $("#cn_max").show();
1459 $("#cn_max").hide();
1463 function showHideFields(){
1464 [% UNLESS step == 1 %]
1465 [% IF fieldstohide.match('identity') %]
1466 $("#memberentry_identity").find('legend').nextAll().toggle();
1468 [% IF show_guarantor || guarantor %]
1469 [% IF fieldstohide.match('guarantor') %]
1470 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1471 $("#guarantor_template").toggle();
1474 [% IF fieldstohide.match('primary_address') %]
1475 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1477 [% IF fieldstohide.match('primary_contact') %]
1478 $("#memberentry_contact").find('legend').nextAll().toggle();
1481 [% UNLESS step == 6 %]
1482 [% IF fieldstohide.match('alt_address') %]
1483 $("#memberentry_address").find('legend').nextAll().toggle();
1486 [% UNLESS step == 2 %]
1487 [% IF fieldstohide.match('alt_contact') %]
1488 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1491 [% UNLESS step == 3 %]
1492 [% IF fieldstohide.match('lib_mgmt') %]
1493 $("#memberentry_library_management").find('legend').nextAll().toggle();
1495 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1496 [% IF fieldstohide.match('lib_setup') %]
1497 $("#memberentry_subscription").find('legend').nextAll().toggle();
1500 [% UNLESS nouserid && nopassword %]
1501 [% IF fieldstohide.match('login') %]
1502 $("#memberentry_userid").find('legend').nextAll().toggle();
1505 [% UNLESS ( opadd || opduplicate ) %]
1506 [% IF fieldstohide.match('flags') %]
1507 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1510 [% IF fieldstohide.match('debarments') %]
1511 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1514 [% UNLESS step == 7 %]
1515 [% IF Koha.Preference('HouseboundModule') %]
1516 [% IF fieldstohide.match('housebound') %]
1517 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1521 [% UNLESS step == 4 %]
1522 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1523 [% IF fieldstohide.match('additional') %]
1524 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1528 [% UNLESS step == 5 %]
1529 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1530 [% IF fieldstohide.match('messaging') %]
1531 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1532 $("#messaging_prefs_loading").toggle();
1538 $(document).ready(function() {
1540 $("#toggle_hidden_fields").change(function(){
1544 $("legend").click(function(){
1545 $(this).nextAll().toggle();
1546 $("#messaging_prefs_loading").hide();
1549 $("#saverecord").css({ 'margin-left': 0 });
1551 Sticky = $("#toolbar");
1554 stickyClass: "floating"
1557 [% IF categorycode %]
1558 update_category_code( "[% categorycode | html %]" );
1560 if ( $("#categorycode_entry").length > 0 ){
1561 var category_code = $("#categorycode_entry").find("option:selected").val();
1562 update_category_code( category_code );
1566 [% IF new_guarantors %]
1567 [% FOREACH g IN new_guarantors %]
1568 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1572 $("#cn_max").hide();
1574 $("#cardnumber").on("keydown", function(e){
1575 content = $(this).val();
1577 $("#cardnumber").on("keyup", function(e){
1578 // .val() will return the value of the input after the key has been released
1579 var l = $(this).val().length;
1580 if ( l == content.length + 1 ) { l--; }
1581 update_cardnumber_warning(l);
1583 $("#cardnumber").bind("paste", function(e){
1584 var pastedData = e.originalEvent.clipboardData.getData('text');
1585 update_cardnumber_warning(pastedData.length - 1);
1587 var toggle_quick_add = $(".toggle_quick_add");
1588 $(toggle_quick_add).click(function(e){
1589 toggle_quick_add.toggle();
1592 var toggle_from = '';
1593 if( $("#entryform:visible").length ) {
1594 toggle_to = "#quick_add_form label";
1595 toggle_from = "#entryform label";
1596 $("#memberentry_guarantor").appendTo("#quick_add_form");
1598 toggle_to="#entryform label";
1599 toggle_from = "#quick_add_form label";
1600 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1602 $(toggle_from).each(function() {
1603 var input_label = $(this).attr('for');
1604 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1605 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1608 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1611 $(".toggler").toggle();
1614 $("#save_quick_add").click(function(){
1615 $("#quick_add_form").validate();
1616 if( $("#quick_add_form").valid()){
1617 $('.toggle_quick_add').click();
1618 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1619 $('#saverecord').click();
1621 else {return false;}
1624 $("#saverecord").click(function(){
1625 if( check_form_borrowers() ){
1626 $("#entryform").submit();
1630 $('#duplicate').on('click', function() {
1631 $("input[name='op']").val('modify');
1632 $("input[name='borrowernumber']").val('[% check_member | html %]');
1633 $("input[name='check_member']").val('');
1634 $('#entryform').submit();
1637 $('#not-duplicate').on('click', function() {
1638 $("input[name='nodouble']").val('1');
1639 $('#entryform').submit();
1642 $(".popup_patronview").on("click", function(e){
1644 var url = $(this).attr("href");
1645 openWindow( url, "patronview" );
1648 $("#dateofbirth").on("change", function(){
1652 $("#debarred_comment, #debarred_expiration").on("change", function(){
1653 $("#add_debarment").val(1);
1656 $("#clear_debarred_expiration").on("click", function(e){
1658 $('#debarred_expiration').val("");
1661 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1663 clear_entry( this );
1666 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1668 clone_entry( this );
1671 $("#categorycode_entry").on("change", function(){
1672 update_category_code(this);
1676 var MSG_SEPARATOR = _("Separator must be / in field %s");
1677 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1678 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1679 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1680 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1681 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1682 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1683 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1684 var MSG_MONTH = _("%s month")
1685 var MSG_MONTHS = _("%s months")
1686 var MSG_YEAR = _("%s year")
1687 var MSG_YEARS = _("%s years")
1688 var LABEL_CHANGE = _("Change");
1689 var LABEL_SET_TO_PATRON = _("Set to patron");
1690 var LABEL_AGE = _("Age");
1691 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1693 [% IF quickadd && opadd && !check_member %]
1694 $(document).ready(function () {
1696 $("#entryform,#saverecord").hide();
1697 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1698 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1699 $("#entryform label").each(function () {
1700 var input_label = $(this).attr('for');
1701 if ( input_label == 'sex-female' ) {
1704 else if ( input_label == 'btitle' ) {
1705 input_label='title';
1707 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1708 $(this).parent().clone().appendTo("#quick_add_list");
1709 [% UNLESS mandatorypassword %]
1710 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1714 if ( $("#memberentry_guarantor").length ) {
1715 $("#memberentry_guarantor").appendTo("#quick_add_form");
1717 $("#quick_add_form").show();
1720 $("#guarantor_template").hide();
1723 [% Asset.js("js/members.js") | $raw %]
1724 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1725 [% PROCESS 'password_check.inc' %]
1726 [% PROCESS 'add_password_check' new_password => 'password' %]
1729 [% INCLUDE 'intranet-bottom.inc' %]