6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% 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 %])</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="pat_memberentrygen" class="pat">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'patron-search.inc' %]
15 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
16 [% 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 %]
17 <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>
19 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
25 [% IF ( error_alert == "no_email" ) %]
26 <div class="error">This member has no email</div>
28 <div class="error">[% error_alert %]</div>
32 <div class="dialog message">Email has been sent.</div>
35 [% INCLUDE 'noadd-warnings.inc' %]
37 [% UNLESS ( no_add ) %]
38 <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>
40 [% IF quickadd && opadd && !check_member %]
41 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
42 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
45 [% IF ( check_member ) %]
46 <div class="dialog alert">
47 <h3>Duplicate patron record?</h3>
48 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
49 <button id="duplicate" type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
50 Edit existing record</button>
52 <button type="submit" id="not-duplicate" class="new"><i class="fa fa-plus"></i> Not a duplicate.
53 Save as new record</button>
58 <div class="dialog alert">
59 <p>The following fields are wrong. Please fix them.</p>
61 [% IF ( ERROR_login_exist ) %]
62 <li id="ERROR_login_exist">Username/password already exists.</li>
64 [% IF ERROR_cardnumber_already_exists %]
65 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
67 [% IF ERROR_cardnumber_length %]
68 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
70 [% IF ( ERROR_age_limitations ) %]
71 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
72 Ages allowed are [% age_low %]-[% age_high %].</li>
74 [% IF ( ERROR_branch ) %]
75 <li id="ERROR_branch">Library is invalid.</li>
77 [% IF ( ERROR_dateofbirth ) %]
78 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
80 [% IF ( ERROR_dateenrolled ) %]
81 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
83 [% IF ( ERROR_dateexpiry ) %]
84 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
86 [% IF ( ERROR_password_too_short ) %]
87 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
89 [% IF ( ERROR_password_too_weak ) %]
90 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
92 [% IF ( ERROR_password_has_whitespaces ) %]
93 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
95 [% IF ( ERROR_password_mismatch ) %]
96 <li id="ERROR_password_mismatch">Passwords do not match.</li>
98 [% IF ( ERROR_extended_unique_id_failed ) %]
99 <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>
101 [% IF ERROR_bad_email %]
102 <li id="ERROR_bad_email">The primary email is invalid.</li>
104 [% IF ERROR_bad_email_secondary %]
105 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
107 [% IF ERROR_bad_email_alternative %]
108 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
115 <div id="toolbar" class="btn-toolbar">
116 [% UNLESS ( check_member ) %]
117 [% IF quickadd && opadd %]
118 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
120 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
122 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
124 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
126 <i class="fa fa-times"></i> Cancel
131 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
132 [% UNLESS ( check_member ) %]
133 <input type="hidden" name="nodouble" value="[% nodouble %]" />
135 <!-- field always hidden in different form (1,2,3) -->
136 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
137 <input type="hidden" name="category_type" value="[% category_type %]" />
138 <input type="hidden" name="updtype" value="[% updtype %]" />
139 <input type="hidden" name="destination" value="[% destination %]" />
140 <input type="hidden" name="check_member" value="[% check_member %]" />
141 <input type="hidden" name="borrowernumber" value="[% borrowernumber UNLESS opduplicate %]" />
142 <input type="hidden" name="nodouble" value="[% nodouble UNLESS opduplicate %]" />
143 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
144 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
145 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
146 [% ELSIF ( opduplicate ) %]
147 <input type="hidden" name="op" value="insert" />
149 <input type="hidden" name="op" value="save" />
150 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %]
151 [%# Only put the cardnumber if we arent showing it in the form later %]
153 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
159 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
160 <fieldset class="rows" id="memberentry_identity">
161 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
165 [% IF Koha.Preference('BorrowersTitles') %]
167 [% IF ( mandatorytitle ) %]
168 <label for="btitle" class="required">
173 <select id="btitle" name="title">
174 <option value=""></option>
175 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
177 <option value="[% t %]" selected="selected">[% t %]</option>
179 <option value="[% t %]">[% t %]</option>
183 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
188 [% UNLESS nosurname %]
192 <label for="surname" class="required">
196 [% IF ( mandatorysurname ) %]
197 <label for="surname" class="required">
199 <label for="surname">
204 [% IF ( uppercasesurnames ) %]
205 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
207 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
209 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
213 [% UNLESS nofirstname %]
215 [% IF ( mandatoryfirstname ) %]
216 <label for="firstname" class="required">
218 <label for="firstname">
221 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
222 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
225 [% UNLESS nodateofbirth %]
227 [% IF ( mandatorydateofbirth ) %]
228 <label for="dateofbirth" class="required">
230 <label for="dateofbirth">
232 Date of birth: </label>
234 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth UNLESS opduplicate %]" class="datepicker" />
236 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
237 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
238 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
241 [% UNLESS noinitials %]
243 [% IF ( mandatoryinitials ) %]
244 <label for="initials" class="required">
246 <label for="initials">
249 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
250 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
254 [% UNLESS noothernames %]
256 [% IF ( mandatoryothernames ) %]
257 <label for="othernames" class="required">
259 <label for="othernames">
262 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
263 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
264 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
271 [% UNLESS ( opduplicate ) %]
273 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
275 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
278 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
280 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
283 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
285 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
288 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
289 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
290 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
298 [% END # hide fieldset %]
300 [% IF ( showguarantor ) %]
301 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
303 <input type="hidden" name="branchcode" value="[% branchcode %]" />
305 <fieldset id="memberentry_guarantor" class="rows">
306 <legend id="guarantor_lgd">Guarantor information</legend>
309 [% IF ( guarantorid ) %]
310 <li id="contact-details">
312 <li id="contact-details" style="display: none">
314 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
317 <label for="contactname">Organization name: </label>
318 [% IF ( guarantorid ) %]
319 <span>[% contactname %]</span>
320 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
322 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
327 [% IF ( guarantorid ) %]
328 <li id="contact-details">
330 <li id="contact-details" style="display: none">
332 <span class="label">Patron #:</span>
334 [% IF logged_in_user.can_see_patron_infos( guarantor ) %]
335 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid | html %]</a>
337 [% guarantorid | html %]
341 [% UNLESS nocontactname %]
343 <label for="contactname">Surname: </label>
344 [% IF ( guarantorid ) %]
345 <span>[% contactname %]</span>
346 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
348 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
352 [% UNLESS nocontactfirstname %]
354 <label for="contactfirstname">First name: </label>
355 [% IF ( guarantorid ) %]
356 <span>[% contactfirstname %]</span>
357 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
359 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
363 [% IF ( relshiploop ) %]
365 <label for="relationship">Relationship: </label>
366 <select name="relationship" id="relationship" >
367 [% FOREACH relshiploo IN relshiploop %]
368 [% IF ( relshiploo.selected ) %]
369 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
371 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
380 <span class="label"> </span>
381 [% IF ( guarantorid ) %]
382 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
384 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
386 <input id="guarantordelete" type="button" value="Delete" />
388 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
390 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
391 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
392 [% IF privacy_guarantor_checkouts %]
393 <option value="0">No</option>
394 <option value="1" selected>Yes</option>
396 <option value="0" selected>No</option>
397 <option value="1">Yes</option>
400 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
407 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
408 [% IF Koha.Preference( 'AddressFormat' ) %]
409 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
411 [% INCLUDE 'member-main-address-style-us.inc' %]
413 [% END # nostreet && nocity etc group%]
415 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
416 <fieldset class="rows" id="memberentry_contact">
417 <legend id="contact_lgd">Contact</legend><ol>
420 [% IF ( mandatoryphone ) %]
421 <label for="phone" class="required">
425 Primary phone: </label>
426 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
427 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
431 [% UNLESS nophonepro %]
433 [% IF ( mandatoryphonepro ) %]
434 <label for="phonepro" class="required">
436 <label for="phonepro">
438 Secondary phone: </label>
439 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
440 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
443 [% UNLESS nomobile %]
445 [% IF ( mandatorymobile ) %]
446 <label for="mobile" class="required">
450 Other phone: </label>
451 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
452 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
457 [% IF ( mandatoryemail ) %]
458 <label for="email" class="required">
462 Primary email: </label>
463 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
464 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
468 [% UNLESS noemailpro %]
470 [% IF ( mandatoryemailpro ) %]
471 <label for="emailpro" class="required">
473 <label for="emailpro">
475 Secondary email: </label>
476 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
477 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
482 [% IF ( mandatoryfax ) %]
483 <label for="fax" class="required">
488 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
489 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
494 [%END # hide fieldset %]
496 <!-- ************************ STEP_1 *********************** -->
500 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
501 [% IF Koha.Preference( 'AddressFormat' ) %]
502 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
504 [% INCLUDE 'member-alt-address-style-us.inc' %]
506 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
509 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
510 [% IF Koha.Preference( 'AddressFormat' ) %]
511 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
513 [% INCLUDE 'member-alt-contact-style-us.inc' %]
515 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
520 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
521 <fieldset class="rows" id="memberentry_library_management">
522 <legend id="library_management_lgd">Library management</legend><ol>
523 [% UNLESS nocardnumber %]
525 [% IF mandatorycardnumber %]
526 <label for="cardnumber" class="required">
528 <label for="cardnumber" class="validated">
530 Card number: </label>
532 <!-- NOTE: div.hint closing tag isn't on the same line -->
533 [% IF minlength_cardnumber == maxlength_cardnumber %]
534 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
535 [% 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>
536 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.
537 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
538 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
539 [% 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>
540 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.
541 [% ELSIF maxlength_cardnumber %]
542 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
543 [% 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>
544 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.
546 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
547 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]
548 <div class="hint">There is no minimum or maximum character length.
550 [% IF autoMemberNum %]
551 [% IF mandatorycardnumber %]
552 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
554 <br/>Leave blank for auto calc during registration
557 </div><!--/hint div -->
560 [% UNLESS nobranchcode %]
562 <label for="libraries" class="required">Library:</label>
563 <select name="branchcode" size="1" id="libraries">
564 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
566 <span class="required">Required</span>
570 <label for="categorycode_entry" class="required">Category: </label>
571 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
572 [% FOREACH typeloo IN typeloop %]
573 [% FOREACH categoryloo IN typeloo.categoryloop %]
574 [% IF ( loop.first ) %]
575 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
576 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
577 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
578 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
579 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
580 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
582 [% IF ( categoryloo.categorycodeselected ) %]
583 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
585 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
587 [% IF ( loop.last ) %]
593 <span class="required">Required</span>
597 [% IF ( mandatorysort1 ) %]
598 <label for="sort1" class="required">
603 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
604 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
609 [% IF ( mandatorysort2 ) %]
610 <label for="sort2" class="required">
615 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
616 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
619 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
621 <label for="sort2">Sync with the Norwegian national patron database:</label>
622 [% IF ( sync == 0 ) %]
623 <input type="radio" id="sync" name="sync" value="1"> Yes
624 <input type="radio" id="sync" name="sync" value="0" checked> No
626 <input type="radio" id="sync" name="sync" value="1" checked> Yes
627 <input type="radio" id="sync" name="sync" value="0"> No
631 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
632 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
633 <select name="checkprevcheckout" id="checkprevcheckout">
634 [% IF ( checkprevcheckout == 'yes' ) %]
635 <option value="yes" selected="selected">Yes if settings allow it</option>
636 <option value="no">No if settings allow it</option>
637 <option value="inherit">Inherit from settings</option>
638 [% ELSIF ( checkprevcheckout == 'no' ) %]
639 <option value="yes">Yes if settings allow it</option>
640 <option value="no" selected="selected">No if settings allow it</option>
641 <option value="inherit">Inherit from settings</option>
643 <option value="yes">Yes if settings allow it</option>
644 <option value="no">No if settings allow it</option>
645 <option value="inherit" selected="selected">Inherit from settings</option>
650 [% IF Koha.Preference('TranslateNotices') %]
652 <label for="lang">Preferred language for notices: </label>
653 <select id="lang" name="lang">
654 <option value="default">Default</option>
655 [% FOR language IN languages %]
656 [% FOR sublanguage IN language.sublanguages_loop %]
657 [% IF language.plural %]
658 [% IF sublanguage.rfc4646_subtag == lang %]
659 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
661 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
664 [% IF sublanguage.rfc4646_subtag == lang %]
665 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
667 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
677 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
678 <fieldset class="rows" id="memberentry_subscription">
679 <legend id="library_setup_lgd">Library set-up</legend><ol>
680 [% UNLESS nodateenrolled %]
682 [% IF ( mandatorydateenrolled ) %]
683 <label for="from" class="required">
687 Registration date: </label>
688 [% IF ( dateformat == "metric" ) %]
689 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
691 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
693 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
694 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
695 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
698 [% UNLESS nodateexpiry %]
701 <li style="display:none">
703 [% IF ( mandatorydateexpiry ) %]
704 <label for="to" class="required">
708 Expiry date (leave blank for auto calc): </label>
709 [% IF ( dateformat == "metric" ) %]
710 [% UNLESS ( opadd ) %]
711 <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" />
713 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
716 [% UNLESS ( opadd ) %]
717 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
719 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
722 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
723 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
724 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
726 [% UNLESS noopacnote %]
728 [% IF ( mandatoryopacnote ) %]
729 <label for="opacnote" class="required">
731 <label for="opacnote">
734 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
735 <div class="hint">This message appears on this patron's user page in the OPAC</div>
736 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
739 [% UNLESS noborrowernotes %]
741 [% IF ( mandatoryborrowernotes ) %]
742 <label for="borrowernotes" class="required">
744 <label for="borrowernotes">
746 Circulation note: </label>
747 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
748 <div class="hint">This message displays when checking out to this patron</div>
749 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
754 [% END # hide fieldset %]
756 [% UNLESS nouserid && nopassword %]
757 <fieldset class="rows" id="memberentry_userid">
758 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
759 [% UNLESS nouserid %]
761 [% IF ( mandatoryuserid ) %]
762 <label for="userid" class="required">
768 [% IF ( NoUpdateLogin ) %]
769 [% IF ( opduplicate ) %]
770 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
772 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
775 [% IF ( opduplicate ) %]
776 <input type="text" id="userid" name="userid" size="20" value="" />
778 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
782 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
783 <input type="text" disabled="disabled" style="display:none" />
785 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
788 [% UNLESS nopassword %]
790 [% IF ( mandatorypassword ) %]
791 <label for="password" class="required">
793 <label for="password">
797 [% IF ( NoUpdateLogin ) %]
798 [% IF ( opduplicate ) %]
799 <input type="password" id="password" name="password" size="20" disabled="disabled" />
801 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
804 [% IF ( opduplicate ) %]
805 <input type="password" id="password" name="password" size="20" />
807 <input type="password" id="password" name="password" size="20" value="[% password %]" />
811 [% IF ( password ) %]
812 [% IF ( NoUpdateLogin ) %]
813 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
815 [% IF ( opduplicate ) %]
816 <input type="password" id="password" name="password" size="20" />
818 <input type="password" id="password" name="password" size="20" value="****" />
822 [% IF ( NoUpdateLogin ) %]
823 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
825 <input type="password" id="password" name="password" size="20" value="" />
829 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
830 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
831 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
832 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
833 <div class="hint">Minimum password length: [% minPasswordLength %]</div>
836 [% IF ( mandatorypassword ) %]
837 <label for="password2" class="required">
839 <label for="password2">
841 Confirm password: </label>
843 [% IF ( NoUpdateLogin ) %]
844 [% IF ( opduplicate ) %]
845 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
847 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
850 [% IF ( opduplicate ) %]
851 <input type="password" id="password2" name="password2" size="20" />
853 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
857 [% IF ( password ) %]
858 [% IF ( NoUpdateLogin ) %]
859 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
861 [% IF ( opduplicate ) %]
862 <input type="password" id="password2" name="password2" size="20" />
864 <input type="password" id="password2" name="password2" size="20" value="****" />
868 [% IF ( NoUpdateLogin ) %]
869 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
871 <input type="password" id="password2" name="password2" size="20" value="" />
875 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
879 [% END # hide fieldset %][% END %]
880 <!--this zones are not necessary in modif mode -->
881 [% UNLESS ( opadd || opduplicate ) %]
882 <fieldset class="rows" id="memberentry_account_flags">
883 <legend id="account_flags_lgd">Patron account flags</legend>
885 [% FOREACH flagloo IN flagloop %]
886 <li><label class="radio" for="yes[% flagloo.name %]">
887 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
888 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
890 [% IF CAN_user_circulate_manage_restrictions %]
891 <label for="yes[% flagloo.name %]">
892 [% IF ( flagloo.yes ) %]
893 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
895 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
898 <label for="no[% flagloo.name %]">
899 [% IF ( flagloo.no ) %]
900 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
902 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
906 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
915 <fieldset class="rows" id="memberentry_restrictions">
916 <legend id="restrictions_lgd">Patron restrictions</legend>
918 [% IF ( debarments ) %]
926 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
933 [% FOREACH d IN debarments %]
935 <td>[% d.type %]</td>
937 [% IF d.comment.search('OVERDUES_PROCESS') %]
938 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
943 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
944 <td>[% d.created | $KohaDates %]</td>
945 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
947 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
955 <p>Patron is currently unrestricted.</p>
958 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
959 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
960 <fieldset id="manual_restriction_form">
961 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
962 <legend id="manual_restriction_lgd">Add manual restriction</legend>
964 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
965 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
966 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
970 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
980 [% IF Koha.Preference('HouseboundModule') %]
981 <fieldset class="rows" id="memberentry_housebound_roles">
982 <legend id="housebound_roles">Housebound roles</legend>
985 <label class="radio" for="housebound_chooser">
988 [% IF ( housebound_role.housebound_chooser == 1 ) %]
989 <label for="yes_housebound_chooser">Yes </label>
990 <input type="radio" id="yes_housebound_chooser"
991 name="housebound_chooser" value="1"
993 <label for="no_housebound_chooser">No </label>
994 <input type="radio" id="no_housebound_chooser"
995 name="housebound_chooser" value="0" />
997 <label for="yes_housebound_chooser">Yes </label>
998 <input type="radio" id="yes_housebound_chooser"
999 name="housebound_chooser" value="1" />
1000 <label for="no_housebound_chooser">No </label>
1001 <input type="radio" id="no_housebound_chooser"
1002 name="housebound_chooser" value="0"
1003 checked="checked" />
1007 <label class="radio" for="housebound_deliverer">Deliverer:</label>
1008 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1009 <label for="yes_housebound_deliverer">Yes </label>
1010 <input type="radio" id="yes_housebound_deliverer"
1011 name="housebound_deliverer" value="1"
1012 checked="checked" />
1013 <label for="no_housebound_deliverer">No </label>
1014 <input type="radio" id="no_housebound_deliverer"
1015 name="housebound_deliverer" value="0" />
1017 <label for="yes_housebound_deliverer">Yes </label>
1018 <input type="radio" id="yes_housebound_deliverer"
1019 name="housebound_deliverer" value="1" />
1020 <label for="no_housebound_deliverer">No </label>
1021 <input type="radio" id="no_housebound_deliverer"
1022 name="housebound_deliverer" value="0"
1023 checked="checked" />
1028 [% END # hide fieldset %]
1029 [% END # IF step_7 %]
1032 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1033 <fieldset class="rows" id="memberentry_patron_attributes">
1034 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1035 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1036 [% FOREACH pa_loo IN patron_attributes %]
1037 [% IF pa_loo.class %]
1038 <fieldset id="aai_[% pa_loo.class %]">
1039 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1041 <ol class="attributes_table">
1042 [% FOREACH patron_attribute IN pa_loo.items %]
1043 <li data-category_code="[% patron_attribute.category_code %]">
1044 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1045 [% IF ( patron_attribute.use_dropdown ) %]
1046 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1047 <option value=""></option>
1048 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1049 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1050 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1051 [% auth_val_loo.lib %]
1054 <option value="[% auth_val_loo.authorised_value %]" >
1055 [% auth_val_loo.lib %]
1061 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1063 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1064 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1065 [% IF ( patron_attribute.repeatable ) %]
1066 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1071 [% IF pa_loo.class %]</fieldset>[% END %]
1074 [% END %][% END %][% END %]
1076 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1077 <fieldset class="rows" id="memberentry_messaging_prefs">
1078 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1080 <!-- handle changing prefs if creating new patron and changing
1083 <script type="text/javascript">//<![CDATA[
1084 $(document).ready(function(){
1085 var message_prefs_dirty = false;
1086 $('#memberentry_messaging_prefs > *').change(function() {
1087 message_prefs_dirty = true;
1089 $('#categorycode_entry').change(function() {
1090 var categorycode = $(this).val();
1091 if (message_prefs_dirty) {
1092 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1096 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1098 $.each(data.messaging_preferences, function(i, item) {
1099 var attrid = item.message_attribute_id;
1100 var transports = ['email', 'rss', 'sms'];
1101 $.each(transports, function(j, transport) {
1102 if (item['transports_' + transport] == 1) {
1103 $('#' + transport + attrid).prop('checked', true);
1105 $('#' + transport + attrid).prop('checked', false);
1108 if (item.digest && item.digest != ' ') {
1109 $('#digest' + attrid).prop('checked', true);
1111 $('#digest' + attrid).prop('checked', false);
1113 if (item.takes_days == '1') {
1114 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1117 message_prefs_dirty = false;
1125 <input type="hidden" name="setting_messaging_prefs" value="1" />
1126 [% INCLUDE 'messaging-preference-form.inc' %]
1127 [% IF ( SMSSendDriver ) %]
1128 <p><label for="SMSnumber">SMS number:</label>
1129 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1131 [% UNLESS nosms_provider_id %]
1133 <label for="sms_provider_id">SMS provider:</label>
1134 <select id="sms_provider_id" name="sms_provider_id"/>
1135 <option value="">Unknown</option>
1136 [% FOREACH s IN sms_providers %]
1137 [% IF s.id == sms_provider_id %]
1138 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1140 <option value="[% s.id %]">[% s.name %]</option>
1152 [% IF quickadd && opadd && !check_member %]
1153 <form id="quick_add_form" class="toggler">
1154 <fieldset class="rows quick_add"><legend>Quick add</legend>
1155 <ol id="quick_add_list">
1163 [% UNLESS ( opadd ) %]<div class="yui-b">
1164 [% INCLUDE 'members-menu.inc' %]
1169 [% MACRO jsinclude BLOCK %]
1170 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
1171 [% INCLUDE 'calendar.inc' %]
1172 [% Asset.js("js/members-menu.js") %]
1173 <script type="text/javascript">
1174 $(document).ready(function() {
1176 $("#saverecord").css({ 'margin-left': 0 });
1177 var original_offset = $("#toolbar").position().top;
1178 var additional_height = $("#filters").height();
1179 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1180 $("#filteraction_on").on("click", function(){
1181 $(window).off('scroll');
1182 $("#toolbar").css({ top: original_offset + additional_height });
1183 $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
1185 $("#filteraction_off").on("click", function(){
1186 $(window).off('scroll');
1187 $("#toolbar").css({ top: original_offset });
1188 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1191 [% IF categorycode %]
1192 update_category_code( "[% categorycode %]" );
1194 if ( $("#categorycode_entry").length > 0 ){
1195 var category_code = $("#categorycode_entry").find("option:selected").val();
1196 update_category_code( category_code );
1201 function update_cardnumber_warning(size){
1202 var max_len = [% maxlength_cardnumber %];
1203 if ( size >= max_len ) {
1204 $("#cn_max").show();
1206 $("#cn_max").hide();
1210 $(document).ready(function() {
1211 $("#cn_max").hide();
1213 $("#cardnumber").on("keydown", function(e){
1214 content = $(this).val();
1216 $("#cardnumber").on("keyup", function(e){
1217 // .val() will return the value of the input after the key has been released
1218 var l = $(this).val().length;
1219 if ( l == content.length + 1 ) { l--; }
1220 update_cardnumber_warning(l);
1222 $("#cardnumber").bind("paste", function(e){
1223 var pastedData = e.originalEvent.clipboardData.getData('text');
1224 update_cardnumber_warning(pastedData.length - 1);
1226 var toggle_quick_add = $(".toggle_quick_add");
1227 $(toggle_quick_add).click(function(e){
1228 toggle_quick_add.toggle();
1231 var toggle_from = '';
1232 if( $("#entryform:visible").length ) {
1233 toggle_to = "#quick_add_form label";
1234 toggle_from = "#entryform label";
1236 toggle_to="#entryform label";
1237 toggle_from = "#quick_add_form label";
1239 $(toggle_from).each(function() {
1240 var input_label = $(this).attr('for');
1241 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1242 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1245 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1248 $(".toggler").toggle();
1251 $("#save_quick_add").click(function(){
1252 $("#quick_add_form").validate();
1253 if( $("#quick_add_form").valid()){
1254 $('.toggle_quick_add').click();
1255 $('#saverecord').click();
1257 else {return false;}
1260 $("#saverecord").click(function(){
1261 if( check_form_borrowers() ){
1262 $("#entryform").submit();
1266 $('#duplicate').on('click', function() {
1267 $("input[name='op']").val('modify');
1268 $("input[name='borrowernumber']").val('[% check_member %]');
1269 $("input[name='check_member']").val('');
1270 $('#entryform').submit();
1273 $('#not-duplicate').on('click', function() {
1274 $("input[name='nodouble']").val('1');
1275 $('#entryform').submit();
1279 var MSG_SEPARATOR = _("Separator must be / in field %s");
1280 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1281 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1282 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1283 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1284 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1285 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1286 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1287 var MSG_MONTH = _("%s month")
1288 var MSG_MONTHS = _("%s months")
1289 var MSG_YEAR = _("%s year")
1290 var MSG_YEARS = _("%s years")
1291 var LABEL_CHANGE = _("Change");
1292 var LABEL_SET_TO_PATRON = _("Set to patron");
1293 var LABEL_AGE = _("Age");
1295 [% IF quickadd && opadd && !check_member %]
1296 $(document).ready(function () {
1298 $("#entryform,#saverecord").hide();
1299 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1300 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1301 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1302 $("#entryform label").each(function () {
1303 var input_label = $(this).attr('for');
1304 if ( input_label == 'sex-female' ) {
1307 else if ( input_label == 'btitle' ) {
1308 input_label='title';
1310 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1311 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1312 $(this).parent().clone().appendTo("#quick_add_list");
1313 [% UNLESS mandatorypassword %]
1314 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1318 if( $("#memberentry_guarantor").length ) {
1319 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1320 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1321 $("#quick_add_list #guarantordelete").prop('id','qagd');
1323 $("#qagd").click(function() { $("#guarantordelete").click(); });
1324 $("#quick_add_form").show();
1329 [% Asset.js("js/members.js") %]
1330 [% Asset.js("js/messaging-preference-form.js") %]
1333 [% INCLUDE 'intranet-bottom.inc' %]
1334 [% PROCESS 'password_check.inc' %]
1335 [% PROCESS 'add_password_check' new_password => 'password' %]