7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Patrons ›
9 [% UNLESS blocking_error %]
11 [% ELSIF ( opduplicate ) %]Duplicate
14 [% IF (firstname) %][% firstname | html %] [% END %]
15 [% IF (surname) %][% surname | html %] [% END %]
16 ([%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 %])
19 [% INCLUDE 'doc-head-close.inc' %]
22 <body id="pat_memberentrygen" class="pat">
23 [% INCLUDE 'header.inc' %]
24 [% INCLUDE 'patron-search.inc' %]
26 <div id="breadcrumbs">
27 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
28 [% UNLESS blocking_error %]
29 ›[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">[% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% END %]</a> ›[% END %]
30 <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>
33 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
38 [% INCLUDE 'blocking_errors.inc' %]
40 [% IF ( error_alert == "no_email" ) %]
41 <div class="error">This member has no email</div>
43 <div class="error">[% error_alert | html %]</div>
47 <div class="dialog message">Email has been sent.</div>
50 [% INCLUDE 'noadd-warnings.inc' %]
52 [% UNLESS ( no_add ) %]
53 <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>
55 [% IF quickadd && opadd && !check_member %]
56 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
57 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
60 [% IF ( check_member ) %]
61 <div class="dialog alert">
62 <h3>Duplicate patron record?</h3>
63 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member | html %]');return false;" >View existing record</a></p>
64 <button id="duplicate" type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
65 Edit existing record</button>
67 <button type="submit" id="not-duplicate" class="new"><i class="fa fa-plus"></i> Not a duplicate.
68 Save as new record</button>
73 <div class="dialog alert">
74 <p>The following fields are wrong. Please fix them.</p>
76 [% IF ( ERROR_login_exist ) %]
77 <li id="ERROR_login_exist">Username/password already exists.</li>
79 [% IF ERROR_cardnumber_already_exists %]
80 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
82 [% IF ERROR_cardnumber_length %]
83 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
85 [% IF ( ERROR_age_limitations ) %]
86 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
87 Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
89 [% IF ( ERROR_branch ) %]
90 <li id="ERROR_branch">Library is invalid.</li>
92 [% IF ( ERROR_dateofbirth ) %]
93 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
95 [% IF ( ERROR_dateenrolled ) %]
96 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
98 [% IF ( ERROR_dateexpiry ) %]
99 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
101 [% IF ( ERROR_password_too_short ) %]
102 <li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li>
104 [% IF ( ERROR_password_too_weak ) %]
105 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
107 [% IF ( ERROR_password_has_whitespaces ) %]
108 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
110 [% IF ( ERROR_password_mismatch ) %]
111 <li id="ERROR_password_mismatch">Passwords do not match.</li>
113 [% IF ( ERROR_extended_unique_id_failed ) %]
114 <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>
116 [% IF ERROR_bad_email %]
117 <li id="ERROR_bad_email">The primary email is invalid.</li>
119 [% IF ERROR_bad_email_secondary %]
120 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
122 [% IF ERROR_bad_email_alternative %]
123 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
130 <div id="toolbar" class="btn-toolbar">
131 [% UNLESS ( check_member ) %]
132 [% IF quickadd && opadd %]
133 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
135 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
137 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
139 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
141 <i class="fa fa-times"></i> Cancel
146 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
147 [% UNLESS ( check_member ) %]
148 <input type="hidden" name="nodouble" value="[% nodouble | html %]" />
150 <!-- field always hidden in different form (1,2,3) -->
151 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" />
152 <input type="hidden" name="category_type" value="[% category_type | html %]" />
153 <input type="hidden" name="updtype" value="[% updtype | html %]" />
154 <input type="hidden" name="destination" value="[% destination | html %]" />
155 <input type="hidden" name="check_member" value="[% check_member | html %]" />
156 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS opduplicate %]" />
157 <input type="hidden" name="nodouble" value="[% nodouble | html UNLESS opduplicate %]" />
158 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
159 [% IF ( step ) %]<input type="hidden" name="step" value="[% step | html %]" />[% END %]
160 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
161 [% ELSIF ( opduplicate ) %]
162 <input type="hidden" name="op" value="insert" />
164 <input type="hidden" name="op" value="save" />
165 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
166 [%# Only put the cardnumber if we arent showing it in the form later %]
168 <input type="hidden" name="cardnumber" value="[% cardnumber | html %]" />
174 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
175 <fieldset class="rows" id="memberentry_identity">
176 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
180 [% IF Koha.Preference('BorrowersTitles') %]
182 [% IF ( mandatorytitle ) %]
183 <label for="btitle" class="required">
188 <select id="btitle" name="title">
189 <option value=""></option>
190 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
192 <option value="[% t | html %]" selected="selected">[% t | html %]</option>
194 <option value="[% t | html %]">[% t | html %]</option>
198 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
203 [% UNLESS nosurname %]
207 <label for="surname" class="required">
211 [% IF ( mandatorysurname ) %]
212 <label for="surname" class="required">
214 <label for="surname">
219 [% IF ( uppercasesurnames ) %]
220 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
222 <input type="text" id="surname" name="surname" size="20" value="[% surname | html %]" />
224 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
228 [% UNLESS nofirstname %]
230 [% IF ( mandatoryfirstname ) %]
231 <label for="firstname" class="required">
233 <label for="firstname">
236 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
237 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
240 [% UNLESS nodateofbirth %]
242 [% IF ( mandatorydateofbirth ) %]
243 <label for="dateofbirth" class="required">
245 <label for="dateofbirth">
247 Date of birth: </label>
249 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth | html UNLESS opduplicate %]" class="datepicker" />
251 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
252 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
253 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
256 [% UNLESS noinitials %]
258 [% IF ( mandatoryinitials ) %]
259 <label for="initials" class="required">
261 <label for="initials">
264 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
265 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
269 [% UNLESS noothernames %]
271 [% IF ( mandatoryothernames ) %]
272 <label for="othernames" class="required">
274 <label for="othernames">
277 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
278 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
279 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
286 [% UNLESS ( opduplicate ) %]
288 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
290 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
293 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
295 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
298 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
300 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
303 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
304 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
305 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
313 [% END # hide fieldset %]
315 [% IF ( showguarantor ) %]
316 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid | html %]" />
318 <input type="hidden" name="branchcode" value="[% branchcode | html %]" />
320 <fieldset id="memberentry_guarantor" class="rows">
321 <legend id="guarantor_lgd">Guarantor information</legend>
324 [% IF ( guarantorid ) %]
325 <li id="contact-details">
327 <li id="contact-details" style="display: none">
329 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid | html %]" target="blank">[% guarantorid | html %]</a>[% END %]
332 <label for="contactname">Organization name: </label>
333 [% IF ( guarantorid ) %]
334 <span>[% contactname | html %]</span>
335 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
337 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
342 [% IF ( guarantorid ) %]
343 <li id="contact-details">
345 <li id="contact-details" style="display: none">
347 <span class="label">Patron #:</span>
349 [% IF logged_in_user.can_see_patron_infos( guarantor ) %]
350 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid | html %]" target="blank">[% guarantorid | html %]</a>
352 [% guarantorid | html %]
356 [% UNLESS nocontactname %]
358 <label for="contactname">Surname: </label>
359 [% IF ( guarantorid ) %]
360 <span>[% contactname | html %]</span>
361 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
363 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
367 [% UNLESS nocontactfirstname %]
369 <label for="contactfirstname">First name: </label>
370 [% IF ( guarantorid ) %]
371 <span>[% contactfirstname | html %]</span>
372 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
374 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
378 [% IF ( relshiploop ) %]
380 <label for="relationship">Relationship: </label>
381 <select name="relationship" id="relationship" >
382 [% FOREACH relshiploo IN relshiploop %]
383 [% IF ( relshiploo.selected ) %]
384 <option value="[% relshiploo.relationship | html %]" selected="selected" >[% relshiploo.relationship | html %]</option>
386 <option value="[% relshiploo.relationship | html %]">[% relshiploo.relationship | html %]</option>
395 <span class="label"> </span>
396 [% IF ( guarantorid ) %]
397 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
399 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
401 <input id="guarantordelete" type="button" value="Delete" />
403 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
405 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
406 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
407 [% IF privacy_guarantor_checkouts %]
408 <option value="0">No</option>
409 <option value="1" selected>Yes</option>
411 <option value="0" selected>No</option>
412 <option value="1">Yes</option>
415 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
422 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
423 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
425 [% INCLUDE 'member-main-address-style-de.inc' %]
427 [% INCLUDE 'member-main-address-style-us.inc' %]
429 [% END # nostreet && nocity etc group%]
431 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
432 <fieldset class="rows" id="memberentry_contact">
433 <legend id="contact_lgd">Contact</legend><ol>
436 [% IF ( mandatoryphone ) %]
437 <label for="phone" class="required">
441 Primary phone: </label>
442 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
443 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
447 [% UNLESS nophonepro %]
449 [% IF ( mandatoryphonepro ) %]
450 <label for="phonepro" class="required">
452 <label for="phonepro">
454 Secondary phone: </label>
455 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
456 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
459 [% UNLESS nomobile %]
461 [% IF ( mandatorymobile ) %]
462 <label for="mobile" class="required">
466 Other phone: </label>
467 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
468 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
473 [% IF ( mandatoryemail ) %]
474 <label for="email" class="required">
478 Primary email: </label>
479 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
480 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
484 [% UNLESS noemailpro %]
486 [% IF ( mandatoryemailpro ) %]
487 <label for="emailpro" class="required">
489 <label for="emailpro">
491 Secondary email: </label>
492 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
493 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
498 [% IF ( mandatoryfax ) %]
499 <label for="fax" class="required">
504 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
505 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
510 [%END # hide fieldset %]
512 <!-- ************************ STEP_1 *********************** -->
516 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
517 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
519 [% INCLUDE 'member-alt-address-style-de.inc' %]
521 [% INCLUDE 'member-alt-address-style-us.inc' %]
524 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
527 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
528 [% SWITCH Koha.Preference( 'AddressFormat' ) %]
530 [% INCLUDE 'member-alt-contact-style-de.inc' %]
532 [% INCLUDE 'member-alt-contact-style-us.inc' %]
534 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
539 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
540 <fieldset class="rows" id="memberentry_library_management">
541 <legend id="library_management_lgd">Library management</legend><ol>
542 [% UNLESS nocardnumber %]
544 [% IF mandatorycardnumber %]
545 <label for="cardnumber" class="required">
547 <label for="cardnumber" class="validated">
549 Card number: </label>
551 <!-- NOTE: div.hint closing tag isn't on the same line -->
552 [% IF minlength_cardnumber == maxlength_cardnumber %]
553 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
554 [% 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>
555 <div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.
556 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
557 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
558 [% 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>
559 <div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.
560 [% ELSIF maxlength_cardnumber %]
561 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" />
562 [% 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>
563 <div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.
565 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
566 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]
567 <div class="hint">There is no minimum or maximum character length.
569 [% IF autoMemberNum %]
570 [% IF mandatorycardnumber %]
571 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
573 <br/>Leave blank for auto calc during registration
576 </div><!--/hint div -->
579 [% UNLESS nobranchcode %]
581 <label for="libraries" class="required">Library:</label>
582 <select name="branchcode" size="1" id="libraries">
583 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
585 <span class="required">Required</span>
589 <label for="categorycode_entry" class="required">Category: </label>
590 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
591 [% FOREACH typeloo IN typeloop %]
592 [% FOREACH categoryloo IN typeloo.categoryloop %]
593 [% IF ( loop.first ) %]
594 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
595 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
596 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
597 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
598 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
599 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
601 [% IF ( categoryloo.categorycodeselected ) %]
602 <option value="[% categoryloo.categorycode | html %]" selected="selected" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
604 <option value="[% categoryloo.categorycode | html %]" data-typename="[% typeloo.typename | html %]">[% categoryloo.categoryname | html %]</option>
606 [% IF ( loop.last ) %]
612 <span class="required">Required</span>
616 [% IF ( mandatorysort1 ) %]
617 <label for="sort1" class="required">
622 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
623 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
628 [% IF ( mandatorysort2 ) %]
629 <label for="sort2" class="required">
634 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
635 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
638 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
639 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
640 <select name="checkprevcheckout" id="checkprevcheckout">
641 [% IF ( checkprevcheckout == 'yes' ) %]
642 <option value="yes" selected="selected">Yes if settings allow it</option>
643 <option value="no">No if settings allow it</option>
644 <option value="inherit">Inherit from settings</option>
645 [% ELSIF ( checkprevcheckout == 'no' ) %]
646 <option value="yes">Yes if settings allow it</option>
647 <option value="no" selected="selected">No if settings allow it</option>
648 <option value="inherit">Inherit from settings</option>
650 <option value="yes">Yes if settings allow it</option>
651 <option value="no">No if settings allow it</option>
652 <option value="inherit" selected="selected">Inherit from settings</option>
657 [% IF Koha.Preference('TranslateNotices') %]
659 <label for="lang">Preferred language for notices: </label>
660 <select id="lang" name="lang">
661 <option value="default">Default</option>
662 [% FOR language IN languages %]
663 [% FOR sublanguage IN language.sublanguages_loop %]
664 [% IF language.plural %]
665 [% IF sublanguage.rfc4646_subtag == lang %]
666 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
668 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
671 [% IF sublanguage.rfc4646_subtag == lang %]
672 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
674 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
684 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
685 <fieldset class="rows" id="memberentry_subscription">
686 <legend id="library_setup_lgd">Library set-up</legend><ol>
687 [% UNLESS nodateenrolled %]
689 [% IF ( mandatorydateenrolled ) %]
690 <label for="from" class="required">
694 Registration date: </label>
695 [% IF ( dateformat == "metric" ) %]
696 <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" />
698 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
700 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
701 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
702 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
705 [% UNLESS nodateexpiry %]
708 <li style="display:none">
710 [% IF ( mandatorydateexpiry ) %]
711 <label for="to" class="required">
715 Expiry date (leave blank for auto calc): </label>
716 [% IF ( dateformat == "metric" ) %]
717 [% UNLESS ( opadd ) %]
718 <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" />
720 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
723 [% UNLESS ( opadd ) %]
724 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
726 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
729 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
730 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
731 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
733 [% UNLESS noopacnote %]
735 [% IF ( mandatoryopacnote ) %]
736 <label for="opacnote" class="required">
738 <label for="opacnote">
741 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
742 <div class="hint">This message appears on this patron's user page in the OPAC</div>
743 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
746 [% UNLESS noborrowernotes %]
748 [% IF ( mandatoryborrowernotes ) %]
749 <label for="borrowernotes" class="required">
751 <label for="borrowernotes">
753 Circulation note: </label>
754 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
755 <div class="hint">This message displays when checking out to this patron</div>
756 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
761 [% END # hide fieldset %]
763 [% UNLESS nouserid && nopassword %]
764 <fieldset class="rows" id="memberentry_userid">
765 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
766 [% UNLESS nouserid %]
768 [% IF ( mandatoryuserid ) %]
769 <label for="userid" class="required">
775 [% IF ( NoUpdateLogin ) %]
776 [% IF ( opduplicate ) %]
777 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
779 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
782 [% IF ( opduplicate ) %]
783 <input type="text" id="userid" name="userid" size="20" value="" />
785 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
789 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
790 <input type="text" disabled="disabled" style="display:none" />
792 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
795 [% UNLESS nopassword %]
797 [% IF ( mandatorypassword ) %]
798 <label for="password" class="required">
800 <label for="password">
804 [% IF ( NoUpdateLogin ) %]
805 [% IF ( opduplicate ) %]
806 <input type="password" id="password" name="password" size="20" disabled="disabled" />
808 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
811 [% IF ( opduplicate ) %]
812 <input type="password" id="password" name="password" size="20" />
814 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
818 [% IF ( password ) %]
819 [% IF ( NoUpdateLogin ) %]
820 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
822 [% IF ( opduplicate ) %]
823 <input type="password" id="password" name="password" size="20" />
825 <input type="password" id="password" name="password" size="20" value="****" />
829 [% IF ( NoUpdateLogin ) %]
830 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
832 <input type="password" id="password" name="password" size="20" value="" />
836 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
837 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
838 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
839 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
840 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
843 [% IF ( mandatorypassword ) %]
844 <label for="password2" class="required">
846 <label for="password2">
848 Confirm password: </label>
850 [% IF ( NoUpdateLogin ) %]
851 [% IF ( opduplicate ) %]
852 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
854 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
857 [% IF ( opduplicate ) %]
858 <input type="password" id="password2" name="password2" size="20" />
860 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
864 [% IF ( password ) %]
865 [% IF ( NoUpdateLogin ) %]
866 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
868 [% IF ( opduplicate ) %]
869 <input type="password" id="password2" name="password2" size="20" />
871 <input type="password" id="password2" name="password2" size="20" value="****" />
875 [% IF ( NoUpdateLogin ) %]
876 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
878 <input type="password" id="password2" name="password2" size="20" value="" />
882 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
886 [% END # hide fieldset %][% END %]
887 <!--this zones are not necessary in modif mode -->
888 [% UNLESS ( opadd || opduplicate ) %]
889 <fieldset class="rows" id="memberentry_account_flags">
890 <legend id="account_flags_lgd">Patron account flags</legend>
892 [% FOREACH flagloo IN flagloop %]
893 <li><label class="radio" for="yes[% flagloo.name | html %]">
894 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
895 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
897 [% IF CAN_user_circulate_manage_restrictions %]
898 <label for="yes[% flagloo.name | html %]">
899 [% IF ( flagloo.yes ) %]
900 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
902 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
905 <label for="no[% flagloo.name | html %]">
906 [% IF ( flagloo.no ) %]
907 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
909 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
913 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
922 <fieldset class="rows" id="memberentry_restrictions">
923 <legend id="restrictions_lgd">Patron restrictions</legend>
925 [% IF ( debarments ) %]
933 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
940 [% FOREACH d IN debarments %]
942 <td>[% d.type | html %]</td>
944 [% IF d.comment.search('OVERDUES_PROCESS') %]
945 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
947 [% d.comment | $raw %]
950 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
951 <td>[% d.created | $KohaDates %]</td>
952 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
954 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
962 <p>Patron is currently unrestricted.</p>
965 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
966 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
967 <fieldset id="manual_restriction_form">
968 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
969 <legend id="manual_restriction_lgd">Add manual restriction</legend>
971 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
972 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
973 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
977 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
987 [% IF Koha.Preference('HouseboundModule') %]
988 <fieldset class="rows" id="memberentry_housebound_roles">
989 <legend id="housebound_roles">Housebound roles</legend>
992 <label class="radio" for="housebound_chooser">
995 [% IF ( housebound_role.housebound_chooser == 1 ) %]
996 <label for="yes_housebound_chooser">Yes </label>
997 <input type="radio" id="yes_housebound_chooser"
998 name="housebound_chooser" value="1"
1000 <label for="no_housebound_chooser">No </label>
1001 <input type="radio" id="no_housebound_chooser"
1002 name="housebound_chooser" value="0" />
1004 <label for="yes_housebound_chooser">Yes </label>
1005 <input type="radio" id="yes_housebound_chooser"
1006 name="housebound_chooser" value="1" />
1007 <label for="no_housebound_chooser">No </label>
1008 <input type="radio" id="no_housebound_chooser"
1009 name="housebound_chooser" value="0"
1010 checked="checked" />
1014 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1015 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1016 <label for="yes_housebound_deliverer">Yes </label>
1017 <input type="radio" id="yes_housebound_deliverer"
1018 name="housebound_deliverer" value="1"
1019 checked="checked" />
1020 <label for="no_housebound_deliverer">No </label>
1021 <input type="radio" id="no_housebound_deliverer"
1022 name="housebound_deliverer" value="0" />
1024 <label for="yes_housebound_deliverer">Yes </label>
1025 <input type="radio" id="yes_housebound_deliverer"
1026 name="housebound_deliverer" value="1" />
1027 <label for="no_housebound_deliverer">No </label>
1028 <input type="radio" id="no_housebound_deliverer"
1029 name="housebound_deliverer" value="0"
1030 checked="checked" />
1035 [% END # hide fieldset %]
1036 [% END # IF step_7 %]
1039 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1040 <fieldset class="rows" id="memberentry_patron_attributes">
1041 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1042 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1043 [% FOREACH pa_loo IN patron_attributes %]
1044 [% IF pa_loo.class %]
1045 <fieldset id="aai_[% pa_loo.class | html %]">
1046 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1048 <ol class="attributes_table">
1049 [% FOREACH patron_attribute IN pa_loo.items %]
1050 <li data-category_code="[% patron_attribute.category_code | html %]">
1051 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1052 [% IF ( patron_attribute.use_dropdown ) %]
1053 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1054 <option value=""></option>
1055 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1056 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1057 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1058 [% auth_val_loo.lib | html %]
1061 <option value="[% auth_val_loo.authorised_value | html %]" >
1062 [% auth_val_loo.lib | html %]
1068 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1070 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1071 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1072 [% IF ( patron_attribute.repeatable ) %]
1073 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1078 [% IF pa_loo.class %]</fieldset>[% END %]
1081 [% END %][% END %][% END %]
1083 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1084 <fieldset class="rows" id="memberentry_messaging_prefs">
1085 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1087 <!-- handle changing prefs if creating new patron and changing
1090 <script type="text/javascript">//<![CDATA[
1091 $(document).ready(function(){
1092 var message_prefs_dirty = false;
1093 $('#memberentry_messaging_prefs > *').change(function() {
1094 message_prefs_dirty = true;
1096 $('#categorycode_entry').change(function() {
1097 var categorycode = $(this).val();
1098 if (message_prefs_dirty) {
1099 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1103 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1105 $.each(data.messaging_preferences, function(i, item) {
1106 var attrid = item.message_attribute_id;
1107 var transports = ['email', 'rss', 'sms'];
1108 $.each(transports, function(j, transport) {
1109 if (item['transports_' + transport] == 1) {
1110 $('#' + transport + attrid).prop('checked', true);
1112 $('#' + transport + attrid).prop('checked', false);
1115 if (item.digest && item.digest != ' ') {
1116 $('#digest' + attrid).prop('checked', true);
1118 $('#digest' + attrid).prop('checked', false);
1120 if (item.takes_days == '1') {
1121 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1124 message_prefs_dirty = false;
1132 <input type="hidden" name="setting_messaging_prefs" value="1" />
1133 [% INCLUDE 'messaging-preference-form.inc' %]
1134 [% IF ( SMSSendDriver ) %]
1135 <p><label for="SMSnumber">SMS number:</label>
1136 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1138 [% UNLESS nosms_provider_id %]
1140 <label for="sms_provider_id">SMS provider:</label>
1141 <select id="sms_provider_id" name="sms_provider_id"/>
1142 <option value="">Unknown</option>
1143 [% FOREACH s IN sms_providers %]
1144 [% IF s.id == sms_provider_id %]
1145 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1147 <option value="[% s.id | html %]">[% s.name | html %]</option>
1159 [% IF quickadd && opadd && !check_member %]
1160 <form id="quick_add_form" class="toggler">
1161 <fieldset class="rows quick_add"><legend>Quick add</legend>
1162 <ol id="quick_add_list">
1170 [% UNLESS ( opadd ) %]<div class="yui-b">
1171 [% INCLUDE 'circ-menu.inc' %]
1176 [% MACRO jsinclude BLOCK %]
1177 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
1178 [% INCLUDE 'calendar.inc' %]
1179 [% INCLUDE 'str/members-menu.inc' %]
1180 [% Asset.js("js/members-menu.js") | $raw %]
1181 <script type="text/javascript">
1182 $(document).ready(function() {
1184 $("#saverecord").css({ 'margin-left': 0 });
1185 var original_offset = $("#toolbar").position().top;
1186 var additional_height = $("#filters").height();
1187 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1188 $("#filteraction_on").on("click", function(){
1189 $(window).off('scroll');
1190 $("#toolbar").css({ top: original_offset + additional_height });
1191 $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
1193 $("#filteraction_off").on("click", function(){
1194 $(window).off('scroll');
1195 $("#toolbar").css({ top: original_offset });
1196 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1199 [% IF categorycode %]
1200 update_category_code( "[% categorycode | html %]" );
1202 if ( $("#categorycode_entry").length > 0 ){
1203 var category_code = $("#categorycode_entry").find("option:selected").val();
1204 update_category_code( category_code );
1209 function update_cardnumber_warning(size){
1210 var max_len = [% maxlength_cardnumber | html %];
1211 if ( size >= max_len ) {
1212 $("#cn_max").show();
1214 $("#cn_max").hide();
1218 $(document).ready(function() {
1219 $("#cn_max").hide();
1221 $("#cardnumber").on("keydown", function(e){
1222 content = $(this).val();
1224 $("#cardnumber").on("keyup", function(e){
1225 // .val() will return the value of the input after the key has been released
1226 var l = $(this).val().length;
1227 if ( l == content.length + 1 ) { l--; }
1228 update_cardnumber_warning(l);
1230 $("#cardnumber").bind("paste", function(e){
1231 var pastedData = e.originalEvent.clipboardData.getData('text');
1232 update_cardnumber_warning(pastedData.length - 1);
1234 var toggle_quick_add = $(".toggle_quick_add");
1235 $(toggle_quick_add).click(function(e){
1236 toggle_quick_add.toggle();
1239 var toggle_from = '';
1240 if( $("#entryform:visible").length ) {
1241 toggle_to = "#quick_add_form label";
1242 toggle_from = "#entryform label";
1244 toggle_to="#entryform label";
1245 toggle_from = "#quick_add_form label";
1247 $(toggle_from).each(function() {
1248 var input_label = $(this).attr('for');
1249 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1250 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1253 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1256 $(".toggler").toggle();
1259 $("#save_quick_add").click(function(){
1260 $("#quick_add_form").validate();
1261 if( $("#quick_add_form").valid()){
1262 $('.toggle_quick_add').click();
1263 $('#saverecord').click();
1265 else {return false;}
1268 $("#saverecord").click(function(){
1269 if( check_form_borrowers() ){
1270 $("#entryform").submit();
1274 $('#duplicate').on('click', function() {
1275 $("input[name='op']").val('modify');
1276 $("input[name='borrowernumber']").val('[% check_member | html %]');
1277 $("input[name='check_member']").val('');
1278 $('#entryform').submit();
1281 $('#not-duplicate').on('click', function() {
1282 $("input[name='nodouble']").val('1');
1283 $('#entryform').submit();
1287 var MSG_SEPARATOR = _("Separator must be / in field %s");
1288 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1289 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1290 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1291 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1292 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1293 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1294 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1295 var MSG_MONTH = _("%s month")
1296 var MSG_MONTHS = _("%s months")
1297 var MSG_YEAR = _("%s year")
1298 var MSG_YEARS = _("%s years")
1299 var LABEL_CHANGE = _("Change");
1300 var LABEL_SET_TO_PATRON = _("Set to patron");
1301 var LABEL_AGE = _("Age");
1303 [% IF quickadd && opadd && !check_member %]
1304 $(document).ready(function () {
1306 $("#entryform,#saverecord").hide();
1307 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') | html %]
1308 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1309 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1310 $("#entryform label").each(function () {
1311 var input_label = $(this).attr('for');
1312 if ( input_label == 'sex-female' ) {
1315 else if ( input_label == 'btitle' ) {
1316 input_label='title';
1318 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1319 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1320 $(this).parent().clone().appendTo("#quick_add_list");
1321 [% UNLESS mandatorypassword %]
1322 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1326 if( $("#memberentry_guarantor").length ) {
1327 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1328 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1329 $("#quick_add_list #guarantordelete").prop('id','qagd');
1331 $("#qagd").click(function() { $("#guarantordelete").click(); });
1332 $("#quick_add_form").show();
1337 [% Asset.js("js/members.js") | $raw %]
1338 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1341 [% INCLUDE 'intranet-bottom.inc' %]
1342 [% PROCESS 'password_check.inc' %]
1343 [% PROCESS 'add_password_check' new_password => 'password' %]