1 [% PROCESS 'i18n.inc' %]
8 [% PROCESS 'member-main-address-style.inc' %]
9 [% PROCESS 'member-alt-address-style.inc' %]
10 [% PROCESS 'member-alt-contact-style.inc' %]
11 [% SET footerjs = 1 %]
12 [% INCLUDE 'doc-head-open.inc' %]
13 <title>Koha › Patrons ›
14 [% UNLESS blocking_error %]
17 [% ELSIF ( opduplicate ) %]
22 [% INCLUDE 'patron-title.inc' no_html = 1 %]
23 [% IF categoryname %]([% categoryname | html %])[% END %]
31 [% INCLUDE 'doc-head-close.inc' %]
34 <body id="pat_memberentrygen" class="pat">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'patron-search.inc' %]
38 <div id="breadcrumbs">
39 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
40 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
41 [% UNLESS blocking_error %]
43 [% IF (firstname || surname ) %]
44 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">
45 [% INCLUDE 'patron-title.inc' %]
51 [% ELSIF ( opduplicate ) %]
56 [% IF categoryname %]([% categoryname | html %])[% END %]
59 </div> <!-- /#breadcrumbs -->
61 <div class="main container-fluid">
64 [% FOR message IN messages %]
65 [% SWITCH message.error %]
66 [% CASE 'error_on_insert_patron' %]
67 <div class="dialog alert">Something went wrong when creating the patron. Check the logs.</div>
68 [% CASE 'error_on_update_patron' %]
69 <div class="dialog alert">Something went wrong when updating the patron. Check the logs.</div>
70 [% CASE %]Unhandled error: [% message.error | html %]
75 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
77 <div class="col-sm-10 col-sm-push-2">
79 <main class="clearfix">
80 [% INCLUDE 'blocking_errors.inc' %]
83 [% IF ( error_alert == "no_email" ) %]
84 <div class="dialog alert">This member has no email</div>
86 <div class="dialog alert">[% error_alert | html %]</div>
90 <div class="dialog message">Email has been sent.</div>
93 [% INCLUDE 'noadd-warnings.inc' %]
95 [% UNLESS ( no_add ) %]
99 [% ELSIF ( opduplicate ) %]
104 [% INCLUDE 'patron-title.inc' %]
105 [% IF categoryname %]([% categoryname | html %])[% END %]
108 [% IF quickadd && opadd && !check_member %]
109 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
110 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
113 [% IF ( check_member ) %]
114 <div class="dialog alert">
115 <h3>Duplicate patron record?</h3>
116 <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>
117 <button id="duplicate" type="submit" class="new"> <i class="fa fa-pencil"></i> It is a duplicate. Edit existing record </button>
118 <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
123 <div class="dialog alert">
124 <p>The following fields are wrong. Please fix them.</p>
126 [% IF ( ERROR_login_exist ) %]
127 <li id="ERROR_login_exist">Username/password already exists.</li>
129 [% IF ERROR_cardnumber_already_exists %]
130 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
132 [% IF ERROR_cardnumber_length %]
133 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
135 [% IF ( ERROR_age_limitations ) %]
136 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
137 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
139 [% IF ( ERROR_branch ) %]
140 <li id="ERROR_branch">Library is invalid.</li>
142 [% IF ( ERROR_dateofbirth ) %]
143 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
145 [% IF ( ERROR_dateenrolled ) %]
146 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
148 [% IF ( ERROR_dateexpiry ) %]
149 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
151 [% IF ( ERROR_password_too_short ) %]
152 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
154 [% IF ( ERROR_password_too_weak ) %]
155 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
157 [% IF ( ERROR_password_has_whitespaces ) %]
158 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
160 [% IF ( ERROR_password_mismatch ) %]
161 <li id="ERROR_password_mismatch">Passwords do not match.</li>
163 [% IF ( ERROR_extended_unique_id_failed ) %]
164 <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>
166 [% IF ERROR_bad_email %]
167 <li id="ERROR_bad_email">The primary email is invalid.</li>
169 [% IF ERROR_bad_email_secondary %]
170 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
172 [% IF ERROR_bad_email_alternative %]
173 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
179 [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
180 [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
182 <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
183 [% FOREACH field IN fieldstohide.split(',') %]
185 [% CASE 'identity' %] Organization/Patron identity |
186 [% CASE 'guarantor' %] Guarantor information |
187 [% CASE 'primary_address' %] Main address |
188 [% CASE 'primary_contact' %] Contact information |
189 [% CASE 'alt_address' %] Alternate address |
190 [% CASE 'alt_contact' %] Alternate contact |
191 [% CASE 'lib_mgmt' %] Library management |
192 [% CASE 'lib_setup' %] Library setup |
193 [% CASE 'login' %] OPAC/Staff login |
194 [% CASE 'flags' %] Patron account flags |
195 [% CASE 'debarments' %] Patron restrictions |
196 [% CASE 'housebound' %] Housebound roles |
197 [% CASE 'additional' %] Additional attributes and identifiers |
198 [% CASE 'messaging' %] Patron messaging preferences |
204 [% UNLESS ( check_member ) %]
205 <div id="toolbar" class="btn-toolbar">
206 [% IF quickadd && opadd %]
207 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
209 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
211 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
213 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
215 <i class="fa fa-times"></i> Cancel
220 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler">
221 [% UNLESS ( check_member ) %]
222 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
224 <!-- field always hidden in different form (1,2,3) -->
225 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
226 <input type="hidden" name="category_type" value="[% category_type | html %]" />
227 <input type="hidden" name="updtype" value="[% updtype | html %]" />
228 <input type="hidden" name="destination" value="[% destination | html %]" />
229 <input type="hidden" name="check_member" value="[% check_member | html %]" />
230 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
231 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
232 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
234 <input type="hidden" name="step" value="[% step | html %]" />
237 <input type="hidden" name="op" value="insert" />
238 [% ELSIF ( opduplicate ) %]
239 <input type="hidden" name="op" value="insert" />
241 <input type="hidden" name="op" value="save" />
242 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
243 [%# Only put the cardnumber if we arent showing it in the form later %]
245 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
251 [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
252 <fieldset class="rows" id="memberentry_identity">
253 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
257 [% IF Koha.Preference('BorrowersTitles') %]
259 [% IF ( mandatorytitle ) %]
260 <label for="btitle" class="required">
265 <select id="btitle" name="title">
266 <option value=""></option>
267 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
269 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
271 <option value="[% t | html %]">[% t | html %]</option>
275 [% IF ( mandatorytitle ) %]
276 <span class="required">Required</span>
279 [% END # /IF Koha.Preference('BorrowersTitles') %]
280 [% END # /UNLESS notitle %]
281 [% END # /UNLESS ( I ) %]
283 [% UNLESS nosurname %]
286 <label for="surname" class="required">
290 [% IF ( mandatorysurname ) %]
291 <label for="surname" class="required">
293 <label for="surname">
298 [% IF ( uppercasesurnames ) %]
299 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
301 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
303 [% IF ( mandatorysurname ) %]
304 <span class="required">Required</span>
307 [% END # /UNLESS nosurname %]
310 [% UNLESS nofirstname %]
312 [% IF ( mandatoryfirstname ) %]
313 <label for="firstname" class="required">
315 <label for="firstname">
319 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
320 [% IF ( mandatoryfirstname ) %]
321 <span class="required">Required</span>
324 [% END #/UNLESS nofirstname %]
325 [% UNLESS nodateofbirth %]
327 [% IF ( mandatorydateofbirth ) %]
328 <label for="dateofbirth" class="required">
330 <label for="dateofbirth">
334 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
335 [% IF ( mandatorydateofbirth ) %]
336 <span class="required">Required</span>
338 [% IF ( ERROR_dateofbirth ) %]
339 <span class="required">(Error)</span>
341 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
343 [% END # /UNLESS nodateofbirth %]
344 [% UNLESS noinitials %]
346 [% IF ( mandatoryinitials ) %]
347 <label for="initials" class="required">
349 <label for="initials">
353 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
354 [% IF ( mandatoryinitials ) %]
355 <span class="required">Required</span>
358 [% END # /UNLESS noinitials %]
359 [% END #/UNLESS ( I ) %]
360 [% UNLESS noothernames %]
362 [% IF ( mandatoryothernames ) %]
363 <label for="othernames" class="required">
365 <label for="othernames">
369 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
370 [% IF ( mandatoryothernames ) %]
371 <span class="required">Required</span>
373 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
375 [% END #/UNLESS noothernames %]
380 [% UNLESS ( opduplicate ) %]
382 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
384 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
387 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
389 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
392 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
394 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
397 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
398 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
399 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
400 [% END # /UNLESS ( opduplicate )%]
402 [% END # /UNLESS nosex %]
403 [% END # /UNLESS ( I ) %]
405 </fieldset> <!-- /#memberentry_identity -->
406 [% END # hide fieldset %]
408 [% IF show_guarantor || guarantor %]
409 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
410 <span id="memberentry_guarantor_anchor">
411 <fieldset id="memberentry_guarantor" class="rows">
412 <legend>Guarantor information</legend>
414 <span id="guarantor_relationships">
415 [% FOREACH r IN relationships %]
416 <fieldset class="rows">
418 [% IF category_type == 'I' %]
419 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
420 <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 %]
424 <label for="guarantor_surname">Organization name: </label>
425 <span>[% r.guarantor.surname | html %]</span>
428 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
429 <span class="label">Patron card number:</span>
430 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
433 [% IF r.guarantor.surname %]
435 <label for="guarantor_surname">Surname: </label>
436 <span>[% r.guarantor.surname | html %]</span>
440 [% IF r.guarantor.firstname %]
442 <label for="guarantor_firstname">First name: </label>
443 <span>[% r.guarantor.firstname | html %]</span>
448 <label for="relationship">Relationship: </label>
449 <span>[% r.relationship | html %]</span>
453 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
454 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
459 [% END # END relationships foreach %]
460 [% IF guarantor && (!relationships) %]
461 <fieldset class="rows">
463 <li class="guarantor-details" data-borrowernumber="0">
464 <span class="label">Patron card number:</span>
465 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
466 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
470 <label for="guarantor_surname">Surname: </label>
471 <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
475 <label for="guarantor_firstname">First name: </label>
476 <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
480 <label for="guarantor_relationship">Relationship: </label>
481 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
482 [% FOREACH pr IN possible_relationships.split('\|') %]
483 <option value="[% pr | html %]">[% pr | html %]</option>
489 <label for="guarantor_cancel"> </label>
490 <span><a href="#" class="guarantor_cancel">Remove</a></span>
495 </span> <!-- #/guarantor_relationships -->
497 <fieldset class="rows guarantor" id="guarantor_template">
499 <li class="guarantor-details" data-borrowernumber="0">
500 <span class="label">Patron card number:</span>
501 <span class="new_guarantor_id_text"></span>
502 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
506 <label for="guarantor_surname">Surname: </label>
507 <span class="new_guarantor_surname_text"></span>
511 <label for="guarantor_firstname">First name: </label>
512 <span class="new_guarantor_firstname_text"></span>
516 <label for="guarantor_relationship">Relationship: </label>
517 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
518 [% FOREACH pr IN possible_relationships.split('\|') %]
519 <option value="[% pr | html %]">[% pr | html %]</option>
525 <label for="guarantor_cancel"> </label>
526 <span><a href="#" class="guarantor_cancel">Remove</a></span>
532 <input type="hidden" id="guarantor_id" value="" />
533 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
534 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
537 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
540 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
542 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
543 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
544 [% IF privacy_guarantor_checkouts %]
545 <option value="0">No</option>
546 <option value="1" selected>Yes</option>
548 <option value="0" selected>No</option>
549 <option value="1">Yes</option>
552 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
555 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
557 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
558 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
559 [% IF privacy_guarantor_fines %]
560 <option value="0">No</option>
561 <option value="1" selected>Yes</option>
563 <option value="0" selected>No</option>
564 <option value="1">Yes</option>
567 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
571 </fieldset> <!-- /#memberentry_guarantor -->
572 </span> <!-- #/memberentry_guarantor_anchor -->
573 [% END # /IF show_guarantor || guarantor %]
575 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
576 [% PROCESS 'main-address-style' %]
577 [% END # /UNLESS nostreet && nocity etc group%]
579 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
580 <fieldset class="rows" id="memberentry_contact">
581 <legend id="contact_lgd">Contact</legend>
583 [% UNLESS nocontactname %]
585 [% IF ( mandatorycontactname ) %]
586 <label for="contactname" class="required">
588 <label for="contactname">
592 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
593 [% IF ( mandatorycontactname ) %]
594 <span class="required">Required</span>
596 <div class="hint">Non-patron guarantor surname</div>
598 [% END # /UNLESS nocontactname %]
600 [% UNLESS nocontactfirstname %]
602 [% IF ( mandatorycontactfirstname ) %]
603 <label for="contactfirstname" class="required">
605 <label for="contactfirstname">
607 Guarantor first name:
609 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
610 [% IF ( mandatorycontactfirstname ) %]
611 <span class="required">Required</span>
613 <div class="hint">Non-patron guarantor first name</div>
615 [% END # /UNLESS noaltcontactfirstname %]
617 [% UNLESS norelationship %]
618 [% IF possible_relationships %]
620 <label for="relationship">Relationship: </label>
621 <select class="relationship" name="relationship">
622 <option value=""></option>
623 [% FOREACH pr IN possible_relationships.split('\|') %]
624 [% IF pr == relationship %]
625 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
627 <option value="[% pr | html %]">[% pr | html %]</option>
632 [% END #/IF possible_relationships %]
633 [% END # /UNLESS norelationship %]
637 [% IF ( mandatoryphone ) %]
638 <label for="phone" class="required">
644 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
645 [% IF ( mandatoryphone ) %]
646 <span class="required">Required</span>
648 <div class="hint">Shows on transit slips</div>
650 [% END # /UNLESS nophone %]
652 [% UNLESS nophonepro %]
654 [% IF ( mandatoryphonepro ) %]
655 <label for="phonepro" class="required">
657 <label for="phonepro">
661 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
662 [% IF ( mandatoryphonepro ) %]
663 <span class="required">Required</span>
666 [% END # /UNLESS nophonepro %]
668 [% UNLESS nomobile %]
670 [% IF ( mandatorymobile ) %]
671 <label for="mobile" class="required">
677 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
678 [% IF ( mandatorymobile ) %]
679 <span class="required">Required</span>
682 [% END # /UNLESS nomobile %]
686 [% IF ( mandatoryemail ) %]
687 <label for="email" class="required">
693 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
694 [% IF ( mandatoryemail ) %]
695 <span class="required">Required</span>
697 <div class="hint">Shows on transit slips</div>
699 [% END #/UNLESS noemail %]
701 [% UNLESS noemailpro %]
703 [% IF ( mandatoryemailpro ) %]
704 <label for="emailpro" class="required">
706 <label for="emailpro">
710 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
711 [% IF ( mandatoryemailpro ) %]
712 <span class="required">Required</span>
715 [% END # /UNLESS noemailpro %]
719 [% IF ( mandatoryfax ) %]
720 <label for="fax" class="required">
726 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
727 [% IF ( mandatoryfax ) %]
728 <span class="required">Required</span>
731 [% END #/UNLESS nofax %]
733 </fieldset> <!-- /#memberentry_contact -->
734 [% END # hide fieldset %]
736 <!-- ************************ STEP_1 *********************** -->
737 [% END # /IF ( step_1 ) %]
740 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
741 [% PROCESS 'alt-address-style' %]
742 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
743 [% END # /IF ( step_6 ) %]
746 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
747 [% PROCESS 'alt-contact-style' %]
748 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
749 [% END # /IF ( step_2 ) %]
752 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
753 <fieldset class="rows" id="memberentry_library_management">
754 <legend id="library_management_lgd">Library management</legend>
756 [% UNLESS nocardnumber %]
758 [% IF mandatorycardnumber %]
759 <label for="cardnumber" class="required">
761 <label for="cardnumber" class="validated">
766 <!-- NOTE: div.hint closing tag isn't on the same line -->
767 [% IF minlength_cardnumber == maxlength_cardnumber %]
768 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
769 [% IF mandatorycardnumber %]
770 <span class="required">Required</span>
772 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
773 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
774 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
775 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
776 [% IF mandatorycardnumber %]
777 <span class="required">Required</span>
779 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
780 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
781 [% ELSIF maxlength_cardnumber %]
782 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
783 [% IF mandatorycardnumber %]
784 <span class="required">Required</span>
786 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
787 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
789 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
790 [% IF mandatorycardnumber %]
791 <span class="required">Required</span>
793 <div class="hint">There is no minimum or maximum character length.
795 [% IF autoMemberNum %]
796 [% IF mandatorycardnumber %]
797 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
799 <br/>Leave blank for auto calc during registration
802 </div><!--/div.hint -->
804 [% END # /UNLESS nocardnumber %]
806 [% UNLESS nobranchcode %]
808 <label for="libraries" class="required">Library:</label>
809 <select name="branchcode" size="1" id="libraries">
810 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
812 <span class="required">Required</span>
817 <label for="categorycode_entry" class="required">Category: </label>
818 <select id="categorycode_entry" name="categorycode">
819 [% FOREACH typeloo IN typeloop %]
820 [% FOREACH categoryloo IN typeloo.categoryloop %]
821 [% IF ( loop.first ) %]
822 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
823 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
824 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
825 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
826 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
827 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
829 [% IF ( categoryloo.categorycodeselected ) %]
830 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
832 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
834 [% IF ( loop.last ) %]
837 [% END # /FOREACH categoryloo %]
838 [% END # /FOREACH typeloo %]
840 <span class="required">Required</span>
845 [% IF ( mandatorysort1 ) %]
846 <label for="sort1" class="required">
852 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
853 [% IF ( mandatorysort1 ) %]
854 <span class="required">Required</span>
857 [% END # /UNLESS nosort1 %]
861 [% IF ( mandatorysort2 ) %]
862 <label for="sort2" class="required">
868 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
869 [% IF ( mandatorysort2 ) %]
870 <span class="required">Required</span>
873 [% END # /UNLESS nosort2 %]
875 [% UNLESS noautorenew_checkouts %]
877 <label for="yes-autorenew_checkouts">
878 Allow auto-renewal of items:
880 [% IF ( autorenew_checkouts || opadd ) %]
881 <label for="yes-autorenew_checkouts">
883 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
885 <label for="no-autorenew_checkouts">
887 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
890 <label for="yes-autorenew_checkouts">
892 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
894 <label for="no-autorenew_checkouts">
896 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
902 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
904 <label for="checkprevcheckout">Check for previous checkouts: </label>
905 <select name="checkprevcheckout" id="checkprevcheckout">
906 [% IF ( checkprevcheckout == 'yes' ) %]
907 <option value="yes" selected="selected">Yes if settings allow it</option>
908 <option value="no">No if settings allow it</option>
909 <option value="inherit">Inherit from settings</option>
910 [% ELSIF ( checkprevcheckout == 'no' ) %]
911 <option value="yes">Yes if settings allow it</option>
912 <option value="no" selected="selected">No if settings allow it</option>
913 <option value="inherit">Inherit from settings</option>
915 <option value="yes">Yes if settings allow it</option>
916 <option value="no">No if settings allow it</option>
917 <option value="inherit" selected="selected">Inherit from settings</option>
921 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
923 [% IF Koha.Preference('TranslateNotices') %]
925 <label for="lang">Preferred language for notices: </label>
926 <select id="lang" name="lang">
927 <option value="default">Default</option>
928 [% FOR language IN languages %]
929 [% FOR sublanguage IN language.sublanguages_loop %]
930 [% IF language.plural %]
931 [% IF sublanguage.rfc4646_subtag == lang %]
932 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
934 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
937 [% IF sublanguage.rfc4646_subtag == lang %]
938 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
940 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
942 [% END # /IF language.plural %]
943 [% END # /FOR sublanguage %]
944 [% END #/FOR language %]
945 </select> <!-- /#lang -->
947 [% END #/IF Koha.Preference('TranslateNotices') %]
949 </fieldset> <!-- /#memberentry_library_management -->
951 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
952 <fieldset class="rows" id="memberentry_subscription">
953 <legend id="library_setup_lgd">Library set-up</legend><ol>
954 [% UNLESS nodateenrolled %]
956 [% IF ( mandatorydateenrolled ) %]
957 <label for="from" class="required">
963 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
964 [% IF ( mandatorydateenrolled ) %]
965 <span class="required">Required</span>
967 [% IF ( ERROR_dateenrolled ) %]
968 <span class="required">(Error)</span>
970 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
972 [% END # /UNLESS nodateenrolled %]
974 [% UNLESS nodateexpiry %]
977 <li style="display:none">
979 [% IF ( mandatorydateexpiry ) %]
980 <label for="to" class="required">
984 Expiry date (leave blank for auto calc):
986 [% UNLESS ( opadd ) %]
987 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
989 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
991 [% IF ( mandatorydateexpiry ) %]
992 <span class="required">Required</span>
994 [% IF ( ERROR_dateexpiry ) %]
995 <span class="required">(Error)</span>
997 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1000 [% UNLESS noopacnote %]
1002 [% IF ( mandatoryopacnote ) %]
1003 <label for="opacnote" class="required">
1005 <label for="opacnote">
1009 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1010 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1011 [% IF ( mandatoryopacnote ) %]
1012 <span class="required">Required</span>
1015 [% END # /UNLESS noopacnote %]
1017 [% UNLESS noborrowernotes %]
1019 [% IF ( mandatoryborrowernotes ) %]
1020 <label for="borrowernotes" class="required">
1022 <label for="borrowernotes">
1026 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1027 <div class="hint">This message displays when checking out to this patron</div>
1028 [% IF ( mandatoryborrowernotes ) %]
1029 <span class="required">Required</span>
1032 [% END # /UNLESS noborrowernotes %]
1034 </fieldset> <!-- /#memberentry_subscription -->
1035 [% END # hide fieldset %]
1037 [% UNLESS nouserid && nopassword %]
1038 <fieldset class="rows" id="memberentry_userid">
1039 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1041 [% UNLESS nouserid %]
1043 [% IF ( mandatoryuserid ) %]
1044 <label for="userid" class="required">
1046 <label for="userid">
1051 [% IF ( NoUpdateLogin ) %]
1052 [% IF ( opduplicate ) %]
1053 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1055 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1058 [% IF ( opduplicate ) %]
1059 <input type="text" id="userid" name="userid" size="20" value="" />
1061 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1063 [% END # /IF ( NoUpdateLogin ) %]
1065 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1066 <input type="text" disabled="disabled" style="display:none" />
1068 [% IF ( mandatoryuserid ) %]
1069 <span class="required">Required</span>
1072 [% END # /UNLESS nouserid %]
1074 [% UNLESS nopassword %]
1076 [% IF ( mandatorypassword ) %]
1077 <label for="password" class="required">
1079 <label for="password">
1084 [% IF ( NoUpdateLogin ) %]
1085 [% IF ( opduplicate ) %]
1086 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1088 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1091 [% IF ( opduplicate ) %]
1092 <input type="password" id="password" name="password" size="20" />
1094 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1096 [% END # /IF ( NoUpdateLogin ) %]
1097 [% ELSE # IF ( opadd ) %]
1099 [% IF ( password ) %]
1100 [% IF ( NoUpdateLogin ) %]
1101 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1103 [% IF ( opduplicate ) %]
1104 <input type="password" id="password" name="password" size="20" />
1106 <input type="password" id="password" name="password" size="20" value="****" />
1110 [% IF ( NoUpdateLogin ) %]
1111 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1113 <input type="password" id="password" name="password" size="20" value="" />
1115 [% END # /IF ( password ) %]
1116 [% END # /IF ( opadd ) %]
1117 [% IF ( mandatorypassword ) %]
1118 <span class="required">Required</span>
1120 [% IF ( ERROR_password_too_short ) %]
1121 <span class="required">Password is too short</span>
1123 [% IF ( ERROR_password_too_weak ) %]
1124 <span class="required">Password is too weak</span>
1126 [% IF ( ERROR_password_has_whitespaces ) %]
1127 <span class="required">Password has leading or trailing whitespaces</span>
1129 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1133 [% IF ( mandatorypassword ) %]
1134 <label for="password2" class="required">
1136 <label for="password2">
1141 [% IF ( NoUpdateLogin ) %]
1142 [% IF ( opduplicate ) %]
1143 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1145 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1148 [% IF ( opduplicate ) %]
1149 <input type="password" id="password2" name="password2" size="20" />
1151 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1154 [% ELSE # IF ( opadd ) %]
1155 [% IF ( password ) %]
1156 [% IF ( NoUpdateLogin ) %]
1157 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1159 [% IF ( opduplicate ) %]
1160 <input type="password" id="password2" name="password2" size="20" />
1162 <input type="password" id="password2" name="password2" size="20" value="****" />
1166 [% IF ( NoUpdateLogin ) %]
1167 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1169 <input type="password" id="password2" name="password2" size="20" value="" />
1172 [% END # /IF ( opadd ) %]
1174 [% IF ( mandatorypassword ) %]
1175 <span class="required">Required</span>
1177 [% IF ( ERROR_password_mismatch ) %]
1178 <span class="required">Passwords do not match</span>
1181 [% END # /UNLESS nopassword %]
1183 </fieldset> <!-- /#memberentry_userid -->
1184 [% END # UNLESS nouserid && nopassword %]
1186 <!--this zones are not necessary in modif mode -->
1187 [% UNLESS ( opadd || opduplicate ) %]
1188 <fieldset class="rows" id="memberentry_account_flags">
1189 <legend id="account_flags_lgd">Patron account flags</legend>
1191 [% FOREACH flagloo IN flagloop %]
1193 <label class="radio" for="yes[% flagloo.name | html %]">
1194 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1195 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1197 [% IF CAN_user_circulate_manage_restrictions %]
1198 <label for="yes[% flagloo.name | html %]">
1199 [% IF ( flagloo.yes ) %]
1200 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1202 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1206 <label for="no[% flagloo.name | html %]">
1207 [% IF ( flagloo.no ) %]
1208 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1210 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1215 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1216 [% END # /IF CAN_user_circulate_manage_restrictions %]
1218 [% END # /FOREACH flagloo %]
1220 </fieldset> <!-- /#memberentry_account_flags -->
1222 <fieldset class="rows" id="memberentry_restrictions">
1223 <legend id="restrictions_lgd">Patron restrictions</legend>
1224 [% IF ( debarments ) %]
1231 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1232 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1238 [% FOREACH d IN debarments %]
1240 <td>[% d.type | html %]</td>
1242 [% IF d.comment.search('OVERDUES_PROCESS') %]
1243 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1245 [% d.comment | $raw %]
1249 [% IF d.expiration %]
1250 [% d.expiration | $KohaDates %]
1255 <td>[% d.created | $KohaDates %]</td>
1256 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1258 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1262 [% END # /FOREACH d %]
1266 <p>Patron is currently unrestricted.</p>
1267 [% END # /IF ( debarments ) %]
1269 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1270 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1271 <fieldset id="manual_restriction_form">
1272 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1273 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1276 <label for="debarred_comment">Comment: </label>
1277 <input type="text" id="debarred_comment" name="debarred_comment" />
1280 <label for="debarred_expiration">Expiration: </label>
1281 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1282 <a href="#" id="clear_debarred_expiration">Clear date</a>
1286 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1288 </fieldset> <!-- /#manual_restriction_form -->
1289 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1290 </fieldset> <!-- /#memberentry_restrictions -->
1291 [% END # /UNLESS ( opadd || opduplicate ) %]
1292 [% END # /IF ( step_3 ) %]
1295 [% IF Koha.Preference('HouseboundModule') %]
1296 <fieldset class="rows" id="memberentry_housebound_roles">
1297 <legend id="housebound_roles">Housebound roles</legend>
1300 <label class="radio" for="housebound_chooser">
1303 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1304 <label for="yes_housebound_chooser">Yes </label>
1305 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1306 <label for="no_housebound_chooser">No </label>
1307 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1309 <label for="yes_housebound_chooser">Yes </label>
1310 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1311 <label for="no_housebound_chooser">No </label>
1312 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1316 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1317 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1318 <label for="yes_housebound_deliverer">Yes </label>
1319 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1320 <label for="no_housebound_deliverer">No </label>
1321 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1323 <label for="yes_housebound_deliverer">Yes </label>
1324 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1325 <label for="no_housebound_deliverer">No </label>
1326 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1329 </ol> <!-- /ol.radio -->
1330 </fieldset> <!-- /#memberentry_housebound_roles -->
1331 [% END # hide fieldset %]
1332 [% END # IF step_7 %]
1335 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1336 [% UNLESS ( no_patron_attribute_types ) %]
1337 <fieldset class="rows" id="memberentry_patron_attributes">
1338 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1339 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1340 [% FOREACH pa_loo IN patron_attributes %]
1341 <ol class="attributes_table">
1342 [% IF pa_loo.class %]
1343 <fieldset id="aai_[% pa_loo.class | html %]">
1344 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1346 [% FOREACH patron_attribute IN pa_loo.items %]
1347 <li data-category_code="[% patron_attribute.category_code | html %]">
1348 <label for="[% patron_attribute.form_id | html %]">
1349 [% patron_attribute.description | html %]:
1351 [% IF ( patron_attribute.use_dropdown ) %]
1352 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1353 <option value=""></option>
1354 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1355 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1356 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1357 [% auth_val_loo.lib | html %]
1360 <option value="[% auth_val_loo.authorised_value | html %]" >
1361 [% auth_val_loo.lib | html %]
1367 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1368 [% END # /IF ( patron_attribute.use_dropdown ) %]
1369 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1370 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1371 [% IF ( patron_attribute.repeatable ) %]
1372 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1375 [% END # /FOREACH patron_attribute %]
1376 [% IF pa_loo.class %]</fieldset>[% END %]
1378 [% END # /FOREACH pa_loo %]
1379 </fieldset> <!-- /#memberentry_patron_attributes -->
1380 [% END # UNLESS ( no_patron_attribute_types ) %]
1381 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1382 [% END # IF ( step_4 ) %]
1385 [% IF ( EnhancedMessagingPreferences ) %]
1386 <fieldset class="rows" id="memberentry_messaging_prefs">
1387 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1388 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1389 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1391 <input type="hidden" name="setting_messaging_prefs" value="1" />
1392 [% INCLUDE 'messaging-preference-form.inc' %]
1393 [% IF ( SMSSendDriver ) %]
1395 <label for="SMSnumber">SMS number:</label>
1396 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1397 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1399 [% UNLESS nosms_provider_id %]
1401 <label for="sms_provider_id">SMS provider:</label>
1402 <select id="sms_provider_id" name="sms_provider_id">
1403 <option value="">Unknown</option>
1404 [% FOREACH s IN sms_providers %]
1405 [% IF s.id == sms_provider_id %]
1406 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1408 <option value="[% s.id | html %]">[% s.name | html %]</option>
1413 [% END # /UNLESS nosms_provider_id %]
1414 [% END # IF ( SMSSendDriver ) %]
1416 [% END # IF ( EnhancedMessagingPreferences ) %]
1417 [% END # /IF step_5 %]
1418 </form> <!-- /#entryform -->
1420 [% IF quickadd && opadd && !check_member %]
1421 <form id="quick_add_form" class="toggler">
1422 <fieldset class="rows quick_add"><legend>Quick add</legend>
1423 <ol id="quick_add_list">
1429 [% END # /UNLESS ( no_add ) %]
1431 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1433 [% UNLESS ( opadd ) %]
1434 <div class="col-sm-2 col-sm-pull-10">
1436 [% INCLUDE 'circ-menu.inc' %]
1438 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1440 </div> <!-- /.row -->
1442 [% MACRO jsinclude BLOCK %]
1443 [% Asset.js("lib/hc-sticky.js") | $raw %]
1444 [% INCLUDE 'calendar.inc' %]
1445 [% INCLUDE 'str/members-menu.inc' %]
1446 [% Asset.js("js/members-menu.js") | $raw %]
1448 function update_cardnumber_warning(size){
1449 var max_len = [% maxlength_cardnumber | html %];
1450 if ( size >= max_len ) {
1451 $("#cn_max").show();
1453 $("#cn_max").hide();
1457 function showHideFields(){
1458 [% UNLESS step == 1 %]
1459 [% IF fieldstohide.match('identity') %]
1460 $("#memberentry_identity").find('legend').nextAll().toggle();
1462 [% IF show_guarantor || guarantor %]
1463 [% IF fieldstohide.match('guarantor') %]
1464 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1465 $("#guarantor_template").toggle();
1468 [% IF fieldstohide.match('primary_address') %]
1469 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1471 [% IF fieldstohide.match('primary_contact') %]
1472 $("#memberentry_contact").find('legend').nextAll().toggle();
1475 [% UNLESS step == 6 %]
1476 [% IF fieldstohide.match('alt_address') %]
1477 $("#memberentry_address").find('legend').nextAll().toggle();
1480 [% UNLESS step == 2 %]
1481 [% IF fieldstohide.match('alt_contact') %]
1482 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1485 [% UNLESS step == 3 %]
1486 [% IF fieldstohide.match('lib_mgmt') %]
1487 $("#memberentry_library_management").find('legend').nextAll().toggle();
1489 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1490 [% IF fieldstohide.match('lib_setup') %]
1491 $("#memberentry_subscription").find('legend').nextAll().toggle();
1494 [% UNLESS nouserid && nopassword %]
1495 [% IF fieldstohide.match('login') %]
1496 $("#memberentry_userid").find('legend').nextAll().toggle();
1499 [% UNLESS ( opadd || opduplicate ) %]
1500 [% IF fieldstohide.match('flags') %]
1501 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1504 [% IF fieldstohide.match('debarments') %]
1505 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1508 [% UNLESS step == 7 %]
1509 [% IF Koha.Preference('HouseboundModule') %]
1510 [% IF fieldstohide.match('housebound') %]
1511 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1515 [% UNLESS step == 4 %]
1516 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1517 [% IF fieldstohide.match('additional') %]
1518 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1522 [% UNLESS step == 5 %]
1523 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1524 [% IF fieldstohide.match('messaging') %]
1525 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1526 $("#messaging_prefs_loading").toggle();
1532 $(document).ready(function() {
1534 $("#toggle_hidden_fields").change(function(){
1538 $("legend").click(function(){
1539 $(this).nextAll().toggle();
1540 $("#messaging_prefs_loading").hide();
1543 $("#saverecord").css({ 'margin-left': 0 });
1545 Sticky = $("#toolbar");
1548 stickyClass: "floating"
1551 [% IF categorycode %]
1552 update_category_code( "[% categorycode | html %]" );
1554 if ( $("#categorycode_entry").length > 0 ){
1555 var category_code = $("#categorycode_entry").find("option:selected").val();
1556 update_category_code( category_code );
1560 [% IF new_guarantors %]
1561 [% FOREACH g IN new_guarantors %]
1562 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1566 $("#cn_max").hide();
1568 $("#cardnumber").on("keydown", function(e){
1569 content = $(this).val();
1571 $("#cardnumber").on("keyup", function(e){
1572 // .val() will return the value of the input after the key has been released
1573 var l = $(this).val().length;
1574 if ( l == content.length + 1 ) { l--; }
1575 update_cardnumber_warning(l);
1577 $("#cardnumber").bind("paste", function(e){
1578 var pastedData = e.originalEvent.clipboardData.getData('text');
1579 update_cardnumber_warning(pastedData.length - 1);
1581 var toggle_quick_add = $(".toggle_quick_add");
1582 $(toggle_quick_add).click(function(e){
1583 toggle_quick_add.toggle();
1586 var toggle_from = '';
1587 if( $("#entryform:visible").length ) {
1588 toggle_to = "#quick_add_form label";
1589 toggle_from = "#entryform label";
1590 $("#memberentry_guarantor").appendTo("#quick_add_form");
1592 toggle_to="#entryform label";
1593 toggle_from = "#quick_add_form label";
1594 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1596 $(toggle_from).each(function() {
1597 var input_label = $(this).attr('for');
1598 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1599 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1602 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1605 $(".toggler").toggle();
1608 $("#save_quick_add").click(function(){
1609 $("#quick_add_form").validate();
1610 if( $("#quick_add_form").valid()){
1611 $('.toggle_quick_add').click();
1612 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1613 $('#saverecord').click();
1615 else {return false;}
1618 $("#saverecord").click(function(){
1619 if( check_form_borrowers() ){
1620 $("#entryform").submit();
1624 $('#duplicate').on('click', function() {
1625 $("input[name='op']").val('modify');
1626 $("input[name='borrowernumber']").val('[% check_member | html %]');
1627 $("input[name='check_member']").val('');
1628 $('#entryform').submit();
1631 $('#not-duplicate').on('click', function() {
1632 $("input[name='nodouble']").val('1');
1633 $('#entryform').submit();
1636 $(".popup_patronview").on("click", function(e){
1638 var url = $(this).attr("href");
1639 openWindow( url, "patronview" );
1642 $("#dateofbirth").on("change", function(){
1646 $("#debarred_comment, #debarred_expiration").on("change", function(){
1647 $("#add_debarment").val(1);
1650 $("#clear_debarred_expiration").on("click", function(e){
1652 $('#debarred_expiration').val("");
1655 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1657 clear_entry( this );
1660 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1662 clone_entry( this );
1665 $("#categorycode_entry").on("change", function(){
1666 update_category_code(this);
1670 var MSG_SEPARATOR = _("Separator must be / in field %s");
1671 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1672 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1673 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1674 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1675 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1676 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1677 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1678 var MSG_MONTH = _("%s month")
1679 var MSG_MONTHS = _("%s months")
1680 var MSG_YEAR = _("%s year")
1681 var MSG_YEARS = _("%s years")
1682 var LABEL_CHANGE = _("Change");
1683 var LABEL_SET_TO_PATRON = _("Set to patron");
1684 var LABEL_AGE = _("Age");
1685 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1687 [% IF quickadd && opadd && !check_member %]
1688 $(document).ready(function () {
1690 $("#entryform,#saverecord").hide();
1691 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1692 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1693 $("#entryform label").each(function () {
1694 var input_label = $(this).attr('for');
1695 if ( input_label == 'sex-female' ) {
1698 else if ( input_label == 'btitle' ) {
1699 input_label='title';
1701 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1702 $(this).parent().clone().appendTo("#quick_add_list");
1703 [% UNLESS mandatorypassword %]
1704 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1708 if ( $("#memberentry_guarantor").length ) {
1709 $("#memberentry_guarantor").appendTo("#quick_add_form");
1711 $("#quick_add_form").show();
1714 $("#guarantor_template").hide();
1717 [% Asset.js("js/members.js") | $raw %]
1718 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1719 [% PROCESS 'password_check.inc' %]
1720 [% PROCESS 'add_password_check' new_password => 'password' %]
1723 [% INCLUDE 'intranet-bottom.inc' %]