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" /><span class="patronsex-female"> Female</span></label>
384 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label>
387 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label>
389 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label>
392 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label>
394 <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label>
397 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified / Prefer not to say</span></label>
399 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified / Prefer not to say</span></label>
402 <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" />
403 <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" />
404 <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" />
405 <label for="sex-none"><span class="patronsex-none">None specified / Prefer not to say </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
406 [% END # /UNLESS ( opduplicate )%]
408 [% END # /UNLESS nosex %]
409 [% END # /UNLESS ( I ) %]
411 </fieldset> <!-- /#memberentry_identity -->
412 [% END # hide fieldset %]
414 [% IF show_guarantor || guarantor %]
415 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
416 <div id="memberentry_guarantor_anchor">
417 <fieldset id="memberentry_guarantor" class="rows">
418 <legend>Patron guarantor</legend>
420 <div id="guarantor_relationships">
421 [% FOREACH r IN relationships %]
424 [% IF category_type == 'I' %]
425 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
426 <span class="label">Organization:</span>
427 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
430 <span class="label">Relationship:</span>
431 <span>[% r.relationship | html %]</span>
434 <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
435 <span class="label">Guarantor:</span>
436 [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
439 <span class="label">Relationship:</span>
440 <span>[% r.relationship | html %]</span>
444 <label for="delete_guarantor-[% r.id | uri %]">Remove: </label>
445 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
450 [% END # END relationships foreach %]
451 [% IF guarantor && (!relationships) %]
452 <fieldset class="guarantor">
454 <li class="guarantor-details" data-borrowernumber="0">
455 <span class="label">Guarantor:</span>
456 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a>
457 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
461 [% UNLESS empty_relationship_allowed %]
462 <label for="guarantor_relationship" class="required">Relationship: </label>
463 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
465 <label for="guarantor_relationship">Relationship: </label>
466 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
468 <option value="" selected>Empty option</option>
469 [% FOREACH pr IN possible_relationships.split('\|') %]
471 <option value="[% pr | html %]">[% pr | html %]</option>
475 [% UNLESS empty_relationship_allowed %]
476 <span class="required">Required</span>
481 <label for="guarantor_cancel"> </label>
482 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a></span>
487 </div> <!-- #/guarantor_relationships -->
489 <fieldset class="guarantor" id="guarantor_template">
491 <li class="guarantor-details" data-borrowernumber="0">
492 <span class="label">Guarantor:</span>
493 <a class="new_guarantor_link" href="#" target="blank">
494 <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span>
495 (<span class="new_guarantor_id_text"></span>)
497 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
501 [% UNLESS empty_relationship_allowed %]
502 <label for="guarantor_relationship" class="required">Relationship: </label>
503 <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
505 <label for="guarantor_relationship">Relationship: </label>
506 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
508 <option value="" selected></option>
509 [% FOREACH pr IN possible_relationships.split('\|') %]
511 <option value="[% pr | html %]">[% pr | html %]</option>
515 [% UNLESS empty_relationship_allowed %]
516 <span class="required">Required</span>
521 <label for="guarantor_cancel"> </label>
522 <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span>
528 <input type="hidden" id="guarantor_id" value="" />
529 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
530 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
533 <a href="#" id="guarantor_search" class="btn btn-default"><i class="fa fa-plus"></i> Search to add</a>
536 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
538 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
539 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
540 [% IF privacy_guarantor_checkouts %]
541 <option value="0">No</option>
542 <option value="1" selected>Yes</option>
544 <option value="0" selected>No</option>
545 <option value="1">Yes</option>
548 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
551 [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
553 <label for="privacy_guarantor_fines">Show fines to guarantors</label>
554 <select name="privacy_guarantor_fines" id="privacy_guarantor_fines">
555 [% IF privacy_guarantor_fines %]
556 <option value="0">No</option>
557 <option value="1" selected>Yes</option>
559 <option value="0" selected>No</option>
560 <option value="1">Yes</option>
563 <div class="hint">Allow guarantors of this patron to view this patron's fines from the OPAC</div>
567 </fieldset> <!-- /#memberentry_guarantor -->
568 </div> <!-- #/memberentry_guarantor_anchor -->
570 [% UNLESS nocontactname && nocontactfirstname && norelationship %]
571 <fieldset class="rows" id="non_patron_guarantor">
572 <legend>Non-patron guarantor</legend>
574 [% UNLESS nocontactname %]
576 [% IF ( mandatorycontactname ) %]
577 <label for="contactname" class="required">
579 <label for="contactname">
583 <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
584 [% IF ( mandatorycontactname ) %]
585 <span class="required">Required</span>
587 <div class="hint">Non-patron guarantor surname</div>
589 [% END # /UNLESS nocontactname %]
591 [% UNLESS nocontactfirstname %]
593 [% IF ( mandatorycontactfirstname ) %]
594 <label for="contactfirstname" class="required">
596 <label for="contactfirstname">
598 Guarantor first name:
600 <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
601 [% IF ( mandatorycontactfirstname ) %]
602 <span class="required">Required</span>
604 <div class="hint">Non-patron guarantor first name</div>
606 [% END # /UNLESS noaltcontactfirstname %]
608 [% UNLESS norelationship %]
609 [% IF possible_relationships %]
611 <label for="relationship">Relationship: </label>
612 <select class="relationship" name="relationship">
613 <option value=""></option>
614 [% FOREACH pr IN possible_relationships.split('\|') %]
615 [% IF pr == relationship %]
616 <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
618 <option value="[% pr | html %]">[% pr | html %]</option>
623 [% END #/IF possible_relationships %]
624 [% END # /UNLESS norelationship %]
626 </fieldset> <!-- /#non_patron_guarantor -->
627 [% END # /UNLESS nocontactname && nocontactfirstname && norelationship %]
628 [% END # /IF show_guarantor || guarantor %]
630 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
631 [% PROCESS 'main-address-style' %]
632 [% END # /UNLESS nostreet && nocity etc group%]
634 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
635 <fieldset class="rows" id="memberentry_contact">
636 <legend id="contact_lgd">Contact</legend>
640 [% IF ( mandatoryphone ) %]
641 <label for="phone" class="required">
647 <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
648 [% IF ( mandatoryphone ) %]
649 <span class="required">Required</span>
651 <div class="hint">Shows on transit slips</div>
653 [% END # /UNLESS nophone %]
655 [% UNLESS nophonepro %]
657 [% IF ( mandatoryphonepro ) %]
658 <label for="phonepro" class="required">
660 <label for="phonepro">
664 <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
665 [% IF ( mandatoryphonepro ) %]
666 <span class="required">Required</span>
669 [% END # /UNLESS nophonepro %]
671 [% UNLESS nomobile %]
673 [% IF ( mandatorymobile ) %]
674 <label for="mobile" class="required">
680 <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
681 [% IF ( mandatorymobile ) %]
682 <span class="required">Required</span>
685 [% END # /UNLESS nomobile %]
689 [% IF ( mandatoryemail ) %]
690 <label for="email" class="required">
696 <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
697 [% IF ( mandatoryemail ) %]
698 <span class="required">Required</span>
700 <div class="hint">Shows on transit slips</div>
702 [% END #/UNLESS noemail %]
704 [% UNLESS noemailpro %]
706 [% IF ( mandatoryemailpro ) %]
707 <label for="emailpro" class="required">
709 <label for="emailpro">
713 <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
714 [% IF ( mandatoryemailpro ) %]
715 <span class="required">Required</span>
718 [% END # /UNLESS noemailpro %]
722 [% IF ( mandatoryfax ) %]
723 <label for="fax" class="required">
729 <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
730 [% IF ( mandatoryfax ) %]
731 <span class="required">Required</span>
734 [% END #/UNLESS nofax %]
736 </fieldset> <!-- /#memberentry_contact -->
737 [% END # hide fieldset %]
739 <!-- ************************ STEP_1 *********************** -->
740 [% END # /IF ( step_1 ) %]
743 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
744 [% PROCESS 'alt-address-style' %]
745 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
746 [% END # /IF ( step_6 ) %]
749 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
750 [% PROCESS 'alt-contact-style' %]
751 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
752 [% END # /IF ( step_2 ) %]
755 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
756 <fieldset class="rows" id="memberentry_library_management">
757 <legend id="library_management_lgd">Library management</legend>
759 [% UNLESS nocardnumber %]
761 [% IF mandatorycardnumber %]
762 <label for="cardnumber" class="required">
764 <label for="cardnumber" class="validated">
769 <!-- NOTE: div.hint closing tag isn't on the same line -->
770 [% IF minlength_cardnumber == maxlength_cardnumber %]
771 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
772 [% IF mandatorycardnumber %]
773 <span class="required">Required</span>
775 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
776 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
777 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
778 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
779 [% IF mandatorycardnumber %]
780 <span class="required">Required</span>
782 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
783 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
784 [% ELSIF maxlength_cardnumber %]
785 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
786 [% IF mandatorycardnumber %]
787 <span class="required">Required</span>
789 <span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
790 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
792 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
793 [% IF mandatorycardnumber %]
794 <span class="required">Required</span>
796 <div class="hint">There is no minimum or maximum character length.
798 [% IF autoMemberNum %]
799 [% IF mandatorycardnumber %]
800 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
802 <br/>Leave blank for auto calc during registration
805 </div><!--/div.hint -->
807 [% END # /UNLESS nocardnumber %]
809 [% UNLESS nobranchcode %]
811 <label for="libraries" class="required">Library:</label>
812 <select name="branchcode" size="1" id="libraries">
813 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
815 <span class="required">Required</span>
820 <label for="categorycode_entry" class="required">Category: </label>
821 <select id="categorycode_entry" name="categorycode">
822 [% FOREACH typeloo IN typeloop %]
823 [% FOREACH categoryloo IN typeloo.categoryloop %]
824 [% IF ( loop.first ) %]
825 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
826 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
827 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
828 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
829 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
830 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
832 [% IF ( categoryloo.categorycodeselected ) %]
833 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
835 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
837 [% IF ( loop.last ) %]
840 [% END # /FOREACH categoryloo %]
841 [% END # /FOREACH typeloo %]
843 <span class="required">Required</span>
848 [% IF ( mandatorysort1 ) %]
849 <label for="sort1" class="required">
855 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, empty=1, size = 20 %]
856 [% IF ( mandatorysort1 ) %]
857 <span class="required">Required</span>
860 [% END # /UNLESS nosort1 %]
864 [% IF ( mandatorysort2 ) %]
865 <label for="sort2" class="required">
871 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, empty=1, size = 20 %]
872 [% IF ( mandatorysort2 ) %]
873 <span class="required">Required</span>
876 [% END # /UNLESS nosort2 %]
878 [% UNLESS noautorenew_checkouts %]
880 <label for="yes-autorenew_checkouts">
881 Allow auto-renewal of items:
883 [% IF ( autorenew_checkouts || opadd ) %]
884 <label for="yes-autorenew_checkouts">
886 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" />
888 <label for="no-autorenew_checkouts">
890 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" />
893 <label for="yes-autorenew_checkouts">
895 <input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" />
897 <label for="no-autorenew_checkouts">
899 <input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" />
905 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
907 <label for="checkprevcheckout">Check for previous checkouts: </label>
908 <select name="checkprevcheckout" id="checkprevcheckout">
909 [% IF ( checkprevcheckout == 'yes' ) %]
910 <option value="yes" selected="selected">Yes if settings allow it</option>
911 <option value="no">No if settings allow it</option>
912 <option value="inherit">Inherit from settings</option>
913 [% ELSIF ( checkprevcheckout == 'no' ) %]
914 <option value="yes">Yes if settings allow it</option>
915 <option value="no" selected="selected">No if settings allow it</option>
916 <option value="inherit">Inherit from settings</option>
918 <option value="yes">Yes if settings allow it</option>
919 <option value="no">No if settings allow it</option>
920 <option value="inherit" selected="selected">Inherit from settings</option>
924 [% END # /IF ( Koha.Preference('CheckPrevCheckout') %]
926 [% IF Koha.Preference('TranslateNotices') %]
928 <label for="lang">Preferred language for notices: </label>
929 <select id="lang" name="lang">
930 <option value="default">Default</option>
931 [% FOR language IN languages %]
932 [% FOR sublanguage IN language.sublanguages_loop %]
933 [% IF language.plural %]
934 [% IF sublanguage.rfc4646_subtag == lang %]
935 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
937 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
940 [% IF sublanguage.rfc4646_subtag == lang %]
941 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
943 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
945 [% END # /IF language.plural %]
946 [% END # /FOR sublanguage %]
947 [% END #/FOR language %]
948 </select> <!-- /#lang -->
950 [% END #/IF Koha.Preference('TranslateNotices') %]
952 </fieldset> <!-- /#memberentry_library_management -->
954 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
955 <fieldset class="rows" id="memberentry_subscription">
956 <legend id="library_setup_lgd">Library set-up</legend><ol>
957 [% UNLESS nodateenrolled %]
959 [% IF ( mandatorydateenrolled ) %]
960 <label for="from" class="required">
966 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
967 [% IF ( mandatorydateenrolled ) %]
968 <span class="required">Required</span>
970 [% IF ( ERROR_dateenrolled ) %]
971 <span class="required">(Error)</span>
973 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
975 [% END # /UNLESS nodateenrolled %]
977 [% UNLESS nodateexpiry %]
980 <li style="display:none">
982 [% IF ( mandatorydateexpiry ) %]
983 <label for="to" class="required">
987 Expiry date (leave blank for auto calc):
989 [% UNLESS ( opadd ) %]
990 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
992 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
994 [% IF ( mandatorydateexpiry ) %]
995 <span class="required">Required</span>
997 [% IF ( ERROR_dateexpiry ) %]
998 <span class="required">(Error)</span>
1000 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1003 [% UNLESS noopacnote %]
1005 [% IF ( mandatoryopacnote ) %]
1006 <label for="opacnote" class="required">
1008 <label for="opacnote">
1012 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
1013 <div class="hint">This message appears on this patron's user page in the OPAC</div>
1014 [% IF ( mandatoryopacnote ) %]
1015 <span class="required">Required</span>
1018 [% END # /UNLESS noopacnote %]
1020 [% UNLESS noborrowernotes %]
1022 [% IF ( mandatoryborrowernotes ) %]
1023 <label for="borrowernotes" class="required">
1025 <label for="borrowernotes">
1029 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
1030 <div class="hint">This message displays when checking out to this patron</div>
1031 [% IF ( mandatoryborrowernotes ) %]
1032 <span class="required">Required</span>
1035 [% END # /UNLESS noborrowernotes %]
1037 </fieldset> <!-- /#memberentry_subscription -->
1038 [% END # hide fieldset %]
1040 [% UNLESS nouserid && nopassword %]
1041 <fieldset class="rows" id="memberentry_userid">
1042 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend>
1044 [% UNLESS nouserid %]
1046 [% IF ( mandatoryuserid ) %]
1047 <label for="userid" class="required">
1049 <label for="userid">
1054 [% IF ( NoUpdateLogin ) %]
1055 [% IF ( opduplicate ) %]
1056 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1058 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
1061 [% IF ( opduplicate ) %]
1062 <input type="text" id="userid" name="userid" size="20" value="" />
1064 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
1066 [% END # /IF ( NoUpdateLogin ) %]
1068 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
1069 <input type="text" disabled="disabled" style="display:none" />
1071 [% IF ( mandatoryuserid ) %]
1072 <span class="required">Required</span>
1075 [% END # /UNLESS nouserid %]
1077 [% UNLESS nopassword %]
1079 [% IF ( mandatorypassword ) %]
1080 <label for="password" class="required">
1082 <label for="password">
1087 [% IF ( NoUpdateLogin ) %]
1088 [% IF ( opduplicate ) %]
1089 <input type="password" id="password" name="password" size="20" disabled="disabled" />
1091 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
1094 [% IF ( opduplicate ) %]
1095 <input type="password" id="password" name="password" size="20" />
1097 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
1099 [% END # /IF ( NoUpdateLogin ) %]
1100 [% ELSE # IF ( opadd ) %]
1102 [% IF ( password ) %]
1103 [% IF ( NoUpdateLogin ) %]
1104 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
1106 [% IF ( opduplicate ) %]
1107 <input type="password" id="password" name="password" size="20" />
1109 <input type="password" id="password" name="password" size="20" value="****" />
1113 [% IF ( NoUpdateLogin ) %]
1114 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
1116 <input type="password" id="password" name="password" size="20" value="" />
1118 [% END # /IF ( password ) %]
1119 [% END # /IF ( opadd ) %]
1120 [% IF ( mandatorypassword ) %]
1121 <span class="required">Required</span>
1123 [% IF ( ERROR_password_too_short ) %]
1124 <span class="required">Password is too short</span>
1126 [% IF ( ERROR_password_too_weak ) %]
1127 <span class="required">Password is too weak</span>
1129 [% IF ( ERROR_password_has_whitespaces ) %]
1130 <span class="required">Password has leading or trailing whitespaces</span>
1132 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
1136 [% IF ( mandatorypassword ) %]
1137 <label for="password2" class="required">
1139 <label for="password2">
1144 [% IF ( NoUpdateLogin ) %]
1145 [% IF ( opduplicate ) %]
1146 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
1148 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
1151 [% IF ( opduplicate ) %]
1152 <input type="password" id="password2" name="password2" size="20" />
1154 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
1157 [% ELSE # IF ( opadd ) %]
1158 [% IF ( password ) %]
1159 [% IF ( NoUpdateLogin ) %]
1160 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
1162 [% IF ( opduplicate ) %]
1163 <input type="password" id="password2" name="password2" size="20" />
1165 <input type="password" id="password2" name="password2" size="20" value="****" />
1169 [% IF ( NoUpdateLogin ) %]
1170 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
1172 <input type="password" id="password2" name="password2" size="20" value="" />
1175 [% END # /IF ( opadd ) %]
1177 [% IF ( mandatorypassword ) %]
1178 <span class="required">Required</span>
1180 [% IF ( ERROR_password_mismatch ) %]
1181 <span class="required">Passwords do not match</span>
1184 [% END # /UNLESS nopassword %]
1186 </fieldset> <!-- /#memberentry_userid -->
1187 [% END # UNLESS nouserid && nopassword %]
1189 <!--this zones are not necessary in modif mode -->
1190 [% UNLESS ( opadd || opduplicate ) %]
1191 <fieldset class="rows" id="memberentry_account_flags">
1192 <legend id="account_flags_lgd">Patron account flags</legend>
1194 [% FOREACH flagloo IN flagloop %]
1196 <label class="radio" for="yes[% flagloo.name | html %]">
1197 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1198 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1200 [% IF CAN_user_circulate_manage_restrictions %]
1201 <label for="yes[% flagloo.name | html %]">
1202 [% IF ( flagloo.yes ) %]
1203 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1205 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1209 <label for="no[% flagloo.name | html %]">
1210 [% IF ( flagloo.no ) %]
1211 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1213 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1218 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
1219 [% END # /IF CAN_user_circulate_manage_restrictions %]
1221 [% END # /FOREACH flagloo %]
1223 </fieldset> <!-- /#memberentry_account_flags -->
1225 <fieldset class="rows" id="memberentry_restrictions">
1226 <legend id="restrictions_lgd">Patron restrictions</legend>
1227 [% IF ( debarments ) %]
1234 <th>[% tp('patron restriction created on', 'Created') | html %]</th>
1235 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1241 [% FOREACH d IN debarments %]
1243 <td>[% d.type | html %]</td>
1245 [% IF d.comment.search('OVERDUES_PROCESS') %]
1246 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1248 [% d.comment | $raw %]
1252 [% IF d.expiration %]
1253 [% d.expiration | $KohaDates %]
1258 <td>[% d.created | $KohaDates %]</td>
1259 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1261 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1265 [% END # /FOREACH d %]
1269 <p>Patron is currently unrestricted.</p>
1270 [% END # /IF ( debarments ) %]
1272 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1273 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1274 <fieldset id="manual_restriction_form">
1275 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1276 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1279 <label for="debarred_comment">Comment: </label>
1280 <input type="text" id="debarred_comment" name="debarred_comment" />
1283 <label for="debarred_expiration">Expiration: </label>
1284 <input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" type="text" />
1285 <a href="#" id="clear_debarred_expiration">Clear date</a>
1289 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1291 </fieldset> <!-- /#manual_restriction_form -->
1292 [% END # /IF CAN_user_borrowers_edit_borrowers %]
1293 </fieldset> <!-- /#memberentry_restrictions -->
1294 [% END # /UNLESS ( opadd || opduplicate ) %]
1295 [% END # /IF ( step_3 ) %]
1298 [% IF Koha.Preference('HouseboundModule') %]
1299 <fieldset class="rows" id="memberentry_housebound_roles">
1300 <legend id="housebound_roles">Housebound roles</legend>
1303 <label class="radio" for="housebound_chooser">
1306 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1307 <label for="yes_housebound_chooser">Yes </label>
1308 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
1309 <label for="no_housebound_chooser">No </label>
1310 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" />
1312 <label for="yes_housebound_chooser">Yes </label>
1313 <input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" />
1314 <label for="no_housebound_chooser">No </label>
1315 <input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" />
1319 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1320 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1321 <label for="yes_housebound_deliverer">Yes </label>
1322 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />
1323 <label for="no_housebound_deliverer">No </label>
1324 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" />
1326 <label for="yes_housebound_deliverer">Yes </label>
1327 <input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" />
1328 <label for="no_housebound_deliverer">No </label>
1329 <input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" />
1332 </ol> <!-- /ol.radio -->
1333 </fieldset> <!-- /#memberentry_housebound_roles -->
1334 [% END # hide fieldset %]
1335 [% END # IF step_7 %]
1338 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1339 [% UNLESS ( no_patron_attribute_types ) %]
1340 <fieldset class="rows" id="memberentry_patron_attributes">
1341 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1342 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1343 [% FOREACH pa_loo IN patron_attributes %]
1344 <ol class="attributes_table">
1345 [% IF pa_loo.class %]
1346 <fieldset id="aai_[% pa_loo.class | html %]">
1347 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1349 [% FOREACH patron_attribute IN pa_loo.items %]
1350 <li data-category_code="[% patron_attribute.category_code | html %]">
1351 [% IF patron_attribute.mandatory %]
1352 <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1354 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1356 [% IF ( patron_attribute.use_dropdown ) %]
1357 [% IF patron_attribute.mandatory %]
1358 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1360 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1362 <option value=""></option>
1363 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1364 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1365 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1366 [% auth_val_loo.lib | html %]
1369 <option value="[% auth_val_loo.authorised_value | html %]" >
1370 [% auth_val_loo.lib | html %]
1376 [% IF patron_attribute.mandatory %]
1377 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">[% patron_attribute.value | html %]</textarea>
1379 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1381 [% END # /IF ( patron_attribute.use_dropdown ) %]
1382 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1383 <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash"></i> Clear</a>
1384 [% IF ( patron_attribute.repeatable ) %]
1385 <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1387 [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1389 [% END # /FOREACH patron_attribute %]
1390 [% IF pa_loo.class %]</fieldset>[% END %]
1392 [% END # /FOREACH pa_loo %]
1393 </fieldset> <!-- /#memberentry_patron_attributes -->
1394 [% END # UNLESS ( no_patron_attribute_types ) %]
1395 [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1396 [% END # IF ( step_4 ) %]
1399 [% IF ( EnhancedMessagingPreferences ) %]
1400 <fieldset class="rows" id="memberentry_messaging_prefs">
1401 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1402 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1403 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1405 <input type="hidden" name="setting_messaging_prefs" value="1" />
1406 [% INCLUDE 'messaging-preference-form.inc' %]
1407 [% IF ( SMSSendDriver ) %]
1409 <label for="SMSnumber">SMS number:</label>
1410 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1411 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1413 [% UNLESS nosms_provider_id %]
1415 <label for="sms_provider_id">SMS provider:</label>
1416 <select id="sms_provider_id" name="sms_provider_id">
1417 <option value="">Unknown</option>
1418 [% FOREACH s IN sms_providers %]
1419 [% IF s.id == sms_provider_id %]
1420 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1422 <option value="[% s.id | html %]">[% s.name | html %]</option>
1427 [% END # /UNLESS nosms_provider_id %]
1428 [% END # IF ( SMSSendDriver ) %]
1430 [% END # IF ( EnhancedMessagingPreferences ) %]
1431 [% END # /IF step_5 %]
1432 </form> <!-- /#entryform -->
1434 [% IF quickadd && opadd && !check_member %]
1435 <form id="quick_add_form" class="toggler">
1436 <fieldset class="rows quick_add"><legend>Quick add</legend>
1437 <ol id="quick_add_list">
1443 [% END # /UNLESS ( no_add ) %]
1445 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1447 [% UNLESS ( opadd ) %]
1448 <div class="col-sm-2 col-sm-pull-10">
1450 [% INCLUDE 'circ-menu.inc' %]
1452 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1454 </div> <!-- /.row -->
1456 [% MACRO jsinclude BLOCK %]
1457 [% Asset.js("lib/hc-sticky.js") | $raw %]
1458 [% INCLUDE 'calendar.inc' %]
1459 [% INCLUDE 'str/members-menu.inc' %]
1460 [% Asset.js("js/members-menu.js") | $raw %]
1462 function update_cardnumber_warning(size){
1463 var max_len = [% maxlength_cardnumber | html %];
1464 if ( size >= max_len ) {
1465 $("#cn_max").show();
1467 $("#cn_max").hide();
1471 function showHideFields(){
1472 [% UNLESS step == 1 %]
1473 [% IF fieldstohide.match('identity') %]
1474 $("#memberentry_identity").find('legend').nextAll().toggle();
1476 [% IF show_guarantor || guarantor %]
1477 [% IF fieldstohide.match('guarantor') %]
1478 $("#memberentry_guarantor").find('legend').nextAll().toggle();
1479 $("#guarantor_template").toggle();
1482 [% IF fieldstohide.match('primary_address') %]
1483 $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1485 [% IF fieldstohide.match('primary_contact') %]
1486 $("#memberentry_contact").find('legend').nextAll().toggle();
1489 [% UNLESS step == 6 %]
1490 [% IF fieldstohide.match('alt_address') %]
1491 $("#memberentry_address").find('legend').nextAll().toggle();
1494 [% UNLESS step == 2 %]
1495 [% IF fieldstohide.match('alt_contact') %]
1496 $("#memberentry_altaddress").find('legend').nextAll().toggle();
1499 [% UNLESS step == 3 %]
1500 [% IF fieldstohide.match('lib_mgmt') %]
1501 $("#memberentry_library_management").find('legend').nextAll().toggle();
1503 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1504 [% IF fieldstohide.match('lib_setup') %]
1505 $("#memberentry_subscription").find('legend').nextAll().toggle();
1508 [% UNLESS nouserid && nopassword %]
1509 [% IF fieldstohide.match('login') %]
1510 $("#memberentry_userid").find('legend').nextAll().toggle();
1513 [% UNLESS ( opadd || opduplicate ) %]
1514 [% IF fieldstohide.match('flags') %]
1515 $("#memberentry_account_flags").find('legend').nextAll().toggle();
1518 [% IF fieldstohide.match('debarments') %]
1519 $("#memberentry_restrictions").find('legend').nextAll().toggle();
1522 [% UNLESS step == 7 %]
1523 [% IF Koha.Preference('HouseboundModule') %]
1524 [% IF fieldstohide.match('housebound') %]
1525 $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1529 [% UNLESS step == 4 %]
1530 [% IF Koha.Preference('ExtendedPatronAttributes') %]
1531 [% IF fieldstohide.match('additional') %]
1532 $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1536 [% UNLESS step == 5 %]
1537 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1538 [% IF fieldstohide.match('messaging') %]
1539 $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1540 $("#messaging_prefs_loading").toggle();
1546 $(document).ready(function() {
1548 $("#toggle_hidden_fields").change(function(){
1552 $("legend").click(function(){
1553 $(this).nextAll().toggle();
1554 $("#messaging_prefs_loading").hide();
1557 $("#saverecord").css({ 'margin-left': 0 });
1559 Sticky = $("#toolbar");
1562 stickyClass: "floating"
1565 [% IF categorycode %]
1566 update_category_code( "[% categorycode | html %]" );
1568 if ( $("#categorycode_entry").length > 0 ){
1569 var category_code = $("#categorycode_entry").find("option:selected").val();
1570 update_category_code( category_code );
1574 [% IF new_guarantors %]
1575 [% FOREACH g IN new_guarantors %]
1576 select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
1580 $("#cn_max").hide();
1582 $("#cardnumber").on("keydown", function(e){
1583 content = $(this).val();
1585 $("#cardnumber").on("keyup", function(e){
1586 // .val() will return the value of the input after the key has been released
1587 var l = $(this).val().length;
1588 if ( l == content.length + 1 ) { l--; }
1589 update_cardnumber_warning(l);
1591 $("#cardnumber").bind("paste", function(e){
1592 var pastedData = e.originalEvent.clipboardData.getData('text');
1593 update_cardnumber_warning(pastedData.length - 1);
1595 var toggle_quick_add = $(".toggle_quick_add");
1596 $(toggle_quick_add).click(function(e){
1597 toggle_quick_add.toggle();
1600 var toggle_from = '';
1601 if( $("#entryform:visible").length ) {
1602 toggle_to = "#quick_add_form label";
1603 toggle_from = "#entryform label";
1604 $("#memberentry_guarantor").appendTo("#quick_add_form");
1606 toggle_to="#entryform label";
1607 toggle_from = "#quick_add_form label";
1608 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1610 $(toggle_from).each(function() {
1611 var input_label = $(this).attr('for');
1612 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) {
1613 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1616 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1619 $(".toggler").toggle();
1622 $("#save_quick_add").click(function(){
1623 $("#quick_add_form").validate();
1624 if( $("#quick_add_form").valid()){
1625 $('.toggle_quick_add').click();
1626 $("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor");
1627 $('#saverecord').click();
1629 else {return false;}
1632 $("#saverecord").click(function(){
1633 if( check_form_borrowers() ){
1634 $("#entryform").submit();
1638 $('#duplicate').on('click', function() {
1639 $("input[name='op']").val('modify');
1640 $("input[name='borrowernumber']").val('[% check_member | html %]');
1641 $("input[name='check_member']").val('');
1642 $('#entryform').submit();
1645 $('#not-duplicate').on('click', function() {
1646 $("input[name='nodouble']").val('1');
1647 $('#entryform').submit();
1650 $(".popup_patronview").on("click", function(e){
1652 var url = $(this).attr("href");
1653 openWindow( url, "patronview" );
1656 $("#dateofbirth").on("change", function(){
1660 $("#debarred_comment, #debarred_expiration").on("change", function(){
1661 $("#add_debarment").val(1);
1664 $("#clear_debarred_expiration").on("click", function(e){
1666 $('#debarred_expiration').val("");
1669 $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){
1671 clear_entry( this );
1674 $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){
1676 clone_entry( this );
1679 $("#categorycode_entry").on("change", function(){
1680 update_category_code(this);
1684 var MSG_SEPARATOR = _("Separator must be / in field %s");
1685 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1686 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1687 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1688 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1689 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1690 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1691 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1692 var MSG_MONTH = _("%s month")
1693 var MSG_MONTHS = _("%s months")
1694 var MSG_YEAR = _("%s year")
1695 var MSG_YEARS = _("%s years")
1696 var LABEL_CHANGE = _("Change");
1697 var LABEL_SET_TO_PATRON = _("Set to patron");
1698 var LABEL_AGE = _("Age");
1699 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1701 [% IF quickadd && opadd && !check_member %]
1702 $(document).ready(function () {
1704 $("#entryform,#saverecord").hide();
1705 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1706 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1707 $("#entryform label").each(function () {
1708 var input_label = $(this).attr('for');
1709 if ( input_label == 'sex-female' ) {
1712 else if ( input_label == 'btitle' ) {
1713 input_label='title';
1715 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1716 $(this).parent().clone().appendTo("#quick_add_list");
1717 [% UNLESS mandatorypassword %]
1718 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1722 if ( $("#memberentry_guarantor").length ) {
1723 $("#memberentry_guarantor").appendTo("#quick_add_form");
1725 $("#quick_add_form").show();
1728 $("#guarantor_template").hide();
1731 [% Asset.js("js/members.js") | $raw %]
1732 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1733 [% PROCESS 'password_check.inc' %]
1734 [% PROCESS 'add_password_check' new_password => 'password' %]
1737 [% INCLUDE 'intranet-bottom.inc' %]