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( 'NorwegianPatronDBEnable' ) == 1 ) %]
640 <label for="sort2">Sync with the Norwegian national patron database:</label>
641 [% IF ( sync == 0 ) %]
642 <input type="radio" id="sync" name="sync" value="1"> Yes
643 <input type="radio" id="sync" name="sync" value="0" checked> No
645 <input type="radio" id="sync" name="sync" value="1" checked> Yes
646 <input type="radio" id="sync" name="sync" value="0"> No
650 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
651 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
652 <select name="checkprevcheckout" id="checkprevcheckout">
653 [% IF ( checkprevcheckout == 'yes' ) %]
654 <option value="yes" selected="selected">Yes if settings allow it</option>
655 <option value="no">No if settings allow it</option>
656 <option value="inherit">Inherit from settings</option>
657 [% ELSIF ( checkprevcheckout == 'no' ) %]
658 <option value="yes">Yes if settings allow it</option>
659 <option value="no" selected="selected">No if settings allow it</option>
660 <option value="inherit">Inherit from settings</option>
662 <option value="yes">Yes if settings allow it</option>
663 <option value="no">No if settings allow it</option>
664 <option value="inherit" selected="selected">Inherit from settings</option>
669 [% IF Koha.Preference('TranslateNotices') %]
671 <label for="lang">Preferred language for notices: </label>
672 <select id="lang" name="lang">
673 <option value="default">Default</option>
674 [% FOR language IN languages %]
675 [% FOR sublanguage IN language.sublanguages_loop %]
676 [% IF language.plural %]
677 [% IF sublanguage.rfc4646_subtag == lang %]
678 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
680 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
683 [% IF sublanguage.rfc4646_subtag == lang %]
684 <option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
686 <option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option>
696 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
697 <fieldset class="rows" id="memberentry_subscription">
698 <legend id="library_setup_lgd">Library set-up</legend><ol>
699 [% UNLESS nodateenrolled %]
701 [% IF ( mandatorydateenrolled ) %]
702 <label for="from" class="required">
706 Registration date: </label>
707 [% IF ( dateformat == "metric" ) %]
708 <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" />
710 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="datepickerfrom" />
712 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
713 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
714 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
717 [% UNLESS nodateexpiry %]
720 <li style="display:none">
722 [% IF ( mandatorydateexpiry ) %]
723 <label for="to" class="required">
727 Expiry date (leave blank for auto calc): </label>
728 [% IF ( dateformat == "metric" ) %]
729 [% UNLESS ( opadd ) %]
730 <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" />
732 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
735 [% UNLESS ( opadd ) %]
736 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="datepickerto" />
738 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="datepickerto" />
741 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
742 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
743 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
745 [% UNLESS noopacnote %]
747 [% IF ( mandatoryopacnote ) %]
748 <label for="opacnote" class="required">
750 <label for="opacnote">
753 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
754 <div class="hint">This message appears on this patron's user page in the OPAC</div>
755 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
758 [% UNLESS noborrowernotes %]
760 [% IF ( mandatoryborrowernotes ) %]
761 <label for="borrowernotes" class="required">
763 <label for="borrowernotes">
765 Circulation note: </label>
766 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
767 <div class="hint">This message displays when checking out to this patron</div>
768 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
773 [% END # hide fieldset %]
775 [% UNLESS nouserid && nopassword %]
776 <fieldset class="rows" id="memberentry_userid">
777 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
778 [% UNLESS nouserid %]
780 [% IF ( mandatoryuserid ) %]
781 <label for="userid" class="required">
787 [% IF ( NoUpdateLogin ) %]
788 [% IF ( opduplicate ) %]
789 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
791 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid | html %]" />
794 [% IF ( opduplicate ) %]
795 <input type="text" id="userid" name="userid" size="20" value="" />
797 <input type="text" id="userid" name="userid" size="20" value="[% userid | html %]" />
801 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
802 <input type="text" disabled="disabled" style="display:none" />
804 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
807 [% UNLESS nopassword %]
809 [% IF ( mandatorypassword ) %]
810 <label for="password" class="required">
812 <label for="password">
816 [% IF ( NoUpdateLogin ) %]
817 [% IF ( opduplicate ) %]
818 <input type="password" id="password" name="password" size="20" disabled="disabled" />
820 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password | html %]" />
823 [% IF ( opduplicate ) %]
824 <input type="password" id="password" name="password" size="20" />
826 <input type="password" id="password" name="password" size="20" value="[% password | html %]" />
830 [% IF ( password ) %]
831 [% IF ( NoUpdateLogin ) %]
832 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
834 [% IF ( opduplicate ) %]
835 <input type="password" id="password" name="password" size="20" />
837 <input type="password" id="password" name="password" size="20" value="****" />
841 [% IF ( NoUpdateLogin ) %]
842 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
844 <input type="password" id="password" name="password" size="20" value="" />
848 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
849 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
850 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
851 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
852 <div class="hint">Minimum password length: [% minPasswordLength | html %]</div>
855 [% IF ( mandatorypassword ) %]
856 <label for="password2" class="required">
858 <label for="password2">
860 Confirm password: </label>
862 [% IF ( NoUpdateLogin ) %]
863 [% IF ( opduplicate ) %]
864 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
866 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password | html %]" />
869 [% IF ( opduplicate ) %]
870 <input type="password" id="password2" name="password2" size="20" />
872 <input type="password" id="password2" name="password2" size="20" value="[% password | html %]" />
876 [% IF ( password ) %]
877 [% IF ( NoUpdateLogin ) %]
878 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
880 [% IF ( opduplicate ) %]
881 <input type="password" id="password2" name="password2" size="20" />
883 <input type="password" id="password2" name="password2" size="20" value="****" />
887 [% IF ( NoUpdateLogin ) %]
888 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
890 <input type="password" id="password2" name="password2" size="20" value="" />
894 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
898 [% END # hide fieldset %][% END %]
899 <!--this zones are not necessary in modif mode -->
900 [% UNLESS ( opadd || opduplicate ) %]
901 <fieldset class="rows" id="memberentry_account_flags">
902 <legend id="account_flags_lgd">Patron account flags</legend>
904 [% FOREACH flagloo IN flagloop %]
905 <li><label class="radio" for="yes[% flagloo.name | html %]">
906 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
907 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
909 [% IF CAN_user_circulate_manage_restrictions %]
910 <label for="yes[% flagloo.name | html %]">
911 [% IF ( flagloo.yes ) %]
912 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
914 <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
917 <label for="no[% flagloo.name | html %]">
918 [% IF ( flagloo.no ) %]
919 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
921 <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
925 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
934 <fieldset class="rows" id="memberentry_restrictions">
935 <legend id="restrictions_lgd">Patron restrictions</legend>
937 [% IF ( debarments ) %]
945 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
952 [% FOREACH d IN debarments %]
954 <td>[% d.type | html %]</td>
956 [% IF d.comment.search('OVERDUES_PROCESS') %]
957 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
959 [% d.comment | $raw %]
962 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
963 <td>[% d.created | $KohaDates %]</td>
964 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
966 <input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d.borrower_debarment_id | html %]" />
974 <p>Patron is currently unrestricted.</p>
977 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
978 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
979 <fieldset id="manual_restriction_form">
980 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
981 <legend id="manual_restriction_lgd">Add manual restriction</legend>
983 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
984 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
985 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
989 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
999 [% IF Koha.Preference('HouseboundModule') %]
1000 <fieldset class="rows" id="memberentry_housebound_roles">
1001 <legend id="housebound_roles">Housebound roles</legend>
1004 <label class="radio" for="housebound_chooser">
1007 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1008 <label for="yes_housebound_chooser">Yes </label>
1009 <input type="radio" id="yes_housebound_chooser"
1010 name="housebound_chooser" value="1"
1011 checked="checked" />
1012 <label for="no_housebound_chooser">No </label>
1013 <input type="radio" id="no_housebound_chooser"
1014 name="housebound_chooser" value="0" />
1016 <label for="yes_housebound_chooser">Yes </label>
1017 <input type="radio" id="yes_housebound_chooser"
1018 name="housebound_chooser" value="1" />
1019 <label for="no_housebound_chooser">No </label>
1020 <input type="radio" id="no_housebound_chooser"
1021 name="housebound_chooser" value="0"
1022 checked="checked" />
1026 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1027 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1028 <label for="yes_housebound_deliverer">Yes </label>
1029 <input type="radio" id="yes_housebound_deliverer"
1030 name="housebound_deliverer" value="1"
1031 checked="checked" />
1032 <label for="no_housebound_deliverer">No </label>
1033 <input type="radio" id="no_housebound_deliverer"
1034 name="housebound_deliverer" value="0" />
1036 <label for="yes_housebound_deliverer">Yes </label>
1037 <input type="radio" id="yes_housebound_deliverer"
1038 name="housebound_deliverer" value="1" />
1039 <label for="no_housebound_deliverer">No </label>
1040 <input type="radio" id="no_housebound_deliverer"
1041 name="housebound_deliverer" value="0"
1042 checked="checked" />
1047 [% END # hide fieldset %]
1048 [% END # IF step_7 %]
1051 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1052 <fieldset class="rows" id="memberentry_patron_attributes">
1053 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1054 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1055 [% FOREACH pa_loo IN patron_attributes %]
1056 [% IF pa_loo.class %]
1057 <fieldset id="aai_[% pa_loo.class | html %]">
1058 <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
1060 <ol class="attributes_table">
1061 [% FOREACH patron_attribute IN pa_loo.items %]
1062 <li data-category_code="[% patron_attribute.category_code | html %]">
1063 <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1064 [% IF ( patron_attribute.use_dropdown ) %]
1065 <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">
1066 <option value=""></option>
1067 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1068 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1069 <option value="[% auth_val_loo.authorised_value | html %]" selected="selected">
1070 [% auth_val_loo.lib | html %]
1073 <option value="[% auth_val_loo.authorised_value | html %]" >
1074 [% auth_val_loo.lib | html %]
1080 <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1082 <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1083 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1084 [% IF ( patron_attribute.repeatable ) %]
1085 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1090 [% IF pa_loo.class %]</fieldset>[% END %]
1093 [% END %][% END %][% END %]
1095 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1096 <fieldset class="rows" id="memberentry_messaging_prefs">
1097 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1099 <!-- handle changing prefs if creating new patron and changing
1102 <script type="text/javascript">//<![CDATA[
1103 $(document).ready(function(){
1104 var message_prefs_dirty = false;
1105 $('#memberentry_messaging_prefs > *').change(function() {
1106 message_prefs_dirty = true;
1108 $('#categorycode_entry').change(function() {
1109 var categorycode = $(this).val();
1110 if (message_prefs_dirty) {
1111 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1115 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1117 $.each(data.messaging_preferences, function(i, item) {
1118 var attrid = item.message_attribute_id;
1119 var transports = ['email', 'rss', 'sms'];
1120 $.each(transports, function(j, transport) {
1121 if (item['transports_' + transport] == 1) {
1122 $('#' + transport + attrid).prop('checked', true);
1124 $('#' + transport + attrid).prop('checked', false);
1127 if (item.digest && item.digest != ' ') {
1128 $('#digest' + attrid).prop('checked', true);
1130 $('#digest' + attrid).prop('checked', false);
1132 if (item.takes_days == '1') {
1133 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1136 message_prefs_dirty = false;
1144 <input type="hidden" name="setting_messaging_prefs" value="1" />
1145 [% INCLUDE 'messaging-preference-form.inc' %]
1146 [% IF ( SMSSendDriver ) %]
1147 <p><label for="SMSnumber">SMS number:</label>
1148 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" />
1150 [% UNLESS nosms_provider_id %]
1152 <label for="sms_provider_id">SMS provider:</label>
1153 <select id="sms_provider_id" name="sms_provider_id"/>
1154 <option value="">Unknown</option>
1155 [% FOREACH s IN sms_providers %]
1156 [% IF s.id == sms_provider_id %]
1157 <option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
1159 <option value="[% s.id | html %]">[% s.name | html %]</option>
1171 [% IF quickadd && opadd && !check_member %]
1172 <form id="quick_add_form" class="toggler">
1173 <fieldset class="rows quick_add"><legend>Quick add</legend>
1174 <ol id="quick_add_list">
1182 [% UNLESS ( opadd ) %]<div class="yui-b">
1183 [% INCLUDE 'members-menu.inc' %]
1188 [% MACRO jsinclude BLOCK %]
1189 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
1190 [% INCLUDE 'calendar.inc' %]
1191 [% INCLUDE 'str/members-menu.inc' %]
1192 [% Asset.js("js/members-menu.js") | $raw %]
1193 <script type="text/javascript">
1194 $(document).ready(function() {
1196 $("#saverecord").css({ 'margin-left': 0 });
1197 var original_offset = $("#toolbar").position().top;
1198 var additional_height = $("#filters").height();
1199 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1200 $("#filteraction_on").on("click", function(){
1201 $(window).off('scroll');
1202 $("#toolbar").css({ top: original_offset + additional_height });
1203 $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
1205 $("#filteraction_off").on("click", function(){
1206 $(window).off('scroll');
1207 $("#toolbar").css({ top: original_offset });
1208 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1211 [% IF categorycode %]
1212 update_category_code( "[% categorycode | html %]" );
1214 if ( $("#categorycode_entry").length > 0 ){
1215 var category_code = $("#categorycode_entry").find("option:selected").val();
1216 update_category_code( category_code );
1221 function update_cardnumber_warning(size){
1222 var max_len = [% maxlength_cardnumber | html %];
1223 if ( size >= max_len ) {
1224 $("#cn_max").show();
1226 $("#cn_max").hide();
1230 $(document).ready(function() {
1231 $("#cn_max").hide();
1233 $("#cardnumber").on("keydown", function(e){
1234 content = $(this).val();
1236 $("#cardnumber").on("keyup", function(e){
1237 // .val() will return the value of the input after the key has been released
1238 var l = $(this).val().length;
1239 if ( l == content.length + 1 ) { l--; }
1240 update_cardnumber_warning(l);
1242 $("#cardnumber").bind("paste", function(e){
1243 var pastedData = e.originalEvent.clipboardData.getData('text');
1244 update_cardnumber_warning(pastedData.length - 1);
1246 var toggle_quick_add = $(".toggle_quick_add");
1247 $(toggle_quick_add).click(function(e){
1248 toggle_quick_add.toggle();
1251 var toggle_from = '';
1252 if( $("#entryform:visible").length ) {
1253 toggle_to = "#quick_add_form label";
1254 toggle_from = "#entryform label";
1256 toggle_to="#entryform label";
1257 toggle_from = "#quick_add_form label";
1259 $(toggle_from).each(function() {
1260 var input_label = $(this).attr('for');
1261 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1262 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1265 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1268 $(".toggler").toggle();
1271 $("#save_quick_add").click(function(){
1272 $("#quick_add_form").validate();
1273 if( $("#quick_add_form").valid()){
1274 $('.toggle_quick_add').click();
1275 $('#saverecord').click();
1277 else {return false;}
1280 $("#saverecord").click(function(){
1281 if( check_form_borrowers() ){
1282 $("#entryform").submit();
1286 $('#duplicate').on('click', function() {
1287 $("input[name='op']").val('modify');
1288 $("input[name='borrowernumber']").val('[% check_member | html %]');
1289 $("input[name='check_member']").val('');
1290 $('#entryform').submit();
1293 $('#not-duplicate').on('click', function() {
1294 $("input[name='nodouble']").val('1');
1295 $('#entryform').submit();
1299 var MSG_SEPARATOR = _("Separator must be / in field %s");
1300 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1301 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1302 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1303 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1304 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1305 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1306 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1307 var MSG_MONTH = _("%s month")
1308 var MSG_MONTHS = _("%s months")
1309 var MSG_YEAR = _("%s year")
1310 var MSG_YEARS = _("%s years")
1311 var LABEL_CHANGE = _("Change");
1312 var LABEL_SET_TO_PATRON = _("Set to patron");
1313 var LABEL_AGE = _("Age");
1315 [% IF quickadd && opadd && !check_member %]
1316 $(document).ready(function () {
1318 $("#entryform,#saverecord").hide();
1319 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') | html %]
1320 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]];
1321 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1322 $("#entryform label").each(function () {
1323 var input_label = $(this).attr('for');
1324 if ( input_label == 'sex-female' ) {
1327 else if ( input_label == 'btitle' ) {
1328 input_label='title';
1330 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1331 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1332 $(this).parent().clone().appendTo("#quick_add_list");
1333 [% UNLESS mandatorypassword %]
1334 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1338 if( $("#memberentry_guarantor").length ) {
1339 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1340 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1341 $("#quick_add_list #guarantordelete").prop('id','qagd');
1343 $("#qagd").click(function() { $("#guarantordelete").click(); });
1344 $("#quick_add_form").show();
1349 [% Asset.js("js/members.js") | $raw %]
1350 [% Asset.js("js/messaging-preference-form.js") | $raw %]
1353 [% INCLUDE 'intranet-bottom.inc' %]
1354 [% PROCESS 'password_check.inc' %]
1355 [% PROCESS 'add_password_check' new_password => 'password' %]