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 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
63 <div class="col-sm-10 col-sm-push-2">
65 <main class="clearfix">
66 [% INCLUDE 'blocking_errors.inc' %]
69 [% IF ( error_alert == "no_email" ) %]
70 <div class="dialog alert">This member has no email</div>
72 <div class="dialog alert">[% error_alert | html %]</div>
76 <div class="dialog message">Email has been sent.</div>
79 [% INCLUDE 'noadd-warnings.inc' %]
81 [% UNLESS ( no_add ) %]
85 [% ELSIF ( opduplicate ) %]
90 [% INCLUDE 'patron-title.inc' %]
91 [% IF categoryname %]([% categoryname | html %])[% END %]
94 [% IF quickadd && opadd && !check_member %]
95 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
96 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
99 [% IF ( check_member ) %]
100 <div class="dialog alert">
101 <h3>Duplicate patron record?</h3>
102 <p><a href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member | uri %]');return false;" ><i class="fa fa-window-restore"></i> View existing record</a></p>
103 <button id="duplicate" type="submit" class="new">
104 <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record
106 <button type="submit" id="not-duplicate" class="new">
107 <i class="fa fa-plus"></i> Not a duplicate. Save as new record
113 <div class="dialog alert">
114 <p>The following fields are wrong. Please fix them.</p>
116 [% IF ( ERROR_login_exist ) %]
117 <li id="ERROR_login_exist">Username/password already exists.</li>
119 [% IF ERROR_cardnumber_already_exists %]
120 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
122 [% IF ERROR_cardnumber_length %]
123 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
125 [% IF ( ERROR_age_limitations ) %]
126 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
127 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
129 [% IF ( ERROR_branch ) %]
130 <li id="ERROR_branch">Library is invalid.</li>
132 [% IF ( ERROR_dateofbirth ) %]
133 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
135 [% IF ( ERROR_dateenrolled ) %]
136 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
138 [% IF ( ERROR_dateexpiry ) %]
139 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
141 [% IF ( ERROR_password_too_short ) %]
142 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
144 [% IF ( ERROR_password_too_weak ) %]
145 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
147 [% IF ( ERROR_password_has_whitespaces ) %]
148 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
150 [% IF ( ERROR_password_mismatch ) %]
151 <li id="ERROR_password_mismatch">Passwords do not match.</li>
153 [% IF ( ERROR_extended_unique_id_failed ) %]
154 <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>
156 [% IF ERROR_bad_email %]
157 <li id="ERROR_bad_email">The primary email is invalid.</li>
159 [% IF ERROR_bad_email_secondary %]
160 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
162 [% IF ERROR_bad_email_alternative %]
163 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
169 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
170 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
172 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
173 [% FOREACH field IN fieldstohide.split(',') %]
175 [% CASE 'identity' %] Organization/Patron identity |
176 [% CASE 'guarantor' %] Guarantor information |
177 [% CASE 'primary_address' %] Main address |
178 [% CASE 'primary_contact' %] Contact information |
179 [% CASE 'alt_address' %] Alternate address |
180 [% CASE 'alt_contact' %] Alternate contact |
181 [% CASE 'lib_mgmt' %] Library management |
182 [% CASE 'lib_setup' %] Library setup |
183 [% CASE 'login' %] OPAC/Staff login |
184 [% CASE 'flags' %] Patron account flags |
185 [% CASE 'debarments' %] Patron restrictions |
186 [% CASE 'housebound' %] Housebound roles |
187 [% CASE 'additional' %] Additional attributes and identifiers |
188 [% CASE 'messaging' %] Patron messaging preferences |
194 <div id="toolbar" class="btn-toolbar">
195 [% UNLESS ( check_member ) %]
196 [% IF quickadd && opadd %]
197 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
199 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
201 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
203 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
205 <i class="fa fa-times"></i> Cancel
210 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
211 [% UNLESS ( check_member ) %]
212 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
214 <!-- field always hidden in different form (1,2,3) -->
215 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
216 <input type="hidden" name="category_type" value="[% category_type | html %]" />
217 <input type="hidden" name="updtype" value="[% updtype | html %]" />
218 <input type="hidden" name="destination" value="[% destination | html %]" />
219 <input type="hidden" name="check_member" value="[% check_member | html %]" />
220 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
221 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
222 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
224 <input type="hidden" name="step" value="[% step | html %]" />
227 <input type="hidden" name="op" value="insert" />
228 [% ELSIF ( opduplicate ) %]
229 <input type="hidden" name="op" value="insert" />
231 <input type="hidden" name="op" value="save" />
232 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
233 [%# Only put the cardnumber if we arent showing it in the form later %]
235 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
241 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
242 <fieldset class="rows" id="memberentry_identity">
243 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
247 [% IF Koha.Preference('BorrowersTitles') %]
249 [% IF ( mandatorytitle ) %]
250 <label for="btitle" class="required">
255 <select id="btitle" name="title">
256 <option value=""></option>
257 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
259 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
261 <option value="[% t | html %]">[% t | html %]</option>
265 [% IF ( mandatorytitle ) %]
266 <span class="required">Required</span>
269 [% END # /IF Koha.Preference('BorrowersTitles') %]
270 [% END # /UNLESS notitle %]
271 [% END # /UNLESS ( I ) %]
273 [% UNLESS nosurname %]
276 <label for="surname" class="required">
280 [% IF ( mandatorysurname ) %]
281 <label for="surname" class="required">
283 <label for="surname">
288 [% IF ( uppercasesurnames ) %]
289 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
291 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
293 [% IF ( mandatorysurname ) %]
294 <span class="required">Required</span>
297 [% END # /UNLESS nosurname %]
300 [% UNLESS nofirstname %]
302 [% IF ( mandatoryfirstname ) %]
303 <label for="firstname" class="required">
305 <label for="firstname">
309 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
310 [% IF ( mandatoryfirstname ) %]
311 <span class="required">Required</span>
314 [% END #/UNLESS nofirstname %]
315 [% UNLESS nodateofbirth %]
317 [% IF ( mandatorydateofbirth ) %]
318 <label for="dateofbirth" class="required">
320 <label for="dateofbirth">
324 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
325 [% IF ( mandatorydateofbirth ) %]
326 <span class="required">Required</span>
328 [% IF ( ERROR_dateofbirth ) %]
329 <span class="required">(Error)</span>
331 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
333 [% END # /UNLESS nodateofbirth %]
334 [% UNLESS noinitials %]
336 [% IF ( mandatoryinitials ) %]
337 <label for="initials" class="required">
339 <label for="initials">
343 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
344 [% IF ( mandatoryinitials ) %]
345 <span class="required">Required</span>
348 [% END # /UNLESS noinitials %]
349 [% END #/UNLESS ( I ) %]
350 [% UNLESS noothernames %]
352 [% IF ( mandatoryothernames ) %]
353 <label for="othernames" class="required">
355 <label for="othernames">
359 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
360 [% IF ( mandatoryothernames ) %]
361 <span class="required">Required</span>
363 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
365 [% END #/UNLESS noothernames %]
370 [% UNLESS ( opduplicate ) %]
372 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
374 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
377 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
379 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
382 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
384 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
387 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
388 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
389 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
390 [% END # /UNLESS ( opduplicate )%]
392 [% END # /UNLESS nosex %]
393 [% END # /UNLESS ( I ) %]
395 </fieldset> <!-- /#memberentry_identity -->
396 [% END # hide fieldset %]
398 [% IF show_guarantor || guarantor %]
399 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
400 <span id="memberentry_guarantor_anchor">
401 <fieldset id="memberentry_guarantor" class="rows">
402 <legend>Guarantor information</legend>
404 <span id="guarantor_relationships">
405 [% FOREACH r IN relationships %]
406 <fieldset class="rows">
408 [% IF category_type == 'I' %]
409 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
410 <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 %]
414 <label for="guarantor_surname">Organization name: </label>
415 <span>[% r.guarantor.surname | html %]</span>
418 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
419 <span class="label">Patron card number:</span>
420 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
423 [% IF r.guarantor.surname %]
425 <label for="guarantor_surname">Surname: </label>
426 <span>[% r.guarantor.surname | html %]</span>
430 [% IF r.guarantor.firstname %]
432 <label for="guarantor_firstname">First name: </label>
433 <span>[% r.guarantor.firstname | html %]</span>
438 <label for="relationship">Relationship: </label>
439 <span>[% r.relationship | html %]</span>
443 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
444 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
449 [% END # END relationships foreach %]
450 [% IF guarantor && (!relationships) %]
451 <fieldset class="rows">
453 <li class="guarantor-details" data-borrowernumber="0">
454 <span class="label">Patron card number:</span>
455 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
456 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
460 <label for="guarantor_surname">Surname: </label>
461 <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
465 <label for="guarantor_firstname">First name: </label>
466 <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
470 <label for="guarantor_relationship">Relationship: </label>
471 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
472 [% FOREACH pr IN possible_relationships.split('\|') %]
473 <option value="[% pr | html %]">[% pr | html %]</option>
479 <label for="guarantor_cancel"> </label>
480 <span><a href="#" class="guarantor_cancel">Remove</a></span>
485 </span> <!-- #/guarantor_relationships -->
487 <fieldset class="rows guarantor" id="guarantor_template">
489 <li class="guarantor-details" data-borrowernumber="0">
490 <span class="label">Patron card number:</span>
491 <span class="new_guarantor_id_text"></span>
492 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
496 <label for="guarantor_surname">Surname: </label>
497 <span class="new_guarantor_surname_text"></span>
501 <label for="guarantor_firstname">First name: </label>
502 <span class="new_guarantor_firstname_text"></span>
506 <label for="guarantor_relationship">Relationship: </label>
507 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
508 [% FOREACH pr IN possible_relationships.split('\|') %]
509 <option value="[% pr | html %]">[% pr | html %]</option>
515 <label for="guarantor_cancel"> </label>
516 <span><a href="#" class="guarantor_cancel">Remove</a></span>
522 <input type="hidden" id="guarantor_id" value="" />
523 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
524 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
527 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
530 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
532 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
533 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
534 [% IF privacy_guarantor_checkouts %]
535 <option value="0">No</option>
536 <option value="1" selected>Yes</option>
538 <option value="0" selected>No</option>
539 <option value="1">Yes</option>
542 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
545 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
547 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
548 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
549 [% IF privacy_guarantor_fines %]
550 <option value="0">No</option>
551 <option value="1" selected>Yes</option>
553 <option value="0" selected>No</option>
554 <option value="1">Yes</option>
557 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
561 </fieldset> <!-- /#memberentry_guarantor -->
562 </span> <!-- #/memberentry_guarantor_anchor -->
563 [% END # /IF show_guarantor || guarantor %]
565 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
566 [% IF Koha.Preference( 'AddressFormat' ) %]
567 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
569 [% END # /UNLESS nostreet && nocity etc group%]
571 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
572 <fieldset class="rows" id="memberentry_contact">
573 <legend id="contact_lgd">Contact</legend>
575 [% UNLESS nocontactname %]
577 [% IF ( mandatorycontactname ) %]
578 <label for="contactname" class="required">
580 <label for="contactname">
584 <input type="text" id="contactname" name="contactname" value="[% contactname | html %]" />
585 [% IF ( mandatorycontactname ) %]
586 <span class="required">Required</span>
588 <div class="hint">Non-patron guarantor surname</div>
590 [% END # /UNLESS nocontactname %]
592 [% UNLESS nocontactfirstname %]
594 [% IF ( mandatorycontactfirstname ) %]
595 <label for="contactfirstname" class="required">
597 <label for="contactfirstname">
599 Guarantor first name:
601 <input type="text" id="contactfirstname" name="contactfirstname" value="[% contactfirstname | html %]" />
602 [% IF ( mandatorycontactfirstname ) %]
603 <span class="required">Required</span>
605 <div class="hint">Non-patron guarantor first name</div>
607 [% END # /UNLESS noaltcontactfirstname %]
609 [% UNLESS norelationship %]
610 [% IF possible_relationships %]
612 <label for="relationship">Relationship: </label>
613 <select class="relationship" name="relationship">
614 <option value=""></option>
615 [% FOREACH pr IN possible_relationships.split('\|') %]
616 [% IF pr == relationship %]
617 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
619 <option value="[% pr | html %]">[% pr | html %]</option>
624 [% END #/IF possible_relationships %]
625 [% END # /UNLESS norelationship %]
629 [% IF ( mandatoryphone ) %]
630 <label for="phone" class="required">
636 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
637 [% IF ( mandatoryphone ) %]
638 <span class="required">Required</span>
640 <div class="hint">Shows on transit slips</div>
642 [% END # /UNLESS nophone %]
644 [% UNLESS nophonepro %]
646 [% IF ( mandatoryphonepro ) %]
647 <label for="phonepro" class="required">
649 <label for="phonepro">
653 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
654 [% IF ( mandatoryphonepro ) %]
655 <span class="required">Required</span>
658 [% END # /UNLESS nophonepro %]
660 [% UNLESS nomobile %]
662 [% IF ( mandatorymobile ) %]
663 <label for="mobile" class="required">
669 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
670 [% IF ( mandatorymobile ) %]
671 <span class="required">Required</span>
674 [% END # /UNLESS nomobile %]
678 [% IF ( mandatoryemail ) %]
679 <label for="email" class="required">
685 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
686 [% IF ( mandatoryemail ) %]
687 <span class="required">Required</span>
689 <div class="hint">Shows on transit slips</div>
691 [% END #/UNLESS noemail %]
693 [% UNLESS noemailpro %]
695 [% IF ( mandatoryemailpro ) %]
696 <label for="emailpro" class="required">
698 <label for="emailpro">
702 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
703 [% IF ( mandatoryemailpro ) %]
704 <span class="required">Required</span>
707 [% END # /UNLESS noemailpro %]
711 [% IF ( mandatoryfax ) %]
712 <label for="fax" class="required">
718 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
719 [% IF ( mandatoryfax ) %]
720 <span class="required">Required</span>
723 [% END #/UNLESS nofax %]
725 </fieldset> <!-- /#memberentry_contact -->
726 [% END # hide fieldset %]
728 <!-- ************************ STEP_1 *********************** -->
729 [% END # /IF ( step_1 ) %]
732 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
733 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
735 [% INCLUDE 'member-alt-address-style-de.inc' %]
737 [% INCLUDE 'member-alt-address-style-us.inc' %]
739 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
740 [% END # /IF ( step_6 ) %]
743 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
744 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
746 [% INCLUDE 'member-alt-contact-style-de.inc' %]
748 [% INCLUDE 'member-alt-contact-style-us.inc' %]
750 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
751 [% END # /IF ( step_2 ) %]
754 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
755 <fieldset class="rows" id="memberentry_library_management">
756 <legend id="library_management_lgd">Library management</legend>
758 [% UNLESS nocardnumber %]
760 [% IF mandatorycardnumber %]
761 <label for="cardnumber" class="required">
763 <label for="cardnumber" class="validated">
768 <!-- NOTE: div.hint closing tag isn't on the same line -->
769 [% IF minlength_cardnumber == maxlength_cardnumber %]
770 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
771 [% IF mandatorycardnumber %]
772 <span class="required">Required</span>
774 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
775 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
776 [% ELSIF 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 between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
783 [% ELSIF maxlength_cardnumber %]
784 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% 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 can be up to [% maxlength_cardnumber | html %] characters.
791 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
792 [% IF mandatorycardnumber %]
793 <span class="required">Required</span>
795 <div class="hint">There is no minimum or maximum character length.
797 [% IF autoMemberNum %]
798 [% IF mandatorycardnumber %]
799 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
801 <br/>Leave blank for auto calc during registration
804 </div><!--/div.hint -->
806 [% END # /UNLESS nocardnumber %]
808 [% UNLESS nobranchcode %]
810 <label for="libraries" class="required">Library:</label>
811 <select name="branchcode" size="1" id="libraries">
812 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
814 <span class="required">Required</span>
819 <label for="categorycode_entry" class="required">Category: </label>
820 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
821 [% FOREACH typeloo IN typeloop %]
822 [% FOREACH categoryloo IN typeloo.categoryloop %]
823 [% IF ( loop.first ) %]
824 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
825 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
826 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
827 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
828 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
829 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
831 [% IF ( categoryloo.categorycodeselected ) %]
832 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
834 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
836 [% IF ( loop.last ) %]
839 [% END # /FOREACH categoryloo %]
840 [% END # /FOREACH typeloo %]
842 <span class="required">Required</span>
847 [% IF ( mandatorysort1 ) %]
848 <label for="sort1" class="required">
854 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
855 [% IF ( mandatorysort1 ) %]
856 <span class="required">Required</span>
859 [% END # /UNLESS nosort1 %]
863 [% IF ( mandatorysort2 ) %]
864 <label for="sort2" class="required">
870 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
871 [% IF ( mandatorysort2 ) %]
872 <span class="required">Required</span>
875 [% END # /UNLESS nosort2 %]
877 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
879 <label for="checkprevcheckout">Check for previous checkouts: </label>
880 <select name="checkprevcheckout" id="checkprevcheckout">
881 [% IF ( checkprevcheckout == 'yes' ) %]
882 <option value="yes" selected="selected">Yes if settings allow it</option>
883 <option value="no">No if settings allow it</option>
884 <option value="inherit">Inherit from settings</option>
885 [% ELSIF ( checkprevcheckout == 'no' ) %]
886 <option value="yes">Yes if settings allow it</option>
887 <option value="no" selected="selected">No if settings allow it</option>
888 <option value="inherit">Inherit from settings</option>
890 <option value="yes">Yes if settings allow it</option>
891 <option value="no">No if settings allow it</option>
892 <option value="inherit" selected="selected">Inherit from settings</option>
896 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
898 [% IF Koha.Preference('TranslateNotices') %]
900 <label for="lang">Preferred language for notices: </label>
901 <select id="lang" name="lang">
902 <option value="default">Default</option>
903 [% FOR language IN languages %]
904 [% FOR sublanguage IN language.sublanguages_loop %]
905 [% IF language.plural %]
906 [% IF sublanguage.rfc4646_subtag == lang %]
907 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
909 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
912 [% IF sublanguage.rfc4646_subtag == lang %]
913 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
915 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
917 [% END # /IF language.plural %]
918 [% END # /FOR sublanguage %]
919 [% END #/FOR language %]
920 </select> <!-- /#lang -->
922 [% END #/IF Koha.Preference('TranslateNotices') %]
924 </fieldset> <!-- /#memberentry_library_management -->
926 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
927 <fieldset class="rows" id="memberentry_subscription">
928 <legend id="library_setup_lgd">Library set-up</legend><ol>
929 [% UNLESS nodateenrolled %]
931 [% IF ( mandatorydateenrolled ) %]
932 <label for="from" class="required">
938 [% IF ( dateformat == "metric" ) %]
939 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled | html %]" class="datepickerfrom" />
941 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
943 [% IF ( mandatorydateenrolled ) %]
944 <span class="required">Required</span>
946 [% IF ( ERROR_dateenrolled ) %]
947 <span class="required">(Error)</span>
949 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
951 [% END # /UNLESS nodateenrolled %]
953 [% UNLESS nodateexpiry %]
956 <li style="display:none">
958 [% IF ( mandatorydateexpiry ) %]
959 <label for="to" class="required">
963 Expiry date (leave blank for auto calc):
965 [% IF ( dateformat == "metric" ) %]
966 [% UNLESS ( opadd ) %]
967 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
969 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
972 [% UNLESS ( opadd ) %]
973 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
975 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
977 [% END # /IF ( dateformat == "metric" ) %]
978 [% IF ( mandatorydateexpiry ) %]
979 <span class="required">Required</span>
981 [% IF ( ERROR_dateexpiry ) %]
982 <span class="required">(Error)</span>
984 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
987 [% UNLESS noopacnote %]
989 [% IF ( mandatoryopacnote ) %]
990 <label for="opacnote" class="required">
992 <label for="opacnote">
996 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
997 <div class="hint">This message appears on this patron's user page in the OPAC</div>
998 [% IF ( mandatoryopacnote ) %]
999 <span class="required">Required</span>
1002 [% END # /UNLESS noopacnote %]
1004 [% UNLESS noborrowernotes %]
1006 [% IF ( mandatoryborrowernotes ) %]
1007 <label for="borrowernotes" class="required">
1009 <label for="borrowernotes">
1013 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1014 <div class="hint">This message displays when checking out to this patron</div>
1015 [% IF ( mandatoryborrowernotes ) %]
1016 <span class="required">Required</span>
1019 [% END # /UNLESS noborrowernotes %]
1021 </fieldset> <!-- /#memberentry_subscription -->
1022 [% END # hide fieldset %]
1024 [% UNLESS nouserid && nopassword %]
1025 <fieldset class="rows" id="memberentry_userid">
1026 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1028 [% UNLESS nouserid %]
1030 [% IF ( mandatoryuserid ) %]
1031 <label for="userid" class="required">
1033 <label for="userid">
1038 [% IF ( NoUpdateLogin ) %]
1039 [% IF ( opduplicate ) %]
1040 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1042 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1045 [% IF ( opduplicate ) %]
1046 <input type="text" id="userid" name="userid" size="20" value="" />
1048 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1050 [% END # /IF ( NoUpdateLogin ) %]
1052 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1053 <input type="text" disabled="disabled" style="display:none" />
1055 [% IF ( mandatoryuserid ) %]
1056 <span class="required">Required</span>
1059 [% END # /UNLESS nouserid %]
1061 [% UNLESS nopassword %]
1063 [% IF ( mandatorypassword ) %]
1064 <label for="password" class="required">
1066 <label for="password">
1071 [% IF ( NoUpdateLogin ) %]
1072 [% IF ( opduplicate ) %]
1073 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1075 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1078 [% IF ( opduplicate ) %]
1079 <input type="password" id="password" name="password" size="20" />
1081 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1083 [% END # /IF ( NoUpdateLogin ) %]
1084 [% ELSE # IF ( opadd ) %]
1086 [% IF ( password ) %]
1087 [% IF ( NoUpdateLogin ) %]
1088 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1090 [% IF ( opduplicate ) %]
1091 <input type="password" id="password" name="password" size="20" />
1093 <input type="password" id="password" name="password" size="20" value="****" />
1097 [% IF ( NoUpdateLogin ) %]
1098 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1100 <input type="password" id="password" name="password" size="20" value="" />
1102 [% END # /IF ( password ) %]
1103 [% END # /IF ( opadd ) %]
1104 [% IF ( mandatorypassword ) %]
1105 <span class="required">Required</span>
1107 [% IF ( ERROR_password_too_short ) %]
1108 <span class="required">Password is too short</span>
1110 [% IF ( ERROR_password_too_weak ) %]
1111 <span class="required">Password is too weak</span>
1113 [% IF ( ERROR_password_has_whitespaces ) %]
1114 <span class="required">Password has leading or trailing whitespaces</span>
1116 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1120 [% IF ( mandatorypassword ) %]
1121 <label for="password2" class="required">
1123 <label for="password2">
1128 [% IF ( NoUpdateLogin ) %]
1129 [% IF ( opduplicate ) %]
1130 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1132 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1135 [% IF ( opduplicate ) %]
1136 <input type="password" id="password2" name="password2" size="20" />
1138 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1141 [% ELSE # IF ( opadd ) %]
1142 [% IF ( password ) %]
1143 [% IF ( NoUpdateLogin ) %]
1144 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1146 [% IF ( opduplicate ) %]
1147 <input type="password" id="password2" name="password2" size="20" />
1149 <input type="password" id="password2" name="password2" size="20" value="****" />
1153 [% IF ( NoUpdateLogin ) %]
1154 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1156 <input type="password" id="password2" name="password2" size="20" value="" />
1159 [% END # /IF ( opadd ) %]
1161 [% IF ( mandatorypassword ) %]
1162 <span class="required">Required</span>
1164 [% IF ( ERROR_password_mismatch ) %]
1165 <span class="required">Passwords do not match</span>
1168 [% END # /UNLESS nopassword %]
1170 </fieldset> <!-- /#memberentry_userid -->
1171 [% END # UNLESS nouserid && nopassword %]
1173 <!--this zones are not necessary in modif mode -->
1174 [% UNLESS ( opadd || opduplicate ) %]
1175 <fieldset class="rows" id="memberentry_account_flags">
1176 <legend id="account_flags_lgd">Patron account flags</legend>
1178 [% FOREACH flagloo IN flagloop %]
1180 <label class="radio" for="yes[% flagloo.name | html %]">
1181 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1182 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1184 [% IF CAN_user_circulate_manage_restrictions %]
1185 <label for="yes[% flagloo.name | html %]">
1186 [% IF ( flagloo.yes ) %]
1187 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1189 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1193 <label for="no[% flagloo.name | html %]">
1194 [% IF ( flagloo.no ) %]
1195 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1197 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1202 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1203 [% END # /IF CAN_user_circulate_manage_restrictions %]
1205 [% END # /FOREACH flagloo %]
1207 </fieldset> <!-- /#memberentry_account_flags -->
1209 <fieldset class="rows" id="memberentry_restrictions">
1210 <legend id="restrictions_lgd">Patron restrictions</legend>
1211 [% IF ( debarments ) %]
1218 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1219 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1225 [% FOREACH d IN debarments %]
1227 <td>[% d.type | html %]</td>
1229 [% IF d.comment.search('OVERDUES_PROCESS') %]
1230 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1232 [% d.comment | $raw %]
1236 [% IF d.expiration %]
1237 [% d.expiration | $KohaDates %]
1242 <td>[% d.created | $KohaDates %]</td>
1243 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1245 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1249 [% END # /FOREACH d %]
1253 <p>Patron is currently unrestricted.</p>
1254 [% END # /IF ( debarments ) %]
1256 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1257 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1258 <fieldset id="manual_restriction_form">
1259 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1260 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1263 <label for="debarred_comment">Comment: </label>
1264 <input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" />
1267 <label for="debarred_expiration">Expiration: </label>
1268 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" type="text" />
1269 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a>
1273 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1275 </fieldset> <!-- /#manual_restriction_form -->
1276 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1277 </fieldset> <!-- /#memberentry_restrictions -->
1278 [% END # /UNLESS ( opadd || opduplicate ) %]
1279 [% END # /IF ( step_3 ) %]
1282 [% IF Koha.Preference('HouseboundModule') %]
1283 <fieldset class="rows" id="memberentry_housebound_roles">
1284 <legend id="housebound_roles">Housebound roles</legend>
1287 <label class="radio" for="housebound_chooser">
1290 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1291 <label for="yes_housebound_chooser">Yes </label>
1292 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1293 <label for="no_housebound_chooser">No </label>
1294 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1296 <label for="yes_housebound_chooser">Yes </label>
1297 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1298 <label for="no_housebound_chooser">No </label>
1299 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1303 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1304 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1305 <label for="yes_housebound_deliverer">Yes </label>
1306 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1307 <label for="no_housebound_deliverer">No </label>
1308 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1310 <label for="yes_housebound_deliverer">Yes </label>
1311 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1312 <label for="no_housebound_deliverer">No </label>
1313 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1316 </ol> <!-- /ol.radio -->
1317 </fieldset> <!-- /#memberentry_housebound_roles -->
1318 [% END # hide fieldset %]
1319 [% END # IF step_7 %]
1322 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1323 [% UNLESS ( no_patron_attribute_types ) %]
1324 <fieldset class="rows" id="memberentry_patron_attributes">
1325 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1326 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1327 [% FOREACH pa_loo IN patron_attributes %]
1328 <ol class="attributes_table">
1329 [% IF pa_loo.class %]
1330 <fieldset id="aai_[% pa_loo.class | html %]">
1331 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1333 [% FOREACH patron_attribute IN pa_loo.items %]
1334 <li data-category_code="[% patron_attribute.category_code | html %]">
1335 <label for="[% patron_attribute.form_id | html %]">
1336 [% patron_attribute.description | html %]:
1338 [% IF ( patron_attribute.use_dropdown ) %]
1339 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1340 <option value=""></option>
1341 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1342 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1343 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1344 [% auth_val_loo.lib | html %]
1347 <option value="[% auth_val_loo.authorised_value | html %]" >
1348 [% auth_val_loo.lib | html %]
1354 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1355 [% END # /IF ( patron_attribute.use_dropdown ) %]
1356 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1357 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1358 [% IF ( patron_attribute.repeatable ) %]
1359 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1362 [% END # /FOREACH patron_attribute %]
1363 [% IF pa_loo.class %]</fieldset>[% END %]
1365 [% END # /FOREACH pa_loo %]
1366 </fieldset> <!-- /#memberentry_patron_attributes -->
1367 [% END # UNLESS ( no_patron_attribute_types ) %]
1368 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1369 [% END # IF ( step_4 ) %]
1372 [% IF ( EnhancedMessagingPreferences ) %]
1373 <fieldset class="rows" id="memberentry_messaging_prefs">
1374 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1375 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1376 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1378 <input type="hidden" name="setting_messaging_prefs" value="1" />
1379 [% INCLUDE 'messaging-preference-form.inc' %]
1380 [% IF ( SMSSendDriver ) %]
1382 <label for="SMSnumber">SMS number:</label>
1383 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1384 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1386 [% UNLESS nosms_provider_id %]
1388 <label for="sms_provider_id">SMS provider:</label>
1389 <select id="sms_provider_id" name="sms_provider_id">
1390 <option value="">Unknown</option>
1391 [% FOREACH s IN sms_providers %]
1392 [% IF s.id == sms_provider_id %]
1393 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1395 <option value="[% s.id | html %]">[% s.name | html %]</option>
1400 [% END # /UNLESS nosms_provider_id %]
1401 [% END # IF ( SMSSendDriver ) %]
1403 [% END # IF ( EnhancedMessagingPreferences ) %]
1404 [% END # /IF step_5 %]
1405 </form> <!-- /#entryform -->
1407 [% IF quickadd && opadd && !check_member %]
1408 <form id="quick_add_form" class="toggler">
1409 <fieldset class="rows quick_add"><legend>Quick add</legend>
1410 <ol id="quick_add_list">
1416 [% END # /UNLESS ( no_add ) %]
1418 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1420 [% UNLESS ( opadd ) %]
1421 <div class="col-sm-2 col-sm-pull-10">
1423 [% INCLUDE 'circ-menu.inc' %]
1425 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1427 </div> <!-- /.row -->
1429 [% MACRO jsinclude BLOCK %]
1430 [% Asset.js("lib/hc-sticky.js") | $raw %]
1431 [% INCLUDE 'calendar.inc' %]
1432 [% INCLUDE 'str/members-menu.inc' %]
1433 [% Asset.js("js/members-menu.js") | $raw %]
1435 function update_cardnumber_warning(size){
1436 var max_len = [% maxlength_cardnumber | html %];
1437 if ( size >= max_len ) {
1438 $("#cn_max").show();
1440 $("#cn_max").hide();
1444 function showHideFields(){
1445 [% UNLESS step == 1 %]
1446 [% IF fieldstohide.match('identity') %]
1447 $("#memberentry_identity").find('legend').nextAll().toggle();
1449 [% IF show_guarantor || guarantor %]
1450 [% IF fieldstohide.match('guarantor') %]
1451 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1452 $("#guarantor_template").toggle();
1455 [% IF fieldstohide.match('primary_address') %]
1456 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1458 [% IF fieldstohide.match('primary_contact') %]
1459 $("#memberentry_contact").find('legend').nextAll().toggle();
1462 [% UNLESS step == 6 %]
1463 [% IF fieldstohide.match('alt_address') %]
1464 $("#memberentry_address").find('legend').nextAll().toggle();
1467 [% UNLESS step == 2 %]
1468 [% IF fieldstohide.match('alt_contact') %]
1469 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1472 [% UNLESS step == 3 %]
1473 [% IF fieldstohide.match('lib_mgmt') %]
1474 $("#memberentry_library_management").find('legend').nextAll().toggle();
1476 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1477 [% IF fieldstohide.match('lib_setup') %]
1478 $("#memberentry_subscription").find('legend').nextAll().toggle();
1481 [% UNLESS nouserid && nopassword %]
1482 [% IF fieldstohide.match('login') %]
1483 $("#memberentry_userid").find('legend').nextAll().toggle();
1486 [% UNLESS ( opadd || opduplicate ) %]
1487 [% IF fieldstohide.match('flags') %]
1488 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1491 [% IF fieldstohide.match('debarments') %]
1492 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1495 [% UNLESS step == 7 %]
1496 [% IF Koha.Preference('HouseboundModule') %]
1497 [% IF fieldstohide.match('housebound') %]
1498 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1502 [% UNLESS step == 4 %]
1503 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1504 [% IF fieldstohide.match('additional') %]
1505 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1509 [% UNLESS step == 5 %]
1510 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1511 [% IF fieldstohide.match('messaging') %]
1512 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1513 $("#messaging_prefs_loading").toggle();
1519 $(document).ready(function() {
1521 $("#toggle_hidden_fields").change(function(){
1525 $("legend").click(function(){
1526 $(this).nextAll().toggle();
1527 $("#messaging_prefs_loading").hide();
1530 $("#saverecord").css({ 'margin-left': 0 });
1532 Sticky = $("#toolbar");
1535 stickyClass: "floating"
1538 [% IF categorycode %]
1539 update_category_code( "[% categorycode | html %]" );
1541 if ( $("#categorycode_entry").length > 0 ){
1542 var category_code = $("#categorycode_entry").find("option:selected").val();
1543 update_category_code( category_code );
1547 [% IF new_guarantors %]
1548 [% FOREACH g IN new_guarantors %]
1549 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1553 $("#cn_max").hide();
1555 $("#cardnumber").on("keydown", function(e){
1556 content = $(this).val();
1558 $("#cardnumber").on("keyup", function(e){
1559 // .val() will return the value of the input after the key has been released
1560 var l = $(this).val().length;
1561 if ( l == content.length + 1 ) { l--; }
1562 update_cardnumber_warning(l);
1564 $("#cardnumber").bind("paste", function(e){
1565 var pastedData = e.originalEvent.clipboardData.getData('text');
1566 update_cardnumber_warning(pastedData.length - 1);
1568 var toggle_quick_add = $(".toggle_quick_add");
1569 $(toggle_quick_add).click(function(e){
1570 toggle_quick_add.toggle();
1573 var toggle_from = '';
1574 if( $("#entryform:visible").length ) {
1575 toggle_to = "#quick_add_form label";
1576 toggle_from = "#entryform label";
1577 $("#memberentry_guarantor").appendTo("#quick_add_form");
1579 toggle_to="#entryform label";
1580 toggle_from = "#quick_add_form label";
1581 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1583 $(toggle_from).each(function() {
1584 var input_label = $(this).attr('for');
1585 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1586 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1589 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1592 $(".toggler").toggle();
1595 $("#save_quick_add").click(function(){
1596 $("#quick_add_form").validate();
1597 if( $("#quick_add_form").valid()){
1598 $('.toggle_quick_add').click();
1599 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1600 $('#saverecord').click();
1602 else {return false;}
1605 $("#saverecord").click(function(){
1606 if( check_form_borrowers() ){
1607 $("#entryform").submit();
1611 $('#duplicate').on('click', function() {
1612 $("input[name='op']").val('modify');
1613 $("input[name='borrowernumber']").val('[% check_member | html %]');
1614 $("input[name='check_member']").val('');
1615 $('#entryform').submit();
1618 $('#not-duplicate').on('click', function() {
1619 $("input[name='nodouble']").val('1');
1620 $('#entryform').submit();
1624 var MSG_SEPARATOR = _("Separator must be / in field %s");
1625 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1626 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1627 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1628 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1629 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1630 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1631 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1632 var MSG_MONTH = _("%s month")
1633 var MSG_MONTHS = _("%s months")
1634 var MSG_YEAR = _("%s year")
1635 var MSG_YEARS = _("%s years")
1636 var LABEL_CHANGE = _("Change");
1637 var LABEL_SET_TO_PATRON = _("Set to patron");
1638 var LABEL_AGE = _("Age");
1639 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1641 [% IF quickadd && opadd && !check_member %]
1642 $(document).ready(function () {
1644 $("#entryform,#saverecord").hide();
1645 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1646 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1647 $("#entryform label").each(function () {
1648 var input_label = $(this).attr('for');
1649 if ( input_label == 'sex-female' ) {
1652 else if ( input_label == 'btitle' ) {
1653 input_label='title';
1655 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1656 $(this).parent().clone().appendTo("#quick_add_list");
1657 [% UNLESS mandatorypassword %]
1658 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1662 if ( $("#memberentry_guarantor").length ) {
1663 $("#memberentry_guarantor").appendTo("#quick_add_form");
1665 $("#quick_add_form").show();
1668 $("#guarantor_template").hide();
1671 [% Asset.js("js/members.js") | $raw %]
1672 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1673 [% PROCESS 'password_check.inc' %]
1674 [% PROCESS 'add_password_check' new_password => 'password' %]
1677 [% INCLUDE 'intranet-bottom.inc' %]