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 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>
103 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
104 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
109 <div class="dialog alert">
110 <p>The following fields are wrong. Please fix them.</p>
112 [% IF ( ERROR_login_exist ) %]
113 <li id="ERROR_login_exist">Username/password already exists.</li>
115 [% IF ERROR_cardnumber_already_exists %]
116 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
118 [% IF ERROR_cardnumber_length %]
119 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
121 [% IF ( ERROR_age_limitations ) %]
122 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
123 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
125 [% IF ( ERROR_branch ) %]
126 <li id="ERROR_branch">Library is invalid.</li>
128 [% IF ( ERROR_dateofbirth ) %]
129 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
131 [% IF ( ERROR_dateenrolled ) %]
132 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
134 [% IF ( ERROR_dateexpiry ) %]
135 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
137 [% IF ( ERROR_password_too_short ) %]
138 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
140 [% IF ( ERROR_password_too_weak ) %]
141 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
143 [% IF ( ERROR_password_has_whitespaces ) %]
144 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
146 [% IF ( ERROR_password_mismatch ) %]
147 <li id="ERROR_password_mismatch">Passwords do not match.</li>
149 [% IF ( ERROR_extended_unique_id_failed ) %]
150 <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>
152 [% IF ERROR_bad_email %]
153 <li id="ERROR_bad_email">The primary email is invalid.</li>
155 [% IF ERROR_bad_email_secondary %]
156 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
158 [% IF ERROR_bad_email_alternative %]
159 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
165 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
166 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
168 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
169 [% FOREACH field IN fieldstohide.split(',') %]
171 [% CASE 'identity' %] Organization/Patron identity |
172 [% CASE 'guarantor' %] Guarantor information |
173 [% CASE 'primary_address' %] Main address |
174 [% CASE 'primary_contact' %] Contact information |
175 [% CASE 'alt_address' %] Alternate address |
176 [% CASE 'alt_contact' %] Alternate contact |
177 [% CASE 'lib_mgmt' %] Library management |
178 [% CASE 'lib_setup' %] Library setup |
179 [% CASE 'login' %] OPAC/Staff login |
180 [% CASE 'flags' %] Patron account flags |
181 [% CASE 'debarments' %] Patron restrictions |
182 [% CASE 'housebound' %] Housebound roles |
183 [% CASE 'additional' %] Additional attributes and identifiers |
184 [% CASE 'messaging' %] Patron messaging preferences |
190 [% UNLESS ( check_member ) %]
191 <div id="toolbar" class="btn-toolbar">
192 [% IF quickadd && opadd %]
193 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
195 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
197 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
199 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
201 <i class="fa fa-times"></i> Cancel
206 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
207 [% UNLESS ( check_member ) %]
208 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
210 <!-- field always hidden in different form (1,2,3) -->
211 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
212 <input type="hidden" name="category_type" value="[% category_type | html %]" />
213 <input type="hidden" name="updtype" value="[% updtype | html %]" />
214 <input type="hidden" name="destination" value="[% destination | html %]" />
215 <input type="hidden" name="check_member" value="[% check_member | html %]" />
216 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
217 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
218 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
220 <input type="hidden" name="step" value="[% step | html %]" />
223 <input type="hidden" name="op" value="insert" />
224 [% ELSIF ( opduplicate ) %]
225 <input type="hidden" name="op" value="insert" />
227 <input type="hidden" name="op" value="save" />
228 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
229 [%# Only put the cardnumber if we arent showing it in the form later %]
231 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
237 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
238 <fieldset class="rows" id="memberentry_identity">
239 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
243 [% IF Koha.Preference('BorrowersTitles') %]
245 [% IF ( mandatorytitle ) %]
246 <label for="btitle" class="required">
251 <select id="btitle" name="title">
252 <option value=""></option>
253 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
255 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
257 <option value="[% t | html %]">[% t | html %]</option>
261 [% IF ( mandatorytitle ) %]
262 <span class="required">Required</span>
265 [% END # /IF Koha.Preference('BorrowersTitles') %]
266 [% END # /UNLESS notitle %]
267 [% END # /UNLESS ( I ) %]
269 [% UNLESS nosurname %]
272 <label for="surname" class="required">
276 [% IF ( mandatorysurname ) %]
277 <label for="surname" class="required">
279 <label for="surname">
284 [% IF ( uppercasesurnames ) %]
285 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
287 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
289 [% IF ( mandatorysurname ) %]
290 <span class="required">Required</span>
293 [% END # /UNLESS nosurname %]
296 [% UNLESS nofirstname %]
298 [% IF ( mandatoryfirstname ) %]
299 <label for="firstname" class="required">
301 <label for="firstname">
305 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
306 [% IF ( mandatoryfirstname ) %]
307 <span class="required">Required</span>
310 [% END #/UNLESS nofirstname %]
311 [% UNLESS nodateofbirth %]
313 [% IF ( mandatorydateofbirth ) %]
314 <label for="dateofbirth" class="required">
316 <label for="dateofbirth">
320 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
321 [% IF ( mandatorydateofbirth ) %]
322 <span class="required">Required</span>
324 [% IF ( ERROR_dateofbirth ) %]
325 <span class="required">(Error)</span>
327 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
329 [% END # /UNLESS nodateofbirth %]
330 [% UNLESS noinitials %]
332 [% IF ( mandatoryinitials ) %]
333 <label for="initials" class="required">
335 <label for="initials">
339 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
340 [% IF ( mandatoryinitials ) %]
341 <span class="required">Required</span>
344 [% END # /UNLESS noinitials %]
345 [% END #/UNLESS ( I ) %]
346 [% UNLESS noothernames %]
348 [% IF ( mandatoryothernames ) %]
349 <label for="othernames" class="required">
351 <label for="othernames">
355 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
356 [% IF ( mandatoryothernames ) %]
357 <span class="required">Required</span>
359 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
361 [% END #/UNLESS noothernames %]
366 [% UNLESS ( opduplicate ) %]
368 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
370 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
373 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
375 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
378 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
380 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
383 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
384 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
385 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
386 [% END # /UNLESS ( opduplicate )%]
388 [% END # /UNLESS nosex %]
389 [% END # /UNLESS ( I ) %]
391 </fieldset> <!-- /#memberentry_identity -->
392 [% END # hide fieldset %]
394 [% IF show_guarantor || guarantor %]
395 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
396 <span id="memberentry_guarantor_anchor">
397 <fieldset id="memberentry_guarantor" class="rows">
398 <legend>Guarantor information</legend>
400 <span id="guarantor_relationships">
401 [% FOREACH r IN relationships %]
402 <fieldset class="rows">
404 [% IF category_type == 'I' %]
405 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
406 <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 %]
410 <label for="guarantor_surname">Organization name: </label>
411 <span>[% r.guarantor.surname | html %]</span>
414 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
415 <span class="label">Patron card number:</span>
416 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
419 [% IF r.guarantor.surname %]
421 <label for="guarantor_surname">Surname: </label>
422 <span>[% r.guarantor.surname | html %]</span>
426 [% IF r.guarantor.firstname %]
428 <label for="guarantor_firstname">First name: </label>
429 <span>[% r.guarantor.firstname | html %]</span>
434 <label for="relationship">Relationship: </label>
435 <span>[% r.relationship | html %]</span>
439 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
440 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
445 [% END # END relationships foreach %]
446 [% IF guarantor && (!relationships) %]
447 <fieldset class="rows">
449 <li class="guarantor-details" data-borrowernumber="0">
450 <span class="label">Patron card number:</span>
451 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
452 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
456 <label for="guarantor_surname">Surname: </label>
457 <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
461 <label for="guarantor_firstname">First name: </label>
462 <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
466 <label for="guarantor_relationship">Relationship: </label>
467 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
468 [% FOREACH pr IN possible_relationships.split('\|') %]
469 <option value="[% pr | html %]">[% pr | html %]</option>
475 <label for="guarantor_cancel"> </label>
476 <span><a href="#" class="guarantor_cancel">Remove</a></span>
481 </span> <!-- #/guarantor_relationships -->
483 <fieldset class="rows guarantor" id="guarantor_template">
485 <li class="guarantor-details" data-borrowernumber="0">
486 <span class="label">Patron card number:</span>
487 <span class="new_guarantor_id_text"></span>
488 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
492 <label for="guarantor_surname">Surname: </label>
493 <span class="new_guarantor_surname_text"></span>
497 <label for="guarantor_firstname">First name: </label>
498 <span class="new_guarantor_firstname_text"></span>
502 <label for="guarantor_relationship">Relationship: </label>
503 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
504 [% FOREACH pr IN possible_relationships.split('\|') %]
505 <option value="[% pr | html %]">[% pr | html %]</option>
511 <label for="guarantor_cancel"> </label>
512 <span><a href="#" class="guarantor_cancel">Remove</a></span>
518 <input type="hidden" id="guarantor_id" value="" />
519 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
520 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
523 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
526 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
528 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
529 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
530 [% IF privacy_guarantor_checkouts %]
531 <option value="0">No</option>
532 <option value="1" selected>Yes</option>
534 <option value="0" selected>No</option>
535 <option value="1">Yes</option>
538 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
541 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
543 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
544 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
545 [% IF privacy_guarantor_fines %]
546 <option value="0">No</option>
547 <option value="1" selected>Yes</option>
549 <option value="0" selected>No</option>
550 <option value="1">Yes</option>
553 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
557 </fieldset> <!-- /#memberentry_guarantor -->
558 </span> <!-- #/memberentry_guarantor_anchor -->
559 [% END # /IF show_guarantor || guarantor %]
561 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
562 [% IF Koha.Preference( 'AddressFormat' ) %]
563 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
565 [% INCLUDE 'member-main-address-style-us.inc' %]
567 [% END # /UNLESS nostreet && nocity etc group%]
569 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
570 <fieldset class="rows" id="memberentry_contact">
571 <legend id="contact_lgd">Contact</legend>
573 [% UNLESS nocontactname %]
575 [% IF ( mandatorycontactname ) %]
576 <label for="contactname" class="required">
578 <label for="contactname">
582 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
583 [% IF ( mandatorycontactname ) %]
584 <span class="required">Required</span>
586 <div class="hint">Non-patron guarantor surname</div>
588 [% END # /UNLESS nocontactname %]
590 [% UNLESS nocontactfirstname %]
592 [% IF ( mandatorycontactfirstname ) %]
593 <label for="contactfirstname" class="required">
595 <label for="contactfirstname">
597 Guarantor first name:
599 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
600 [% IF ( mandatorycontactfirstname ) %]
601 <span class="required">Required</span>
603 <div class="hint">Non-patron guarantor first name</div>
605 [% END # /UNLESS noaltcontactfirstname %]
607 [% UNLESS norelationship %]
608 [% IF possible_relationships %]
610 <label for="relationship">Relationship: </label>
611 <select class="relationship" name="relationship">
612 <option value=""></option>
613 [% FOREACH pr IN possible_relationships.split('\|') %]
614 [% IF pr == relationship %]
615 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
617 <option value="[% pr | html %]">[% pr | html %]</option>
622 [% END #/IF possible_relationships %]
623 [% END # /UNLESS norelationship %]
627 [% IF ( mandatoryphone ) %]
628 <label for="phone" class="required">
634 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
635 [% IF ( mandatoryphone ) %]
636 <span class="required">Required</span>
638 <div class="hint">Shows on transit slips</div>
640 [% END # /UNLESS nophone %]
642 [% UNLESS nophonepro %]
644 [% IF ( mandatoryphonepro ) %]
645 <label for="phonepro" class="required">
647 <label for="phonepro">
651 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
652 [% IF ( mandatoryphonepro ) %]
653 <span class="required">Required</span>
656 [% END # /UNLESS nophonepro %]
658 [% UNLESS nomobile %]
660 [% IF ( mandatorymobile ) %]
661 <label for="mobile" class="required">
667 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
668 [% IF ( mandatorymobile ) %]
669 <span class="required">Required</span>
672 [% END # /UNLESS nomobile %]
676 [% IF ( mandatoryemail ) %]
677 <label for="email" class="required">
683 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
684 [% IF ( mandatoryemail ) %]
685 <span class="required">Required</span>
687 <div class="hint">Shows on transit slips</div>
689 [% END #/UNLESS noemail %]
691 [% UNLESS noemailpro %]
693 [% IF ( mandatoryemailpro ) %]
694 <label for="emailpro" class="required">
696 <label for="emailpro">
700 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
701 [% IF ( mandatoryemailpro ) %]
702 <span class="required">Required</span>
705 [% END # /UNLESS noemailpro %]
709 [% IF ( mandatoryfax ) %]
710 <label for="fax" class="required">
716 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
717 [% IF ( mandatoryfax ) %]
718 <span class="required">Required</span>
721 [% END #/UNLESS nofax %]
723 </fieldset> <!-- /#memberentry_contact -->
724 [% END # hide fieldset %]
726 <!-- ************************ STEP_1 *********************** -->
727 [% END # /IF ( step_1 ) %]
730 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
731 [% IF Koha.Preference( 'AddressFormat' ) %]
732 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
734 [% INCLUDE 'member-alt-address-style-us.inc' %]
736 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
737 [% END # /IF ( step_6 ) %]
740 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
741 [% IF Koha.Preference( 'AddressFormat' ) %]
742 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
744 [% INCLUDE 'member-alt-contact-style-us.inc' %]
746 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
747 [% END # /IF ( step_2 ) %]
750 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
751 <fieldset class="rows" id="memberentry_library_management">
752 <legend id="library_management_lgd">Library management</legend>
754 [% UNLESS nocardnumber %]
756 [% IF mandatorycardnumber %]
757 <label for="cardnumber" class="required">
759 <label for="cardnumber" class="validated">
764 <!-- NOTE: div.hint closing tag isn't on the same line -->
765 [% IF minlength_cardnumber == maxlength_cardnumber %]
766 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
767 [% IF mandatorycardnumber %]
768 <span class="required">Required</span>
770 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
771 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
772 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
773 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
774 [% IF mandatorycardnumber %]
775 <span class="required">Required</span>
777 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
778 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
779 [% ELSIF maxlength_cardnumber %]
780 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
781 [% IF mandatorycardnumber %]
782 <span class="required">Required</span>
784 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
785 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
787 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
788 [% IF mandatorycardnumber %]
789 <span class="required">Required</span>
791 <div class="hint">There is no minimum or maximum character length.
793 [% IF autoMemberNum %]
794 [% IF mandatorycardnumber %]
795 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
797 <br/>Leave blank for auto calc during registration
800 </div><!--/div.hint -->
802 [% END # /UNLESS nocardnumber %]
804 [% UNLESS nobranchcode %]
806 <label for="libraries" class="required">Library:</label>
807 <select name="branchcode" size="1" id="libraries">
808 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
810 <span class="required">Required</span>
815 <label for="categorycode_entry" class="required">Category: </label>
816 <select id="categorycode_entry" name="categorycode">
817 [% FOREACH typeloo IN typeloop %]
818 [% FOREACH categoryloo IN typeloo.categoryloop %]
819 [% IF ( loop.first ) %]
820 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
821 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
822 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
823 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
824 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
825 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
827 [% IF ( categoryloo.categorycodeselected ) %]
828 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
830 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
832 [% IF ( loop.last ) %]
835 [% END # /FOREACH categoryloo %]
836 [% END # /FOREACH typeloo %]
838 <span class="required">Required</span>
843 [% IF ( mandatorysort1 ) %]
844 <label for="sort1" class="required">
850 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
851 [% IF ( mandatorysort1 ) %]
852 <span class="required">Required</span>
855 [% END # /UNLESS nosort1 %]
859 [% IF ( mandatorysort2 ) %]
860 <label for="sort2" class="required">
866 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
867 [% IF ( mandatorysort2 ) %]
868 <span class="required">Required</span>
871 [% END # /UNLESS nosort2 %]
873 [% UNLESS noautorenew_checkouts %]
875 <label for="yes-autorenew_checkouts">
876 Allow auto-renewal of items:
878 [% IF ( autorenew_checkouts || opadd ) %]
879 <label for="yes-autorenew_checkouts">
881 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
883 <label for="no-autorenew_checkouts">
885 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
888 <label for="yes-autorenew_checkouts">
890 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
892 <label for="no-autorenew_checkouts">
894 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
900 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
902 <label for="checkprevcheckout">Check for previous checkouts: </label>
903 <select name="checkprevcheckout" id="checkprevcheckout">
904 [% IF ( checkprevcheckout == 'yes' ) %]
905 <option value="yes" selected="selected">Yes if settings allow it</option>
906 <option value="no">No if settings allow it</option>
907 <option value="inherit">Inherit from settings</option>
908 [% ELSIF ( checkprevcheckout == 'no' ) %]
909 <option value="yes">Yes if settings allow it</option>
910 <option value="no" selected="selected">No if settings allow it</option>
911 <option value="inherit">Inherit from settings</option>
913 <option value="yes">Yes if settings allow it</option>
914 <option value="no">No if settings allow it</option>
915 <option value="inherit" selected="selected">Inherit from settings</option>
919 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
921 [% IF Koha.Preference('TranslateNotices') %]
923 <label for="lang">Preferred language for notices: </label>
924 <select id="lang" name="lang">
925 <option value="default">Default</option>
926 [% FOR language IN languages %]
927 [% FOR sublanguage IN language.sublanguages_loop %]
928 [% IF language.plural %]
929 [% IF sublanguage.rfc4646_subtag == lang %]
930 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
932 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
935 [% IF sublanguage.rfc4646_subtag == lang %]
936 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
938 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
940 [% END # /IF language.plural %]
941 [% END # /FOR sublanguage %]
942 [% END #/FOR language %]
943 </select> <!-- /#lang -->
945 [% END #/IF Koha.Preference('TranslateNotices') %]
947 </fieldset> <!-- /#memberentry_library_management -->
949 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
950 <fieldset class="rows" id="memberentry_subscription">
951 <legend id="library_setup_lgd">Library set-up</legend><ol>
952 [% UNLESS nodateenrolled %]
954 [% IF ( mandatorydateenrolled ) %]
955 <label for="from" class="required">
961 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
962 [% IF ( mandatorydateenrolled ) %]
963 <span class="required">Required</span>
965 [% IF ( ERROR_dateenrolled ) %]
966 <span class="required">(Error)</span>
968 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
970 [% END # /UNLESS nodateenrolled %]
972 [% UNLESS nodateexpiry %]
975 <li style="display:none">
977 [% IF ( mandatorydateexpiry ) %]
978 <label for="to" class="required">
982 Expiry date (leave blank for auto calc):
984 [% UNLESS ( opadd ) %]
985 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
987 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
989 [% IF ( mandatorydateexpiry ) %]
990 <span class="required">Required</span>
992 [% IF ( ERROR_dateexpiry ) %]
993 <span class="required">(Error)</span>
995 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
998 [% UNLESS noopacnote %]
1000 [% IF ( mandatoryopacnote ) %]
1001 <label for="opacnote" class="required">
1003 <label for="opacnote">
1007 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1008 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1009 [% IF ( mandatoryopacnote ) %]
1010 <span class="required">Required</span>
1013 [% END # /UNLESS noopacnote %]
1015 [% UNLESS noborrowernotes %]
1017 [% IF ( mandatoryborrowernotes ) %]
1018 <label for="borrowernotes" class="required">
1020 <label for="borrowernotes">
1024 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1025 <div class="hint">This message displays when checking out to this patron</div>
1026 [% IF ( mandatoryborrowernotes ) %]
1027 <span class="required">Required</span>
1030 [% END # /UNLESS noborrowernotes %]
1032 </fieldset> <!-- /#memberentry_subscription -->
1033 [% END # hide fieldset %]
1035 [% UNLESS nouserid && nopassword %]
1036 <fieldset class="rows" id="memberentry_userid">
1037 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1039 [% UNLESS nouserid %]
1041 [% IF ( mandatoryuserid ) %]
1042 <label for="userid" class="required">
1044 <label for="userid">
1049 [% IF ( NoUpdateLogin ) %]
1050 [% IF ( opduplicate ) %]
1051 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1053 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1056 [% IF ( opduplicate ) %]
1057 <input type="text" id="userid" name="userid" size="20" value="" />
1059 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1061 [% END # /IF ( NoUpdateLogin ) %]
1063 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1064 <input type="text" disabled="disabled" style="display:none" />
1066 [% IF ( mandatoryuserid ) %]
1067 <span class="required">Required</span>
1070 [% END # /UNLESS nouserid %]
1072 [% UNLESS nopassword %]
1074 [% IF ( mandatorypassword ) %]
1075 <label for="password" class="required">
1077 <label for="password">
1082 [% IF ( NoUpdateLogin ) %]
1083 [% IF ( opduplicate ) %]
1084 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1086 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1089 [% IF ( opduplicate ) %]
1090 <input type="password" id="password" name="password" size="20" />
1092 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1094 [% END # /IF ( NoUpdateLogin ) %]
1095 [% ELSE # IF ( opadd ) %]
1097 [% IF ( password ) %]
1098 [% IF ( NoUpdateLogin ) %]
1099 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1101 [% IF ( opduplicate ) %]
1102 <input type="password" id="password" name="password" size="20" />
1104 <input type="password" id="password" name="password" size="20" value="****" />
1108 [% IF ( NoUpdateLogin ) %]
1109 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1111 <input type="password" id="password" name="password" size="20" value="" />
1113 [% END # /IF ( password ) %]
1114 [% END # /IF ( opadd ) %]
1115 [% IF ( mandatorypassword ) %]
1116 <span class="required">Required</span>
1118 [% IF ( ERROR_password_too_short ) %]
1119 <span class="required">Password is too short</span>
1121 [% IF ( ERROR_password_too_weak ) %]
1122 <span class="required">Password is too weak</span>
1124 [% IF ( ERROR_password_has_whitespaces ) %]
1125 <span class="required">Password has leading or trailing whitespaces</span>
1127 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1131 [% IF ( mandatorypassword ) %]
1132 <label for="password2" class="required">
1134 <label for="password2">
1139 [% IF ( NoUpdateLogin ) %]
1140 [% IF ( opduplicate ) %]
1141 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1143 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1146 [% IF ( opduplicate ) %]
1147 <input type="password" id="password2" name="password2" size="20" />
1149 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1152 [% ELSE # IF ( opadd ) %]
1153 [% IF ( password ) %]
1154 [% IF ( NoUpdateLogin ) %]
1155 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1157 [% IF ( opduplicate ) %]
1158 <input type="password" id="password2" name="password2" size="20" />
1160 <input type="password" id="password2" name="password2" size="20" value="****" />
1164 [% IF ( NoUpdateLogin ) %]
1165 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1167 <input type="password" id="password2" name="password2" size="20" value="" />
1170 [% END # /IF ( opadd ) %]
1172 [% IF ( mandatorypassword ) %]
1173 <span class="required">Required</span>
1175 [% IF ( ERROR_password_mismatch ) %]
1176 <span class="required">Passwords do not match</span>
1179 [% END # /UNLESS nopassword %]
1181 </fieldset> <!-- /#memberentry_userid -->
1182 [% END # UNLESS nouserid && nopassword %]
1184 <!--this zones are not necessary in modif mode -->
1185 [% UNLESS ( opadd || opduplicate ) %]
1186 <fieldset class="rows" id="memberentry_account_flags">
1187 <legend id="account_flags_lgd">Patron account flags</legend>
1189 [% FOREACH flagloo IN flagloop %]
1191 <label class="radio" for="yes[% flagloo.name | html %]">
1192 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1193 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1195 [% IF CAN_user_circulate_manage_restrictions %]
1196 <label for="yes[% flagloo.name | html %]">
1197 [% IF ( flagloo.yes ) %]
1198 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1200 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1204 <label for="no[% flagloo.name | html %]">
1205 [% IF ( flagloo.no ) %]
1206 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1208 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1213 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1214 [% END # /IF CAN_user_circulate_manage_restrictions %]
1216 [% END # /FOREACH flagloo %]
1218 </fieldset> <!-- /#memberentry_account_flags -->
1220 <fieldset class="rows" id="memberentry_restrictions">
1221 <legend id="restrictions_lgd">Patron restrictions</legend>
1222 [% IF ( debarments ) %]
1229 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1230 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1236 [% FOREACH d IN debarments %]
1238 <td>[% d.type | html %]</td>
1240 [% IF d.comment.search('OVERDUES_PROCESS') %]
1241 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1243 [% d.comment | $raw %]
1247 [% IF d.expiration %]
1248 [% d.expiration | $KohaDates %]
1253 <td>[% d.created | $KohaDates %]</td>
1254 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1256 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1260 [% END # /FOREACH d %]
1264 <p>Patron is currently unrestricted.</p>
1265 [% END # /IF ( debarments ) %]
1267 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1268 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1269 <fieldset id="manual_restriction_form">
1270 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1271 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1274 <label for="debarred_comment">Comment: </label>
1275 <input type="text" id="debarred_comment" name="debarred_comment" />
1278 <label for="debarred_expiration">Expiration: </label>
1279 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1280 <a href="#" id="clear_debarred_expiration">Clear date</a>
1284 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1286 </fieldset> <!-- /#manual_restriction_form -->
1287 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1288 </fieldset> <!-- /#memberentry_restrictions -->
1289 [% END # /UNLESS ( opadd || opduplicate ) %]
1290 [% END # /IF ( step_3 ) %]
1293 [% IF Koha.Preference('HouseboundModule') %]
1294 <fieldset class="rows" id="memberentry_housebound_roles">
1295 <legend id="housebound_roles">Housebound roles</legend>
1298 <label class="radio" for="housebound_chooser">
1301 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1302 <label for="yes_housebound_chooser">Yes </label>
1303 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1304 <label for="no_housebound_chooser">No </label>
1305 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1307 <label for="yes_housebound_chooser">Yes </label>
1308 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1309 <label for="no_housebound_chooser">No </label>
1310 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1314 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1315 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1316 <label for="yes_housebound_deliverer">Yes </label>
1317 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1318 <label for="no_housebound_deliverer">No </label>
1319 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1321 <label for="yes_housebound_deliverer">Yes </label>
1322 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1323 <label for="no_housebound_deliverer">No </label>
1324 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1327 </ol> <!-- /ol.radio -->
1328 </fieldset> <!-- /#memberentry_housebound_roles -->
1329 [% END # hide fieldset %]
1330 [% END # IF step_7 %]
1333 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1334 [% UNLESS ( no_patron_attribute_types ) %]
1335 <fieldset class="rows" id="memberentry_patron_attributes">
1336 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1337 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1338 [% FOREACH pa_loo IN patron_attributes %]
1339 <ol class="attributes_table">
1340 [% IF pa_loo.class %]
1341 <fieldset id="aai_[% pa_loo.class | html %]">
1342 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1344 [% FOREACH patron_attribute IN pa_loo.items %]
1345 <li data-category_code="[% patron_attribute.category_code | html %]">
1346 <label for="[% patron_attribute.form_id | html %]">
1347 [% patron_attribute.description | html %]:
1349 [% IF ( patron_attribute.use_dropdown ) %]
1350 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1351 <option value=""></option>
1352 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1353 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1354 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1355 [% auth_val_loo.lib | html %]
1358 <option value="[% auth_val_loo.authorised_value | html %]" >
1359 [% auth_val_loo.lib | html %]
1365 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1366 [% END # /IF ( patron_attribute.use_dropdown ) %]
1367 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1368 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1369 [% IF ( patron_attribute.repeatable ) %]
1370 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1373 [% END # /FOREACH patron_attribute %]
1374 [% IF pa_loo.class %]</fieldset>[% END %]
1376 [% END # /FOREACH pa_loo %]
1377 </fieldset> <!-- /#memberentry_patron_attributes -->
1378 [% END # UNLESS ( no_patron_attribute_types ) %]
1379 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1380 [% END # IF ( step_4 ) %]
1383 [% IF ( EnhancedMessagingPreferences ) %]
1384 <fieldset class="rows" id="memberentry_messaging_prefs">
1385 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1386 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1387 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1389 <input type="hidden" name="setting_messaging_prefs" value="1" />
1390 [% INCLUDE 'messaging-preference-form.inc' %]
1391 [% IF ( SMSSendDriver ) %]
1393 <label for="SMSnumber">SMS number:</label>
1394 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1395 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1397 [% UNLESS nosms_provider_id %]
1399 <label for="sms_provider_id">SMS provider:</label>
1400 <select id="sms_provider_id" name="sms_provider_id">
1401 <option value="">Unknown</option>
1402 [% FOREACH s IN sms_providers %]
1403 [% IF s.id == sms_provider_id %]
1404 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1406 <option value="[% s.id | html %]">[% s.name | html %]</option>
1411 [% END # /UNLESS nosms_provider_id %]
1412 [% END # IF ( SMSSendDriver ) %]
1414 [% END # IF ( EnhancedMessagingPreferences ) %]
1415 [% END # /IF step_5 %]
1416 </form> <!-- /#entryform -->
1418 [% IF quickadd && opadd && !check_member %]
1419 <form id="quick_add_form" class="toggler">
1420 <fieldset class="rows quick_add"><legend>Quick add</legend>
1421 <ol id="quick_add_list">
1427 [% END # /UNLESS ( no_add ) %]
1429 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1431 [% UNLESS ( opadd ) %]
1432 <div class="col-sm-2 col-sm-pull-10">
1434 [% INCLUDE 'circ-menu.inc' %]
1436 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1438 </div> <!-- /.row -->
1440 [% MACRO jsinclude BLOCK %]
1441 [% Asset.js("lib/hc-sticky.js") | $raw %]
1442 [% INCLUDE 'calendar.inc' %]
1443 [% INCLUDE 'str/members-menu.inc' %]
1444 [% Asset.js("js/members-menu.js") | $raw %]
1446 function update_cardnumber_warning(size){
1447 var max_len = [% maxlength_cardnumber | html %];
1448 if ( size >= max_len ) {
1449 $("#cn_max").show();
1451 $("#cn_max").hide();
1455 function showHideFields(){
1456 [% UNLESS step == 1 %]
1457 [% IF fieldstohide.match('identity') %]
1458 $("#memberentry_identity").find('legend').nextAll().toggle();
1460 [% IF show_guarantor || guarantor %]
1461 [% IF fieldstohide.match('guarantor') %]
1462 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1463 $("#guarantor_template").toggle();
1466 [% IF fieldstohide.match('primary_address') %]
1467 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1469 [% IF fieldstohide.match('primary_contact') %]
1470 $("#memberentry_contact").find('legend').nextAll().toggle();
1473 [% UNLESS step == 6 %]
1474 [% IF fieldstohide.match('alt_address') %]
1475 $("#memberentry_address").find('legend').nextAll().toggle();
1478 [% UNLESS step == 2 %]
1479 [% IF fieldstohide.match('alt_contact') %]
1480 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1483 [% UNLESS step == 3 %]
1484 [% IF fieldstohide.match('lib_mgmt') %]
1485 $("#memberentry_library_management").find('legend').nextAll().toggle();
1487 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1488 [% IF fieldstohide.match('lib_setup') %]
1489 $("#memberentry_subscription").find('legend').nextAll().toggle();
1492 [% UNLESS nouserid && nopassword %]
1493 [% IF fieldstohide.match('login') %]
1494 $("#memberentry_userid").find('legend').nextAll().toggle();
1497 [% UNLESS ( opadd || opduplicate ) %]
1498 [% IF fieldstohide.match('flags') %]
1499 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1502 [% IF fieldstohide.match('debarments') %]
1503 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1506 [% UNLESS step == 7 %]
1507 [% IF Koha.Preference('HouseboundModule') %]
1508 [% IF fieldstohide.match('housebound') %]
1509 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1513 [% UNLESS step == 4 %]
1514 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1515 [% IF fieldstohide.match('additional') %]
1516 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1520 [% UNLESS step == 5 %]
1521 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1522 [% IF fieldstohide.match('messaging') %]
1523 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1524 $("#messaging_prefs_loading").toggle();
1530 $(document).ready(function() {
1532 $("#toggle_hidden_fields").change(function(){
1536 $("legend").click(function(){
1537 $(this).nextAll().toggle();
1538 $("#messaging_prefs_loading").hide();
1541 $("#saverecord").css({ 'margin-left': 0 });
1543 Sticky = $("#toolbar");
1546 stickyClass: "floating"
1549 [% IF categorycode %]
1550 update_category_code( "[% categorycode | html %]" );
1552 if ( $("#categorycode_entry").length > 0 ){
1553 var category_code = $("#categorycode_entry").find("option:selected").val();
1554 update_category_code( category_code );
1558 [% IF new_guarantors %]
1559 [% FOREACH g IN new_guarantors %]
1560 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1564 $("#cn_max").hide();
1566 $("#cardnumber").on("keydown", function(e){
1567 content = $(this).val();
1569 $("#cardnumber").on("keyup", function(e){
1570 // .val() will return the value of the input after the key has been released
1571 var l = $(this).val().length;
1572 if ( l == content.length + 1 ) { l--; }
1573 update_cardnumber_warning(l);
1575 $("#cardnumber").bind("paste", function(e){
1576 var pastedData = e.originalEvent.clipboardData.getData('text');
1577 update_cardnumber_warning(pastedData.length - 1);
1579 var toggle_quick_add = $(".toggle_quick_add");
1580 $(toggle_quick_add).click(function(e){
1581 toggle_quick_add.toggle();
1584 var toggle_from = '';
1585 if( $("#entryform:visible").length ) {
1586 toggle_to = "#quick_add_form label";
1587 toggle_from = "#entryform label";
1588 $("#memberentry_guarantor").appendTo("#quick_add_form");
1590 toggle_to="#entryform label";
1591 toggle_from = "#quick_add_form label";
1592 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1594 $(toggle_from).each(function() {
1595 var input_label = $(this).attr('for');
1596 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1597 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1600 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1603 $(".toggler").toggle();
1606 $("#save_quick_add").click(function(){
1607 $("#quick_add_form").validate();
1608 if( $("#quick_add_form").valid()){
1609 $('.toggle_quick_add').click();
1610 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1611 $('#saverecord').click();
1613 else {return false;}
1616 $("#saverecord").click(function(){
1617 if( check_form_borrowers() ){
1618 $("#entryform").submit();
1622 $('#duplicate').on('click', function() {
1623 $("input[name='op']").val('modify');
1624 $("input[name='borrowernumber']").val('[% check_member | html %]');
1625 $("input[name='check_member']").val('');
1626 $('#entryform').submit();
1629 $('#not-duplicate').on('click', function() {
1630 $("input[name='nodouble']").val('1');
1631 $('#entryform').submit();
1634 $(".popup_patronview").on("click", function(e){
1636 var url = $(this).attr("href");
1637 openWindow( url, "patronview" );
1640 $("#dateofbirth").on("change", function(){
1644 $("#debarred_comment, #debarred_expiration").on("change", function(){
1645 $("#add_debarment").val(1);
1648 $("#clear_debarred_expiration").on("click", function(e){
1650 $('#debarred_expiration').val("");
1653 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1655 clear_entry( this );
1658 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1660 clone_entry( this );
1663 $("#categorycode_entry").on("change", function(){
1664 update_category_code(this);
1668 var MSG_SEPARATOR = _("Separator must be / in field %s");
1669 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1670 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1671 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1672 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1673 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1674 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1675 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1676 var MSG_MONTH = _("%s month")
1677 var MSG_MONTHS = _("%s months")
1678 var MSG_YEAR = _("%s year")
1679 var MSG_YEARS = _("%s years")
1680 var LABEL_CHANGE = _("Change");
1681 var LABEL_SET_TO_PATRON = _("Set to patron");
1682 var LABEL_AGE = _("Age");
1683 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1685 [% IF quickadd && opadd && !check_member %]
1686 $(document).ready(function () {
1688 $("#entryform,#saverecord").hide();
1689 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1690 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1691 $("#entryform label").each(function () {
1692 var input_label = $(this).attr('for');
1693 if ( input_label == 'sex-female' ) {
1696 else if ( input_label == 'btitle' ) {
1697 input_label='title';
1699 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1700 $(this).parent().clone().appendTo("#quick_add_list");
1701 [% UNLESS mandatorypassword %]
1702 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1706 if ( $("#memberentry_guarantor").length ) {
1707 $("#memberentry_guarantor").appendTo("#quick_add_form");
1709 $("#quick_add_form").show();
1712 $("#guarantor_template").hide();
1715 [% Asset.js("js/members.js") | $raw %]
1716 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1717 [% PROCESS 'password_check.inc' %]
1718 [% PROCESS 'add_password_check' new_password => 'password' %]
1721 [% INCLUDE 'intranet-bottom.inc' %]