6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Patrons ›
8 [% UNLESS blocking_error %]
10 [% ELSIF ( opduplicate ) %]Duplicate
13 [% IF (firstname) %][% firstname %] [% END %]
14 [% IF (surname) %][% surname %] [% END %]
15 ([%IF categoryname %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])
18 [% INCLUDE 'doc-head-close.inc' %]
21 <body id="pat_memberentrygen" class="pat">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'patron-search.inc' %]
25 <div id="breadcrumbs">
26 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
27 [% UNLESS blocking_error %]
28 ›[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% END %]</a> ›[% END %]
29 <strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong>
32 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
37 [% INCLUDE 'blocking_errors.inc' %]
39 [% IF ( error_alert == "no_email" ) %]
40 <div class="error">This member has no email</div>
42 <div class="error">[% error_alert %]</div>
46 <div class="dialog message">Email has been sent.</div>
49 [% INCLUDE 'noadd-warnings.inc' %]
51 [% UNLESS ( no_add ) %]
52 <h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname | html %] [% END %][% IF (surname) %][% surname | html %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1>
54 [% IF quickadd && opadd && !check_member %]
55 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
56 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
59 [% IF ( check_member ) %]
60 <div class="dialog alert">
61 <h3>Duplicate patron record?</h3>
62 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
63 <button id="duplicate" type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
64 Edit existing record</button>
66 <button type="submit" id="not-duplicate" class="new"><i class="fa fa-plus"></i> Not a duplicate.
67 Save as new record</button>
72 <div class="dialog alert">
73 <p>The following fields are wrong. Please fix them.</p>
75 [% IF ( ERROR_login_exist ) %]
76 <li id="ERROR_login_exist">Username/password already exists.</li>
78 [% IF ERROR_cardnumber_already_exists %]
79 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
81 [% IF ERROR_cardnumber_length %]
82 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
84 [% IF ( ERROR_age_limitations ) %]
85 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
86 Ages allowed are [% age_low %]-[% age_high %].</li>
88 [% IF ( ERROR_branch ) %]
89 <li id="ERROR_branch">Library is invalid.</li>
91 [% IF ( ERROR_dateofbirth ) %]
92 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
94 [% IF ( ERROR_dateenrolled ) %]
95 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
97 [% IF ( ERROR_dateexpiry ) %]
98 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
100 [% IF ( ERROR_password_too_short ) %]
101 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
103 [% IF ( ERROR_password_too_weak ) %]
104 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
106 [% IF ( ERROR_password_has_whitespaces ) %]
107 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
109 [% IF ( ERROR_password_mismatch ) %]
110 <li id="ERROR_password_mismatch">Passwords do not match.</li>
112 [% IF ( ERROR_extended_unique_id_failed ) %]
113 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value %]" is already in use by another patron record.</li>
115 [% IF ERROR_bad_email %]
116 <li id="ERROR_bad_email">The primary email is invalid.</li>
118 [% IF ERROR_bad_email_secondary %]
119 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
121 [% IF ERROR_bad_email_alternative %]
122 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
129 <div id="toolbar" class="btn-toolbar">
130 [% UNLESS ( check_member ) %]
131 [% IF quickadd && opadd %]
132 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
134 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
136 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
138 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
140 <i class="fa fa-times"></i> Cancel
145 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
146 [% UNLESS ( check_member ) %]
147 <input type="hidden" name="nodouble" value="[% nodouble %]" />
149 <!-- field always hidden in different form (1,2,3) -->
150 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
151 <input type="hidden" name="category_type" value="[% category_type %]" />
152 <input type="hidden" name="updtype" value="[% updtype %]" />
153 <input type="hidden" name="destination" value="[% destination %]" />
154 <input type="hidden" name="check_member" value="[% check_member %]" />
155 <input type="hidden" name="borrowernumber" value="[% borrowernumber UNLESS opduplicate %]" />
156 <input type="hidden" name="nodouble" value="[% nodouble UNLESS opduplicate %]" />
157 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
158 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
159 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
160 [% ELSIF ( opduplicate ) %]
161 <input type="hidden" name="op" value="insert" />
163 <input type="hidden" name="op" value="save" />
164 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
165 [%# Only put the cardnumber if we arent showing it in the form later %]
167 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
173 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
174 <fieldset class="rows" id="memberentry_identity">
175 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
179 [% IF Koha.Preference('BorrowersTitles') %]
181 [% IF ( mandatorytitle ) %]
182 <label for="btitle" class="required">
187 <select id="btitle" name="title">
188 <option value=""></option>
189 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
191 <option value="[% t %]" selected="selected">[% t %]</option>
193 <option value="[% t %]">[% t %]</option>
197 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
202 [% UNLESS nosurname %]
206 <label for="surname" class="required">
210 [% IF ( mandatorysurname ) %]
211 <label for="surname" class="required">
213 <label for="surname">
218 [% IF ( uppercasesurnames ) %]
219 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
221 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
223 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
227 [% UNLESS nofirstname %]
229 [% IF ( mandatoryfirstname ) %]
230 <label for="firstname" class="required">
232 <label for="firstname">
235 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
236 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
239 [% UNLESS nodateofbirth %]
241 [% IF ( mandatorydateofbirth ) %]
242 <label for="dateofbirth" class="required">
244 <label for="dateofbirth">
246 Date of birth: </label>
248 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth UNLESS opduplicate %]" class="datepicker" />
250 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
251 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
252 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
255 [% UNLESS noinitials %]
257 [% IF ( mandatoryinitials ) %]
258 <label for="initials" class="required">
260 <label for="initials">
263 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
264 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
268 [% UNLESS noothernames %]
270 [% IF ( mandatoryothernames ) %]
271 <label for="othernames" class="required">
273 <label for="othernames">
276 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
277 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
278 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
285 [% UNLESS ( opduplicate ) %]
287 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
289 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
292 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
294 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
297 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
299 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
302 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
303 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
304 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
312 [% END # hide fieldset %]
314 [% IF ( showguarantor ) %]
315 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
317 <input type="hidden" name="branchcode" value="[% branchcode %]" />
319 <fieldset id="memberentry_guarantor" class="rows">
320 <legend id="guarantor_lgd">Guarantor information</legend>
323 [% IF ( guarantorid ) %]
324 <li id="contact-details">
326 <li id="contact-details" style="display: none">
328 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
331 <label for="contactname">Organization name: </label>
332 [% IF ( guarantorid ) %]
333 <span>[% contactname %]</span>
334 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
336 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
341 [% IF ( guarantorid ) %]
342 <li id="contact-details">
344 <li id="contact-details" style="display: none">
346 <span class="label">Patron #:</span>
348 [% IF logged_in_user.can_see_patron_infos( guarantor ) %]
349 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid | html %]</a>
351 [% guarantorid | html %]
355 [% UNLESS nocontactname %]
357 <label for="contactname">Surname: </label>
358 [% IF ( guarantorid ) %]
359 <span>[% contactname %]</span>
360 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
362 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
366 [% UNLESS nocontactfirstname %]
368 <label for="contactfirstname">First name: </label>
369 [% IF ( guarantorid ) %]
370 <span>[% contactfirstname %]</span>
371 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
373 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
377 [% IF ( relshiploop ) %]
379 <label for="relationship">Relationship: </label>
380 <select name="relationship" id="relationship" >
381 [% FOREACH relshiploo IN relshiploop %]
382 [% IF ( relshiploo.selected ) %]
383 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
385 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
394 <span class="label"> </span>
395 [% IF ( guarantorid ) %]
396 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
398 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
400 <input id="guarantordelete" type="button" value="Delete" />
402 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
404 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
405 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
406 [% IF privacy_guarantor_checkouts %]
407 <option value="0">No</option>
408 <option value="1" selected>Yes</option>
410 <option value="0" selected>No</option>
411 <option value="1">Yes</option>
414 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
421 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
422 [% IF Koha.Preference( 'AddressFormat' ) %]
423 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
425 [% INCLUDE 'member-main-address-style-us.inc' %]
427 [% END # nostreet && nocity etc group%]
429 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
430 <fieldset class="rows" id="memberentry_contact">
431 <legend id="contact_lgd">Contact</legend><ol>
434 [% IF ( mandatoryphone ) %]
435 <label for="phone" class="required">
439 Primary phone: </label>
440 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
441 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
445 [% UNLESS nophonepro %]
447 [% IF ( mandatoryphonepro ) %]
448 <label for="phonepro" class="required">
450 <label for="phonepro">
452 Secondary phone: </label>
453 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
454 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
457 [% UNLESS nomobile %]
459 [% IF ( mandatorymobile ) %]
460 <label for="mobile" class="required">
464 Other phone: </label>
465 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
466 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
471 [% IF ( mandatoryemail ) %]
472 <label for="email" class="required">
476 Primary email: </label>
477 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
478 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
482 [% UNLESS noemailpro %]
484 [% IF ( mandatoryemailpro ) %]
485 <label for="emailpro" class="required">
487 <label for="emailpro">
489 Secondary email: </label>
490 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
491 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
496 [% IF ( mandatoryfax ) %]
497 <label for="fax" class="required">
502 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
503 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
508 [%END # hide fieldset %]
510 <!-- ************************ STEP_1 *********************** -->
514 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
515 [% IF Koha.Preference( 'AddressFormat' ) %]
516 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
518 [% INCLUDE 'member-alt-address-style-us.inc' %]
520 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
523 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
524 [% IF Koha.Preference( 'AddressFormat' ) %]
525 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
527 [% INCLUDE 'member-alt-contact-style-us.inc' %]
529 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
534 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
535 <fieldset class="rows" id="memberentry_library_management">
536 <legend id="library_management_lgd">Library management</legend><ol>
537 [% UNLESS nocardnumber %]
539 [% IF mandatorycardnumber %]
540 <label for="cardnumber" class="required">
542 <label for="cardnumber" class="validated">
544 Card number: </label>
546 <!-- NOTE: div.hint closing tag isn't on the same line -->
547 [% IF minlength_cardnumber == maxlength_cardnumber %]
548 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
549 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span>
550 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.
551 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
552 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
553 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span>
554 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.
555 [% ELSIF maxlength_cardnumber %]
556 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
557 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span>
558 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.
560 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
561 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]
562 <div class="hint">There is no minimum or maximum character length.
564 [% IF autoMemberNum %]
565 [% IF mandatorycardnumber %]
566 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
568 <br/>Leave blank for auto calc during registration
571 </div><!--/hint div -->
574 [% UNLESS nobranchcode %]
576 <label for="libraries" class="required">Library:</label>
577 <select name="branchcode" size="1" id="libraries">
578 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
580 <span class="required">Required</span>
584 <label for="categorycode_entry" class="required">Category: </label>
585 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
586 [% FOREACH typeloo IN typeloop %]
587 [% FOREACH categoryloo IN typeloo.categoryloop %]
588 [% IF ( loop.first ) %]
589 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
590 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
591 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
592 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
593 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
594 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
596 [% IF ( categoryloo.categorycodeselected ) %]
597 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
599 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
601 [% IF ( loop.last ) %]
607 <span class="required">Required</span>
611 [% IF ( mandatorysort1 ) %]
612 <label for="sort1" class="required">
617 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
618 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
623 [% IF ( mandatorysort2 ) %]
624 <label for="sort2" class="required">
629 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
630 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
633 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
635 <label for="sort2">Sync with the Norwegian national patron database:</label>
636 [% IF ( sync == 0 ) %]
637 <input type="radio" id="sync" name="sync" value="1"> Yes
638 <input type="radio" id="sync" name="sync" value="0" checked> No
640 <input type="radio" id="sync" name="sync" value="1" checked> Yes
641 <input type="radio" id="sync" name="sync" value="0"> No
645 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
646 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
647 <select name="checkprevcheckout" id="checkprevcheckout">
648 [% IF ( checkprevcheckout == 'yes' ) %]
649 <option value="yes" selected="selected">Yes if settings allow it</option>
650 <option value="no">No if settings allow it</option>
651 <option value="inherit">Inherit from settings</option>
652 [% ELSIF ( checkprevcheckout == 'no' ) %]
653 <option value="yes">Yes if settings allow it</option>
654 <option value="no" selected="selected">No if settings allow it</option>
655 <option value="inherit">Inherit from settings</option>
657 <option value="yes">Yes if settings allow it</option>
658 <option value="no">No if settings allow it</option>
659 <option value="inherit" selected="selected">Inherit from settings</option>
664 [% IF Koha.Preference('TranslateNotices') %]
666 <label for="lang">Preferred language for notices: </label>
667 <select id="lang" name="lang">
668 <option value="default">Default</option>
669 [% FOR language IN languages %]
670 [% FOR sublanguage IN language.sublanguages_loop %]
671 [% IF language.plural %]
672 [% IF sublanguage.rfc4646_subtag == lang %]
673 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
675 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
678 [% IF sublanguage.rfc4646_subtag == lang %]
679 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
681 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
691 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
692 <fieldset class="rows" id="memberentry_subscription">
693 <legend id="library_setup_lgd">Library set-up</legend><ol>
694 [% UNLESS nodateenrolled %]
696 [% IF ( mandatorydateenrolled ) %]
697 <label for="from" class="required">
701 Registration date: </label>
702 [% IF ( dateformat == "metric" ) %]
703 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
705 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
707 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
708 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
709 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
712 [% UNLESS nodateexpiry %]
715 <li style="display:none">
717 [% IF ( mandatorydateexpiry ) %]
718 <label for="to" class="required">
722 Expiry date (leave blank for auto calc): </label>
723 [% IF ( dateformat == "metric" ) %]
724 [% UNLESS ( opadd ) %]
725 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
727 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
730 [% UNLESS ( opadd ) %]
731 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
733 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
736 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
737 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
738 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
740 [% UNLESS noopacnote %]
742 [% IF ( mandatoryopacnote ) %]
743 <label for="opacnote" class="required">
745 <label for="opacnote">
748 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
749 <div class="hint">This message appears on this patron's user page in the OPAC</div>
750 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
753 [% UNLESS noborrowernotes %]
755 [% IF ( mandatoryborrowernotes ) %]
756 <label for="borrowernotes" class="required">
758 <label for="borrowernotes">
760 Circulation note: </label>
761 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
762 <div class="hint">This message displays when checking out to this patron</div>
763 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
768 [% END # hide fieldset %]
770 [% UNLESS nouserid && nopassword %]
771 <fieldset class="rows" id="memberentry_userid">
772 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
773 [% UNLESS nouserid %]
775 [% IF ( mandatoryuserid ) %]
776 <label for="userid" class="required">
782 [% IF ( NoUpdateLogin ) %]
783 [% IF ( opduplicate ) %]
784 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
786 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
789 [% IF ( opduplicate ) %]
790 <input type="text" id="userid" name="userid" size="20" value="" />
792 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
796 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
797 <input type="text" disabled="disabled" style="display:none" />
799 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
802 [% UNLESS nopassword %]
804 [% IF ( mandatorypassword ) %]
805 <label for="password" class="required">
807 <label for="password">
811 [% IF ( NoUpdateLogin ) %]
812 [% IF ( opduplicate ) %]
813 <input type="password" id="password" name="password" size="20" disabled="disabled" />
815 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
818 [% IF ( opduplicate ) %]
819 <input type="password" id="password" name="password" size="20" />
821 <input type="password" id="password" name="password" size="20" value="[% password %]" />
825 [% IF ( password ) %]
826 [% IF ( NoUpdateLogin ) %]
827 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
829 [% IF ( opduplicate ) %]
830 <input type="password" id="password" name="password" size="20" />
832 <input type="password" id="password" name="password" size="20" value="****" />
836 [% IF ( NoUpdateLogin ) %]
837 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
839 <input type="password" id="password" name="password" size="20" value="" />
843 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
844 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
845 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
846 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
847 <div class="hint">Minimum password length: [% minPasswordLength %]</div>
850 [% IF ( mandatorypassword ) %]
851 <label for="password2" class="required">
853 <label for="password2">
855 Confirm password: </label>
857 [% IF ( NoUpdateLogin ) %]
858 [% IF ( opduplicate ) %]
859 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
861 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
864 [% IF ( opduplicate ) %]
865 <input type="password" id="password2" name="password2" size="20" />
867 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
871 [% IF ( password ) %]
872 [% IF ( NoUpdateLogin ) %]
873 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
875 [% IF ( opduplicate ) %]
876 <input type="password" id="password2" name="password2" size="20" />
878 <input type="password" id="password2" name="password2" size="20" value="****" />
882 [% IF ( NoUpdateLogin ) %]
883 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
885 <input type="password" id="password2" name="password2" size="20" value="" />
889 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
893 [% END # hide fieldset %][% END %]
894 <!--this zones are not necessary in modif mode -->
895 [% UNLESS ( opadd || opduplicate ) %]
896 <fieldset class="rows" id="memberentry_account_flags">
897 <legend id="account_flags_lgd">Patron account flags</legend>
899 [% FOREACH flagloo IN flagloop %]
900 <li><label class="radio" for="yes[% flagloo.name %]">
901 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
902 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
904 [% IF CAN_user_circulate_manage_restrictions %]
905 <label for="yes[% flagloo.name %]">
906 [% IF ( flagloo.yes ) %]
907 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
909 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
912 <label for="no[% flagloo.name %]">
913 [% IF ( flagloo.no ) %]
914 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
916 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
920 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
929 <fieldset class="rows" id="memberentry_restrictions">
930 <legend id="restrictions_lgd">Patron restrictions</legend>
932 [% IF ( debarments ) %]
940 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
947 [% FOREACH d IN debarments %]
949 <td>[% d.type %]</td>
951 [% IF d.comment.search('OVERDUES_PROCESS') %]
952 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
957 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
958 <td>[% d.created | $KohaDates %]</td>
959 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
961 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
969 <p>Patron is currently unrestricted.</p>
972 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
973 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
974 <fieldset id="manual_restriction_form">
975 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
976 <legend id="manual_restriction_lgd">Add manual restriction</legend>
978 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
979 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
980 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
984 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
994 [% IF Koha.Preference('HouseboundModule') %]
995 <fieldset class="rows" id="memberentry_housebound_roles">
996 <legend id="housebound_roles">Housebound roles</legend>
999 <label class="radio" for="housebound_chooser">
1002 [% IF ( housebound_role.housebound_chooser == 1 ) %]
1003 <label for="yes_housebound_chooser">Yes </label>
1004 <input type="radio" id="yes_housebound_chooser"
1005 name="housebound_chooser" value="1"
1006 checked="checked" />
1007 <label for="no_housebound_chooser">No </label>
1008 <input type="radio" id="no_housebound_chooser"
1009 name="housebound_chooser" value="0" />
1011 <label for="yes_housebound_chooser">Yes </label>
1012 <input type="radio" id="yes_housebound_chooser"
1013 name="housebound_chooser" value="1" />
1014 <label for="no_housebound_chooser">No </label>
1015 <input type="radio" id="no_housebound_chooser"
1016 name="housebound_chooser" value="0"
1017 checked="checked" />
1021 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1022 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1023 <label for="yes_housebound_deliverer">Yes </label>
1024 <input type="radio" id="yes_housebound_deliverer"
1025 name="housebound_deliverer" value="1"
1026 checked="checked" />
1027 <label for="no_housebound_deliverer">No </label>
1028 <input type="radio" id="no_housebound_deliverer"
1029 name="housebound_deliverer" value="0" />
1031 <label for="yes_housebound_deliverer">Yes </label>
1032 <input type="radio" id="yes_housebound_deliverer"
1033 name="housebound_deliverer" value="1" />
1034 <label for="no_housebound_deliverer">No </label>
1035 <input type="radio" id="no_housebound_deliverer"
1036 name="housebound_deliverer" value="0"
1037 checked="checked" />
1042 [% END # hide fieldset %]
1043 [% END # IF step_7 %]
1046 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1047 <fieldset class="rows" id="memberentry_patron_attributes">
1048 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1049 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1050 [% FOREACH pa_loo IN patron_attributes %]
1051 [% IF pa_loo.class %]
1052 <fieldset id="aai_[% pa_loo.class %]">
1053 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1055 <ol class="attributes_table">
1056 [% FOREACH patron_attribute IN pa_loo.items %]
1057 <li data-category_code="[% patron_attribute.category_code %]">
1058 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1059 [% IF ( patron_attribute.use_dropdown ) %]
1060 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1061 <option value=""></option>
1062 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1063 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1064 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1065 [% auth_val_loo.lib %]
1068 <option value="[% auth_val_loo.authorised_value %]" >
1069 [% auth_val_loo.lib %]
1075 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1077 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1078 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1079 [% IF ( patron_attribute.repeatable ) %]
1080 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1085 [% IF pa_loo.class %]</fieldset>[% END %]
1088 [% END %][% END %][% END %]
1090 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1091 <fieldset class="rows" id="memberentry_messaging_prefs">
1092 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1094 <!-- handle changing prefs if creating new patron and changing
1097 <script type="text/javascript">//<![CDATA[
1098 $(document).ready(function(){
1099 var message_prefs_dirty = false;
1100 $('#memberentry_messaging_prefs > *').change(function() {
1101 message_prefs_dirty = true;
1103 $('#categorycode_entry').change(function() {
1104 var categorycode = $(this).val();
1105 if (message_prefs_dirty) {
1106 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1110 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1112 $.each(data.messaging_preferences, function(i, item) {
1113 var attrid = item.message_attribute_id;
1114 var transports = ['email', 'rss', 'sms'];
1115 $.each(transports, function(j, transport) {
1116 if (item['transports_' + transport] == 1) {
1117 $('#' + transport + attrid).prop('checked', true);
1119 $('#' + transport + attrid).prop('checked', false);
1122 if (item.digest && item.digest != ' ') {
1123 $('#digest' + attrid).prop('checked', true);
1125 $('#digest' + attrid).prop('checked', false);
1127 if (item.takes_days == '1') {
1128 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1131 message_prefs_dirty = false;
1139 <input type="hidden" name="setting_messaging_prefs" value="1" />
1140 [% INCLUDE 'messaging-preference-form.inc' %]
1141 [% IF ( SMSSendDriver ) %]
1142 <p><label for="SMSnumber">SMS number:</label>
1143 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1145 [% UNLESS nosms_provider_id %]
1147 <label for="sms_provider_id">SMS provider:</label>
1148 <select id="sms_provider_id" name="sms_provider_id"/>
1149 <option value="">Unknown</option>
1150 [% FOREACH s IN sms_providers %]
1151 [% IF s.id == sms_provider_id %]
1152 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1154 <option value="[% s.id %]">[% s.name %]</option>
1166 [% IF quickadd && opadd && !check_member %]
1167 <form id="quick_add_form" class="toggler">
1168 <fieldset class="rows quick_add"><legend>Quick add</legend>
1169 <ol id="quick_add_list">
1177 [% UNLESS ( opadd ) %]<div class="yui-b">
1178 [% INCLUDE 'members-menu.inc' %]
1183 [% MACRO jsinclude BLOCK %]
1184 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
1185 [% INCLUDE 'calendar.inc' %]
1186 [% INCLUDE 'str/members-menu.inc' %]
1187 [% Asset.js("js/members-menu.js") %]
1188 <script type="text/javascript">
1189 $(document).ready(function() {
1191 $("#saverecord").css({ 'margin-left': 0 });
1192 var original_offset = $("#toolbar").position().top;
1193 var additional_height = $("#filters").height();
1194 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1195 $("#filteraction_on").on("click", function(){
1196 $(window).off('scroll');
1197 $("#toolbar").css({ top: original_offset + additional_height });
1198 $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
1200 $("#filteraction_off").on("click", function(){
1201 $(window).off('scroll');
1202 $("#toolbar").css({ top: original_offset });
1203 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1206 [% IF categorycode %]
1207 update_category_code( "[% categorycode %]" );
1209 if ( $("#categorycode_entry").length > 0 ){
1210 var category_code = $("#categorycode_entry").find("option:selected").val();
1211 update_category_code( category_code );
1216 function update_cardnumber_warning(size){
1217 var max_len = [% maxlength_cardnumber %];
1218 if ( size >= max_len ) {
1219 $("#cn_max").show();
1221 $("#cn_max").hide();
1225 $(document).ready(function() {
1226 $("#cn_max").hide();
1228 $("#cardnumber").on("keydown", function(e){
1229 content = $(this).val();
1231 $("#cardnumber").on("keyup", function(e){
1232 // .val() will return the value of the input after the key has been released
1233 var l = $(this).val().length;
1234 if ( l == content.length + 1 ) { l--; }
1235 update_cardnumber_warning(l);
1237 $("#cardnumber").bind("paste", function(e){
1238 var pastedData = e.originalEvent.clipboardData.getData('text');
1239 update_cardnumber_warning(pastedData.length - 1);
1241 var toggle_quick_add = $(".toggle_quick_add");
1242 $(toggle_quick_add).click(function(e){
1243 toggle_quick_add.toggle();
1246 var toggle_from = '';
1247 if( $("#entryform:visible").length ) {
1248 toggle_to = "#quick_add_form label";
1249 toggle_from = "#entryform label";
1251 toggle_to="#entryform label";
1252 toggle_from = "#quick_add_form label";
1254 $(toggle_from).each(function() {
1255 var input_label = $(this).attr('for');
1256 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1257 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1260 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1263 $(".toggler").toggle();
1266 $("#save_quick_add").click(function(){
1267 $("#quick_add_form").validate();
1268 if( $("#quick_add_form").valid()){
1269 $('.toggle_quick_add').click();
1270 $('#saverecord').click();
1272 else {return false;}
1275 $("#saverecord").click(function(){
1276 if( check_form_borrowers() ){
1277 $("#entryform").submit();
1281 $('#duplicate').on('click', function() {
1282 $("input[name='op']").val('modify');
1283 $("input[name='borrowernumber']").val('[% check_member %]');
1284 $("input[name='check_member']").val('');
1285 $('#entryform').submit();
1288 $('#not-duplicate').on('click', function() {
1289 $("input[name='nodouble']").val('1');
1290 $('#entryform').submit();
1294 var MSG_SEPARATOR = _("Separator must be / in field %s");
1295 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1296 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1297 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1298 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1299 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1300 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1301 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1302 var MSG_MONTH = _("%s month")
1303 var MSG_MONTHS = _("%s months")
1304 var MSG_YEAR = _("%s year")
1305 var MSG_YEARS = _("%s years")
1306 var LABEL_CHANGE = _("Change");
1307 var LABEL_SET_TO_PATRON = _("Set to patron");
1308 var LABEL_AGE = _("Age");
1310 [% IF quickadd && opadd && !check_member %]
1311 $(document).ready(function () {
1313 $("#entryform,#saverecord").hide();
1314 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1315 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1316 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1317 $("#entryform label").each(function () {
1318 var input_label = $(this).attr('for');
1319 if ( input_label == 'sex-female' ) {
1322 else if ( input_label == 'btitle' ) {
1323 input_label='title';
1325 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1326 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1327 $(this).parent().clone().appendTo("#quick_add_list");
1328 [% UNLESS mandatorypassword %]
1329 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1333 if( $("#memberentry_guarantor").length ) {
1334 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1335 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1336 $("#quick_add_list #guarantordelete").prop('id','qagd');
1338 $("#qagd").click(function() { $("#guarantordelete").click(); });
1339 $("#quick_add_form").show();
1344 [% Asset.js("js/members.js") %]
1345 [% Asset.js("js/messaging-preference-form.js") %]
1348 [% INCLUDE 'intranet-bottom.inc' %]
1349 [% PROCESS 'password_check.inc' %]
1350 [% PROCESS 'add_password_check' new_password => 'password' %]