8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Patrons ›
10 [% UNLESS blocking_error %]
12 [% ELSIF ( opduplicate ) %]Duplicate
15 [% IF (firstname) %][% firstname | html %] [% END %]
16 [% IF (surname) %][% surname | html %] [% END %]
17 ([%IF categoryname %][% categoryname | html %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])
20 [% INCLUDE 'doc-head-close.inc' %]
23 <body id="pat_memberentrygen" class="pat">
24 [% INCLUDE 'header.inc' %]
25 [% INCLUDE 'patron-search.inc' %]
27 <div id="breadcrumbs">
28 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
29 [% UNLESS blocking_error %]
30 ›[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% END %]</a> ›[% END %]
31 <strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname | html %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong>
35 <div class="main container-fluid">
38 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
40 <div class="col-sm-10 col-sm-push-2">
42 <main class="clearfix">
43 [% INCLUDE 'blocking_errors.inc' %]
46 [% IF ( error_alert == "no_email" ) %]
47 <div class="dialog alert">This member has no email</div>
49 <div class="dialog alert">[% error_alert | html %]</div>
53 <div class="dialog message">Email has been sent.</div>
56 [% INCLUDE 'noadd-warnings.inc' %]
58 [% UNLESS ( no_add ) %]
59 <h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% END %]([%IF ( categoryname ) %][% categoryname | html %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1>
61 [% IF quickadd && opadd && !check_member %]
62 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
63 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
66 [% IF ( check_member ) %]
67 <div class="dialog alert">
68 <h3>Duplicate patron record?</h3>
69 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member | html %]');return false;" >View existing record</a></p>
70 <button id="duplicate" type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
71 Edit existing record</button>
73 <button type="submit" id="not-duplicate" class="new"><i class="fa fa-plus"></i> Not a duplicate.
74 Save as new record</button>
79 <div class="dialog alert">
80 <p>The following fields are wrong. Please fix them.</p>
82 [% IF ( ERROR_login_exist ) %]
83 <li id="ERROR_login_exist">Username/password already exists.</li>
85 [% IF ERROR_cardnumber_already_exists %]
86 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
88 [% IF ERROR_cardnumber_length %]
89 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
91 [% IF ( ERROR_age_limitations ) %]
92 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
93 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
95 [% IF ( ERROR_branch ) %]
96 <li id="ERROR_branch">Library is invalid.</li>
98 [% IF ( ERROR_dateofbirth ) %]
99 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
101 [% IF ( ERROR_dateenrolled ) %]
102 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
104 [% IF ( ERROR_dateexpiry ) %]
105 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
107 [% IF ( ERROR_password_too_short ) %]
108 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
110 [% IF ( ERROR_password_too_weak ) %]
111 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
113 [% IF ( ERROR_password_has_whitespaces ) %]
114 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
116 [% IF ( ERROR_password_mismatch ) %]
117 <li id="ERROR_password_mismatch">Passwords do not match.</li>
119 [% IF ( ERROR_extended_unique_id_failed ) %]
120 <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>
122 [% IF ERROR_bad_email %]
123 <li id="ERROR_bad_email">The primary email is invalid.</li>
125 [% IF ERROR_bad_email_secondary %]
126 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
128 [% IF ERROR_bad_email_alternative %]
129 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
136 <div id="toolbar" class="btn-toolbar">
137 [% UNLESS ( check_member ) %]
138 [% IF quickadd && opadd %]
139 <button class="btn btn-default toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
141 <button class="btn btn-default toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
143 <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
145 <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
147 <i class="fa fa-times"></i> Cancel
152 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
153 [% UNLESS ( check_member ) %]
154 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
156 <!-- field always hidden in different form (1,2,3) -->
157 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
158 <input type="hidden" name="category_type" value="[% category_type | html %]" />
159 <input type="hidden" name="updtype" value="[% updtype | html %]" />
160 <input type="hidden" name="destination" value="[% destination | html %]" />
161 <input type="hidden" name="check_member" value="[% check_member | html %]" />
162 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
163 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
164 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
165 [% IF ( step ) %]<input type="hidden" name="step" value="[% step | html %]" />[% END %]
166 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
167 [% ELSIF ( opduplicate ) %]
168 <input type="hidden" name="op" value="insert" />
170 <input type="hidden" name="op" value="save" />
171 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
172 [%# Only put the cardnumber if we arent showing it in the form later %]
174 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
180 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
181 <fieldset class="rows" id="memberentry_identity">
182 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
186 [% IF Koha.Preference('BorrowersTitles') %]
188 [% IF ( mandatorytitle ) %]
189 <label for="btitle" class="required">
194 <select id="btitle" name="title">
195 <option value=""></option>
196 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
198 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
200 <option value="[% t | html %]">[% t | html %]</option>
204 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
209 [% UNLESS nosurname %]
213 <label for="surname" class="required">
217 [% IF ( mandatorysurname ) %]
218 <label for="surname" class="required">
220 <label for="surname">
225 [% IF ( uppercasesurnames ) %]
226 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
228 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
230 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
234 [% UNLESS nofirstname %]
236 [% IF ( mandatoryfirstname ) %]
237 <label for="firstname" class="required">
239 <label for="firstname">
242 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
243 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
246 [% UNLESS nodateofbirth %]
248 [% IF ( mandatorydateofbirth ) %]
249 <label for="dateofbirth" class="required">
251 <label for="dateofbirth">
253 Date of birth: </label>
255 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
257 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
258 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
259 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
262 [% UNLESS noinitials %]
264 [% IF ( mandatoryinitials ) %]
265 <label for="initials" class="required">
267 <label for="initials">
270 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
271 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
275 [% UNLESS noothernames %]
277 [% IF ( mandatoryothernames ) %]
278 <label for="othernames" class="required">
280 <label for="othernames">
283 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
284 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
285 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
292 [% UNLESS ( opduplicate ) %]
294 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
296 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
299 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
301 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
304 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
306 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
309 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
310 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
311 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
319 [% END # hide fieldset %]
321 [% IF show_guarantor || guarantor %]
322 [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
323 <fieldset class="rows">
324 <legend>Guarantor information</legend>
326 <span id="guarantor_relationships">
327 [% FOREACH r IN relationships %]
328 <fieldset class="rows">
330 [% IF category_type == 'P' %]
331 <li id="contact-details">
332 <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 %]
336 <label for="guarantor_surname">Organization name: </label>
337 <span>[% r.guarantor.surname | html %]</span>
340 <li id="contact-details">
341 <span class="label">Patron #:</span>
342 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>
345 [% IF r.guarantor.surname %]
347 <label for="guarantor_surname">Surname: </label>
348 <span>[% r.guarantor.surname | html %]</span>
352 [% IF r.guarantor.firstname %]
354 <label for="guarantor_firstname">First name: </label>
355 <span>[% r.guarantor.firstname | html %]</span>
360 <label for="relationship">Relationship: </label>
361 <span>[% r.relationship | html %]</span>
365 <label for="delete_guarantor-[% r.id | uri %]">Delete: </label>
366 <input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" />
371 [% END # END relationships foreach %]
374 <fieldset class="rows guarantor" id="guarantor_template">
376 <li class="guarantor_id">
377 <span class="label">Patron #:</span>
378 <span class="new_guarantor_id_text"></span>
379 <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
383 <label for="guarantor_surname">Surname: </label>
384 <span class="new_guarantor_surname_text"></span>
388 <label for="guarantor_firstname">First name: </label>
389 <span class="new_guarantor_firstname_text"></span>
393 <label for="guarantor_relationship">Relationship: </label>
394 <select class="new_guarantor_relationship" name="new_guarantor_relationship">
395 [% FOREACH pr IN possible_relationships.split('\|') %]
396 <option value="[% pr | html %]">[% pr | html %]</option>
402 <label for="guarantor_cancel"> </label>
403 <span><a href="#" class="guarantor_cancel">Cancel</a></span>
409 <input type="hidden" id="guarantor_id" value="" />
410 <input name="guarantor_surname" id="guarantor_surname" type="hidden" />
411 <input name="guarantor_firstname" id="guarantor_firstname" type="hidden" />
414 <a href="#" id="guarantor_search" class="btn btn-sm"><i class="fa fa-search"></i> Search</a>
417 [% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
419 <label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label>
420 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
421 [% IF privacy_guarantor_checkouts %]
422 <option value="0">No</option>
423 <option value="1" selected>Yes</option>
425 <option value="0" selected>No</option>
426 <option value="1">Yes</option>
429 <div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div>
437 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
438 [% IF Koha.Preference( 'AddressFormat' ) %]
439 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
441 [% END # nostreet && nocity etc group%]
443 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
444 <fieldset class="rows" id="memberentry_contact">
445 <legend id="contact_lgd">Contact</legend><ol>
447 [% UNLESS nocontactname %]
449 [% IF ( mandatorycontactname ) %]
450 <label for="contactname" class="required">
452 <label for="contactname">
454 Guarantor surname: </label>
455 <input type="text" id="contactname" name="contactname" value="[% contactname | html %]" />
456 [% IF ( mandatorycontactname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor surname</div>
460 [% UNLESS nocontactfirstname %]
462 [% IF ( mandatorycontactfirstname ) %]
463 <label for="contactfirstname" class="required">
465 <label for="contactfirstname">
467 Guarantor first name: </label>
468 <input type="text" id="contactfirstname" name="contactfirstname" value="[% contactfirstname | html %]" />
469 [% IF ( mandatorycontactfirstname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor first name</div>
473 [% UNLESS norelationship %]
474 [% IF possible_relationships %]
476 <label for="relationship">Relationship: </label>
477 <select class="relationship" name="relationship">
478 <option value=""></option>
479 [% FOREACH pr IN possible_relationships.split('\|') %]
480 [% IF pr == relationship %]
481 <option value="[% pr %]" selected="selected">[% pr %]</option>
483 <option value="[% pr %]">[% pr %]</option>
493 [% IF ( mandatoryphone ) %]
494 <label for="phone" class="required">
498 Primary phone: </label>
499 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
500 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
504 [% UNLESS nophonepro %]
506 [% IF ( mandatoryphonepro ) %]
507 <label for="phonepro" class="required">
509 <label for="phonepro">
511 Secondary phone: </label>
512 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
513 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
517 [% UNLESS nomobile %]
519 [% IF ( mandatorymobile ) %]
520 <label for="mobile" class="required">
524 Other phone: </label>
525 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
526 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
532 [% IF ( mandatoryemail ) %]
533 <label for="email" class="required">
537 Primary email: </label>
538 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
539 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
543 [% UNLESS noemailpro %]
545 [% IF ( mandatoryemailpro ) %]
546 <label for="emailpro" class="required">
548 <label for="emailpro">
550 Secondary email: </label>
551 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
552 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
558 [% IF ( mandatoryfax ) %]
559 <label for="fax" class="required">
564 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
565 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
570 [%END # hide fieldset %]
572 <!-- ************************ STEP_1 *********************** -->
576 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
577 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
579 [% INCLUDE 'member-alt-address-style-de.inc' %]
581 [% INCLUDE 'member-alt-address-style-us.inc' %]
584 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
587 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
588 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
590 [% INCLUDE 'member-alt-contact-style-de.inc' %]
592 [% INCLUDE 'member-alt-contact-style-us.inc' %]
594 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
599 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
600 <fieldset class="rows" id="memberentry_library_management">
601 <legend id="library_management_lgd">Library management</legend><ol>
602 [% UNLESS nocardnumber %]
604 [% IF mandatorycardnumber %]
605 <label for="cardnumber" class="required">
607 <label for="cardnumber" class="validated">
609 Card number: </label>
611 <!-- NOTE: div.hint closing tag isn't on the same line -->
612 [% IF minlength_cardnumber == maxlength_cardnumber %]
613 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
614 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
615 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
616 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
617 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
618 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
619 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
620 [% ELSIF maxlength_cardnumber %]
621 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
622 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span>
623 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
625 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
626 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]
627 <div class="hint">There is no minimum or maximum character length.
629 [% IF autoMemberNum %]
630 [% IF mandatorycardnumber %]
631 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
633 <br/>Leave blank for auto calc during registration
636 </div><!--/hint div -->
639 [% UNLESS nobranchcode %]
641 <label for="libraries" class="required">Library:</label>
642 <select name="branchcode" size="1" id="libraries">
643 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
645 <span class="required">Required</span>
649 <label for="categorycode_entry" class="required">Category: </label>
650 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
651 [% FOREACH typeloo IN typeloop %]
652 [% FOREACH categoryloo IN typeloo.categoryloop %]
653 [% IF ( loop.first ) %]
654 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
655 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
656 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
657 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
658 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
659 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
661 [% IF ( categoryloo.categorycodeselected ) %]
662 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
664 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
666 [% IF ( loop.last ) %]
672 <span class="required">Required</span>
676 [% IF ( mandatorysort1 ) %]
677 <label for="sort1" class="required">
682 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
683 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
688 [% IF ( mandatorysort2 ) %]
689 <label for="sort2" class="required">
694 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
695 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
698 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
699 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
700 <select name="checkprevcheckout" id="checkprevcheckout">
701 [% IF ( checkprevcheckout == 'yes' ) %]
702 <option value="yes" selected="selected">Yes if settings allow it</option>
703 <option value="no">No if settings allow it</option>
704 <option value="inherit">Inherit from settings</option>
705 [% ELSIF ( checkprevcheckout == 'no' ) %]
706 <option value="yes">Yes if settings allow it</option>
707 <option value="no" selected="selected">No if settings allow it</option>
708 <option value="inherit">Inherit from settings</option>
710 <option value="yes">Yes if settings allow it</option>
711 <option value="no">No if settings allow it</option>
712 <option value="inherit" selected="selected">Inherit from settings</option>
717 [% IF Koha.Preference('TranslateNotices') %]
719 <label for="lang">Preferred language for notices: </label>
720 <select id="lang" name="lang">
721 <option value="default">Default</option>
722 [% FOR language IN languages %]
723 [% FOR sublanguage IN language.sublanguages_loop %]
724 [% IF language.plural %]
725 [% IF sublanguage.rfc4646_subtag == lang %]
726 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
728 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
731 [% IF sublanguage.rfc4646_subtag == lang %]
732 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
734 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
744 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
745 <fieldset class="rows" id="memberentry_subscription">
746 <legend id="library_setup_lgd">Library set-up</legend><ol>
747 [% UNLESS nodateenrolled %]
749 [% IF ( mandatorydateenrolled ) %]
750 <label for="from" class="required">
754 Registration date: </label>
755 [% IF ( dateformat == "metric" ) %]
756 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled | html %]" class="datepickerfrom" />
758 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
760 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
761 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
762 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
765 [% UNLESS nodateexpiry %]
768 <li style="display:none">
770 [% IF ( mandatorydateexpiry ) %]
771 <label for="to" class="required">
775 Expiry date (leave blank for auto calc): </label>
776 [% IF ( dateformat == "metric" ) %]
777 [% UNLESS ( opadd ) %]
778 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
780 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
783 [% UNLESS ( opadd ) %]
784 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
786 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
789 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
790 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
791 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
793 [% UNLESS noopacnote %]
795 [% IF ( mandatoryopacnote ) %]
796 <label for="opacnote" class="required">
798 <label for="opacnote">
801 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
802 <div class="hint">This message appears on this patron's user page in the OPAC</div>
803 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
806 [% UNLESS noborrowernotes %]
808 [% IF ( mandatoryborrowernotes ) %]
809 <label for="borrowernotes" class="required">
811 <label for="borrowernotes">
813 Circulation note: </label>
814 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
815 <div class="hint">This message displays when checking out to this patron</div>
816 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
821 [% END # hide fieldset %]
823 [% UNLESS nouserid && nopassword %]
824 <fieldset class="rows" id="memberentry_userid">
825 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
826 [% UNLESS nouserid %]
828 [% IF ( mandatoryuserid ) %]
829 <label for="userid" class="required">
835 [% IF ( NoUpdateLogin ) %]
836 [% IF ( opduplicate ) %]
837 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
839 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
842 [% IF ( opduplicate ) %]
843 <input type="text" id="userid" name="userid" size="20" value="" />
845 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
849 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
850 <input type="text" disabled="disabled" style="display:none" />
852 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
855 [% UNLESS nopassword %]
857 [% IF ( mandatorypassword ) %]
858 <label for="password" class="required">
860 <label for="password">
864 [% IF ( NoUpdateLogin ) %]
865 [% IF ( opduplicate ) %]
866 <input type="password" id="password" name="password" size="20" disabled="disabled" />
868 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
871 [% IF ( opduplicate ) %]
872 <input type="password" id="password" name="password" size="20" />
874 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
878 [% IF ( password ) %]
879 [% IF ( NoUpdateLogin ) %]
880 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
882 [% IF ( opduplicate ) %]
883 <input type="password" id="password" name="password" size="20" />
885 <input type="password" id="password" name="password" size="20" value="****" />
889 [% IF ( NoUpdateLogin ) %]
890 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
892 <input type="password" id="password" name="password" size="20" value="" />
896 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
897 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
898 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
899 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
900 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
903 [% IF ( mandatorypassword ) %]
904 <label for="password2" class="required">
906 <label for="password2">
908 Confirm password: </label>
910 [% IF ( NoUpdateLogin ) %]
911 [% IF ( opduplicate ) %]
912 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
914 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
917 [% IF ( opduplicate ) %]
918 <input type="password" id="password2" name="password2" size="20" />
920 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
924 [% IF ( password ) %]
925 [% IF ( NoUpdateLogin ) %]
926 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
928 [% IF ( opduplicate ) %]
929 <input type="password" id="password2" name="password2" size="20" />
931 <input type="password" id="password2" name="password2" size="20" value="****" />
935 [% IF ( NoUpdateLogin ) %]
936 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
938 <input type="password" id="password2" name="password2" size="20" value="" />
942 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
946 [% END # hide fieldset %][% END %]
947 <!--this zones are not necessary in modif mode -->
948 [% UNLESS ( opadd || opduplicate ) %]
949 <fieldset class="rows" id="memberentry_account_flags">
950 <legend id="account_flags_lgd">Patron account flags</legend>
952 [% FOREACH flagloo IN flagloop %]
953 <li><label class="radio" for="yes[% flagloo.name | html %]">
954 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
955 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
957 [% IF CAN_user_circulate_manage_restrictions %]
958 <label for="yes[% flagloo.name | html %]">
959 [% IF ( flagloo.yes ) %]
960 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
962 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
965 <label for="no[% flagloo.name | html %]">
966 [% IF ( flagloo.no ) %]
967 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
969 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
973 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
982 <fieldset class="rows" id="memberentry_restrictions">
983 <legend id="restrictions_lgd">Patron restrictions</legend>
985 [% IF ( debarments ) %]
993 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1000 [% FOREACH d IN debarments %]
1002 <td>[% d.type | html %]</td>
1004 [% IF d.comment.search('OVERDUES_PROCESS') %]
1005 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1007 [% d.comment | $raw %]
1010 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
1011 <td>[% d.created | $KohaDates %]</td>
1012 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1014 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
1022 <p>Patron is currently unrestricted.</p>
1025 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
1026 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
1027 <fieldset id="manual_restriction_form">
1028 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
1029 <legend id="manual_restriction_lgd">Add manual restriction</legend>
1031 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1032 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" type="text" />
1033 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1037 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
1047 [% IF Koha.Preference('HouseboundModule') %]
1048 <fieldset class="rows" id="memberentry_housebound_roles">
1049 <legend id="housebound_roles">Housebound roles</legend>
1052 <label class="radio" for="housebound_chooser">
1055 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1056 <label for="yes_housebound_chooser">Yes </label>
1057 <input type="radio" id="yes_housebound_chooser"
1058 name="housebound_chooser" value="1"
1059 checked="checked" />
1060 <label for="no_housebound_chooser">No </label>
1061 <input type="radio" id="no_housebound_chooser"
1062 name="housebound_chooser" value="0" />
1064 <label for="yes_housebound_chooser">Yes </label>
1065 <input type="radio" id="yes_housebound_chooser"
1066 name="housebound_chooser" value="1" />
1067 <label for="no_housebound_chooser">No </label>
1068 <input type="radio" id="no_housebound_chooser"
1069 name="housebound_chooser" value="0"
1070 checked="checked" />
1074 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1075 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1076 <label for="yes_housebound_deliverer">Yes </label>
1077 <input type="radio" id="yes_housebound_deliverer"
1078 name="housebound_deliverer" value="1"
1079 checked="checked" />
1080 <label for="no_housebound_deliverer">No </label>
1081 <input type="radio" id="no_housebound_deliverer"
1082 name="housebound_deliverer" value="0" />
1084 <label for="yes_housebound_deliverer">Yes </label>
1085 <input type="radio" id="yes_housebound_deliverer"
1086 name="housebound_deliverer" value="1" />
1087 <label for="no_housebound_deliverer">No </label>
1088 <input type="radio" id="no_housebound_deliverer"
1089 name="housebound_deliverer" value="0"
1090 checked="checked" />
1095 [% END # hide fieldset %]
1096 [% END # IF step_7 %]
1099 [% IF Koha.Preference('ExtendedPatronAttributes') %][% UNLESS ( no_patron_attribute_types ) %]
1100 <fieldset class="rows" id="memberentry_patron_attributes">
1101 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1102 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1103 [% FOREACH pa_loo IN patron_attributes %]
1104 <ol class="attributes_table">
1105 [% IF pa_loo.class %]
1106 <fieldset id="aai_[% pa_loo.class | html %]">
1107 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1109 [% FOREACH patron_attribute IN pa_loo.items %]
1110 <li data-category_code="[% patron_attribute.category_code | html %]">
1111 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1112 [% IF ( patron_attribute.use_dropdown ) %]
1113 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1114 <option value=""></option>
1115 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1116 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1117 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1118 [% auth_val_loo.lib | html %]
1121 <option value="[% auth_val_loo.authorised_value | html %]" >
1122 [% auth_val_loo.lib | html %]
1128 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1130 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1131 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1132 [% IF ( patron_attribute.repeatable ) %]
1133 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1137 [% IF pa_loo.class %]</fieldset>[% END %]
1141 [% END %][% END %][% END %]
1143 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1144 <fieldset class="rows" id="memberentry_messaging_prefs">
1145 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1146 <div id="messaging_prefs_loading" class="form-message" style="display:none">
1147 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1149 <input type="hidden" name="setting_messaging_prefs" value="1" />
1150 [% INCLUDE 'messaging-preference-form.inc' %]
1151 [% IF ( SMSSendDriver ) %]
1152 <p><label for="SMSnumber">SMS number:</label>
1153 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1154 <span class="hint">SMS number should be in the format 1234567890 or +11234567890</span>
1156 [% UNLESS nosms_provider_id %]
1158 <label for="sms_provider_id">SMS provider:</label>
1159 <select id="sms_provider_id" name="sms_provider_id">
1160 <option value="">Unknown</option>
1161 [% FOREACH s IN sms_providers %]
1162 [% IF s.id == sms_provider_id %]
1163 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1165 <option value="[% s.id | html %]">[% s.name | html %]</option>
1177 [% IF quickadd && opadd && !check_member %]
1178 <form id="quick_add_form" class="toggler">
1179 <fieldset class="rows quick_add"><legend>Quick add</legend>
1180 <ol id="quick_add_list">
1188 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1190 [% UNLESS ( opadd ) %]
1191 <div class="col-sm-2 col-sm-pull-10">
1193 [% INCLUDE 'circ-menu.inc' %]
1195 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1197 </div> <!-- /.row -->
1199 [% MACRO jsinclude BLOCK %]
1200 [% Asset.js("lib/hc-sticky.js") | $raw %]
1201 [% INCLUDE 'calendar.inc' %]
1202 [% INCLUDE 'str/members-menu.inc' %]
1203 [% Asset.js("js/members-menu.js") | $raw %]
1205 function update_cardnumber_warning(size){
1206 var max_len = [% maxlength_cardnumber | html %];
1207 if ( size >= max_len ) {
1208 $("#cn_max").show();
1210 $("#cn_max").hide();
1214 $(document).ready(function() {
1216 $("#saverecord").css({ 'margin-left': 0 });
1218 Sticky = $("#toolbar");
1221 stickyClass: "floating"
1224 [% IF categorycode %]
1225 update_category_code( "[% categorycode | html %]" );
1227 if ( $("#categorycode_entry").length > 0 ){
1228 var category_code = $("#categorycode_entry").find("option:selected").val();
1229 update_category_code( category_code );
1234 select_user( '[% guarantor.borrowernumber %]', [% To.json( guarantor.unblessed ) | $raw %] );
1237 $("#cn_max").hide();
1239 $("#cardnumber").on("keydown", function(e){
1240 content = $(this).val();
1242 $("#cardnumber").on("keyup", function(e){
1243 // .val() will return the value of the input after the key has been released
1244 var l = $(this).val().length;
1245 if ( l == content.length + 1 ) { l--; }
1246 update_cardnumber_warning(l);
1248 $("#cardnumber").bind("paste", function(e){
1249 var pastedData = e.originalEvent.clipboardData.getData('text');
1250 update_cardnumber_warning(pastedData.length - 1);
1252 var toggle_quick_add = $(".toggle_quick_add");
1253 $(toggle_quick_add).click(function(e){
1254 toggle_quick_add.toggle();
1257 var toggle_from = '';
1258 if( $("#entryform:visible").length ) {
1259 toggle_to = "#quick_add_form label";
1260 toggle_from = "#entryform label";
1262 toggle_to="#entryform label";
1263 toggle_from = "#quick_add_form label";
1265 $(toggle_from).each(function() {
1266 var input_label = $(this).attr('for');
1267 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1268 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1271 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1274 $(".toggler").toggle();
1277 $("#save_quick_add").click(function(){
1278 $("#quick_add_form").validate();
1279 if( $("#quick_add_form").valid()){
1280 $('.toggle_quick_add').click();
1281 $('#saverecord').click();
1283 else {return false;}
1286 $("#saverecord").click(function(){
1287 if( check_form_borrowers() ){
1288 $("#entryform").submit();
1292 $('#duplicate').on('click', function() {
1293 $("input[name='op']").val('modify');
1294 $("input[name='borrowernumber']").val('[% check_member | html %]');
1295 $("input[name='check_member']").val('');
1296 $('#entryform').submit();
1299 $('#not-duplicate').on('click', function() {
1300 $("input[name='nodouble']").val('1');
1301 $('#entryform').submit();
1305 var MSG_SEPARATOR = _("Separator must be / in field %s");
1306 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1307 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1308 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1309 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1310 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1311 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1312 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1313 var MSG_MONTH = _("%s month")
1314 var MSG_MONTHS = _("%s months")
1315 var MSG_YEAR = _("%s year")
1316 var MSG_YEARS = _("%s years")
1317 var LABEL_CHANGE = _("Change");
1318 var LABEL_SET_TO_PATRON = _("Set to patron");
1319 var LABEL_AGE = _("Age");
1320 var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
1322 [% IF quickadd && opadd && !check_member %]
1323 $(document).ready(function () {
1325 $("#entryform,#saverecord").hide();
1326 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1327 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1328 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1329 $("#entryform label").each(function () {
1330 var input_label = $(this).attr('for');
1331 if ( input_label == 'sex-female' ) {
1334 else if ( input_label == 'btitle' ) {
1335 input_label='title';
1337 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1338 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1339 $(this).parent().clone().appendTo("#quick_add_list");
1340 [% UNLESS mandatorypassword %]
1341 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1345 if( $("#memberentry_guarantor").length ) {
1346 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1347 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1348 $("#quick_add_list #guarantordelete").prop('id','qagd');
1350 $("#qagd").click(function() { $("#guarantordelete").click(); });
1351 $("#quick_add_form").show();
1356 [% Asset.js("js/members.js") | $raw %]
1357 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1358 [% PROCESS 'password_check.inc' %]
1359 [% PROCESS 'add_password_check' new_password => 'password' %]
1362 [% INCLUDE 'intranet-bottom.inc' %]