5 [% INCLUDE 'doc-head-open.inc' %]
6 <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>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="pat_memberentrygen" class="pat">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'patron-search.inc' %]
14 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
15 [% 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 %]
16 <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>
18 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
24 [% IF ( error_alert == "no_email" ) %]
25 <div class="error">This member has no email</div>
27 <div class="error">[% error_alert %]</div>
31 <div class="dialog message">Email has been sent.</div>
34 [% INCLUDE 'noadd-warnings.inc' %]
36 [% UNLESS ( no_add ) %]
37 <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>
39 [% IF quickadd && opadd && !check_member %]
40 <a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a>
41 <a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a>
44 [% IF ( check_member ) %]
45 <div class="dialog alert">
46 <h3>Duplicate patron record?</h3>
47 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
48 <button id="duplicate" type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
49 Edit existing record</button>
51 <button type="submit" id="not-duplicate" class="new"><i class="fa fa-plus"></i> Not a duplicate.
52 Save as new record</button>
57 <div class="dialog alert">
58 <p>The following fields are wrong. Please fix them.</p>
60 [% IF ( ERROR_login_exist ) %]
61 <li id="ERROR_login_exist">Username/password already exists.</li>
63 [% IF ERROR_cardnumber_already_exists %]
64 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
66 [% IF ERROR_cardnumber_length %]
67 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
69 [% IF ( ERROR_age_limitations ) %]
70 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
71 Ages allowed are [% age_low %]-[% age_high %].</li>
73 [% IF ( ERROR_branch ) %]
74 <li id="ERROR_branch">Library is invalid.</li>
76 [% IF ( ERROR_dateofbirth ) %]
77 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
79 [% IF ( ERROR_dateenrolled ) %]
80 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
82 [% IF ( ERROR_dateexpiry ) %]
83 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
85 [% IF ( ERROR_password_too_short ) %]
86 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
88 [% IF ( ERROR_password_too_weak ) %]
89 <li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li>
91 [% IF ( ERROR_password_has_whitespaces ) %]
92 <li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li>
94 [% IF ( ERROR_password_mismatch ) %]
95 <li id="ERROR_password_mismatch">Passwords do not match.</li>
97 [% IF ( ERROR_extended_unique_id_failed ) %]
98 <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>
100 [% IF ERROR_bad_email %]
101 <li id="ERROR_bad_email">The primary email is invalid.</li>
103 [% IF ERROR_bad_email_secondary %]
104 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
106 [% IF ERROR_bad_email_alternative %]
107 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
114 <div id="toolbar" class="btn-toolbar">
115 [% UNLESS ( check_member ) %]
116 [% IF quickadd && opadd %]
117 <button class="btn btn-default btn-sm toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button>
119 <button class="btn btn-default btn-sm toggler" id="saverecord" name="save" ><i class="fa fa-save"></i> Save</button>
121 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
123 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
125 <i class="fa fa-times"></i> Cancel
130 <form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" >
131 [% UNLESS ( check_member ) %]
132 <input type="hidden" name="nodouble" value="[% nodouble %]" />
134 <!-- field always hidden in different form (1,2,3) -->
135 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
136 <input type="hidden" name="category_type" value="[% category_type %]" />
137 <input type="hidden" name="updtype" value="[% updtype %]" />
138 <input type="hidden" name="destination" value="[% destination %]" />
139 <input type="hidden" name="check_member" value="[% check_member %]" />
140 <input type="hidden" name="borrowernumber" value="[% borrowernumber UNLESS opduplicate %]" />
141 <input type="hidden" name="nodouble" value="[% nodouble UNLESS opduplicate %]" />
142 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
143 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
144 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
145 [% ELSIF ( opduplicate ) %]
146 <input type="hidden" name="op" value="insert" />
148 <input type="hidden" name="op" value="save" />
149 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
150 [%# Only put the cardnumber if we arent showing it in the form later %]
152 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
158 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
159 <fieldset class="rows" id="memberentry_identity">
160 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
164 [% IF Koha.Preference('BorrowersTitles') %]
166 [% IF ( mandatorytitle ) %]
167 <label for="btitle" class="required">
172 <select id="btitle" name="title">
173 <option value=""></option>
174 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
176 <option value="[% t %]" selected="selected">[% t %]</option>
178 <option value="[% t %]">[% t %]</option>
182 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
187 [% UNLESS nosurname %]
189 [% IF ( mandatorysurname ) %]
190 <label for="surname" class="required">
192 <label for="surname">
195 [% IF ( uppercasesurnames ) %]
196 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
198 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
200 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
204 [% UNLESS nofirstname %]
206 [% IF ( mandatoryfirstname ) %]
207 <label for="firstname" class="required">
209 <label for="firstname">
212 <input type="text" id="firstname" name="firstname" size="20" value="[% firstname | html UNLESS opduplicate %]" />
213 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
216 [% UNLESS nodateofbirth %]
218 [% IF ( mandatorydateofbirth ) %]
219 <label for="dateofbirth" class="required">
221 <label for="dateofbirth">
223 Date of birth: </label>
225 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% dateofbirth UNLESS opduplicate %]" class="datepicker" />
227 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
228 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
229 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
232 [% UNLESS noinitials %]
234 [% IF ( mandatoryinitials ) %]
235 <label for="initials" class="required">
237 <label for="initials">
240 <input type="text" id="initials" name="initials" size="20" value="[% initials | html UNLESS opduplicate %]" />
241 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
245 [% UNLESS noothernames %]
247 [% IF ( mandatoryothernames ) %]
248 <label for="othernames" class="required">
250 <label for="othernames">
253 <input type="text" id="othernames" name="othernames" size="20" value="[% othernames | html UNLESS opduplicate %]" />
254 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
255 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
262 [% UNLESS ( opduplicate ) %]
264 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /> Female</label>
266 <label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /> Female</label>
269 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /> Male</label>
271 <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /> Male</label>
274 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> None specified</label>
276 <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /> None specified</label>
279 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
280 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
281 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
289 [% END # hide fieldset %]
291 [% IF ( showguarantor ) %]
292 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
294 <input type="hidden" name="branchcode" value="[% branchcode %]" />
296 <fieldset id="memberentry_guarantor" class="rows">
297 <legend id="guarantor_lgd">Guarantor information</legend>
300 [% IF ( guarantorid ) %]
301 <li id="contact-details">
303 <li id="contact-details" style="display: none">
305 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
308 <label for="contactname">Organization name: </label>
309 [% IF ( guarantorid ) %]
310 <span>[% contactname %]</span>
311 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
313 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
318 [% IF ( guarantorid ) %]
319 <li id="contact-details">
321 <li id="contact-details" style="display: none">
323 <span class="label">Patron #:</span>
325 [% IF logged_in_user.can_see_patron_infos( guarantor ) %]
326 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid | html %]</a>
328 [% guarantorid | html %]
332 [% UNLESS nocontactname %]
334 <label for="contactname">Surname: </label>
335 [% IF ( guarantorid ) %]
336 <span>[% contactname %]</span>
337 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" />
339 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" />
343 [% UNLESS nocontactfirstname %]
345 <label for="contactfirstname">First name: </label>
346 [% IF ( guarantorid ) %]
347 <span>[% contactfirstname %]</span>
348 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" />
350 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" />
354 [% IF ( relshiploop ) %]
356 <label for="relationship">Relationship: </label>
357 <select name="relationship" id="relationship" >
358 [% FOREACH relshiploo IN relshiploop %]
359 [% IF ( relshiploo.selected ) %]
360 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
362 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
371 <span class="label"> </span>
372 [% IF ( guarantorid ) %]
373 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
375 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
377 <input id="guarantordelete" type="button" value="Delete" />
379 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
381 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
382 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
383 [% IF privacy_guarantor_checkouts %]
384 <option value="0">No</option>
385 <option value="1" selected>Yes</option>
387 <option value="0" selected>No</option>
388 <option value="1">Yes</option>
391 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
398 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
399 [% IF Koha.Preference( 'AddressFormat' ) %]
400 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
402 [% INCLUDE 'member-main-address-style-us.inc' %]
404 [% END # nostreet && nocity etc group%]
406 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
407 <fieldset class="rows" id="memberentry_contact">
408 <legend id="contact_lgd">Contact</legend><ol>
411 [% IF ( mandatoryphone ) %]
412 <label for="phone" class="required">
416 Primary phone: </label>
417 <input type="text" id="phone" name="phone" value="[% phone | html %]" />
418 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
422 [% UNLESS nophonepro %]
424 [% IF ( mandatoryphonepro ) %]
425 <label for="phonepro" class="required">
427 <label for="phonepro">
429 Secondary phone: </label>
430 <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
431 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
434 [% UNLESS nomobile %]
436 [% IF ( mandatorymobile ) %]
437 <label for="mobile" class="required">
441 Other phone: </label>
442 <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
443 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
448 [% IF ( mandatoryemail ) %]
449 <label for="email" class="required">
453 Primary email: </label>
454 <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
455 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
459 [% UNLESS noemailpro %]
461 [% IF ( mandatoryemailpro ) %]
462 <label for="emailpro" class="required">
464 <label for="emailpro">
466 Secondary email: </label>
467 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
468 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
473 [% IF ( mandatoryfax ) %]
474 <label for="fax" class="required">
479 <input type="text" id="fax" name="fax" value="[% fax | html %]" />
480 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
485 [%END # hide fieldset %]
487 <!-- ************************ STEP_1 *********************** -->
491 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
492 [% IF Koha.Preference( 'AddressFormat' ) %]
493 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
495 [% INCLUDE 'member-alt-address-style-us.inc' %]
497 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
500 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
501 [% IF Koha.Preference( 'AddressFormat' ) %]
502 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
504 [% INCLUDE 'member-alt-contact-style-us.inc' %]
506 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
511 [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
512 <fieldset class="rows" id="memberentry_library_management">
513 <legend id="library_management_lgd">Library management</legend><ol>
514 [% UNLESS nocardnumber %]
516 [% IF mandatorycardnumber %]
517 <label for="cardnumber" class="required">
519 <label for="cardnumber" class="validated">
521 Card number: </label>
523 <!-- NOTE: div.hint closing tag isn't on the same line -->
524 [% IF minlength_cardnumber == maxlength_cardnumber %]
525 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
526 [% 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>
527 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.
528 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
529 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
530 [% 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>
531 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.
532 [% ELSIF maxlength_cardnumber %]
533 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
534 [% 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>
535 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.
537 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
538 [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]
539 <div class="hint">There is no minimum or maximum character length.
541 [% IF autoMemberNum %]
542 [% IF mandatorycardnumber %]
543 <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span>
545 <br/>Leave blank for auto calc during registration
548 </div><!--/hint div -->
551 [% UNLESS nobranchcode %]
553 <label for="libraries" class="required">Library:</label>
554 <select name="branchcode" size="1" id="libraries">
555 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
557 <span class="required">Required</span>
561 <label for="categorycode_entry" class="required">Category: </label>
562 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
563 [% FOREACH typeloo IN typeloop %]
564 [% FOREACH categoryloo IN typeloo.categoryloop %]
565 [% IF ( loop.first ) %]
566 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
567 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
568 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
569 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
570 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
571 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
573 [% IF ( categoryloo.categorycodeselected ) %]
574 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
576 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
578 [% IF ( loop.last ) %]
584 <span class="required">Required</span>
588 [% IF ( mandatorysort1 ) %]
589 <label for="sort1" class="required">
594 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
595 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
600 [% IF ( mandatorysort2 ) %]
601 <label for="sort2" class="required">
606 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
607 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
610 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
612 <label for="sort2">Sync with the Norwegian national patron database:</label>
613 [% IF ( sync == 0 ) %]
614 <input type="radio" id="sync" name="sync" value="1"> Yes
615 <input type="radio" id="sync" name="sync" value="0" checked> No
617 <input type="radio" id="sync" name="sync" value="1" checked> Yes
618 <input type="radio" id="sync" name="sync" value="0"> No
622 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
623 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
624 <select name="checkprevcheckout" id="checkprevcheckout">
625 [% IF ( checkprevcheckout == 'yes' ) %]
626 <option value="yes" selected="selected">Yes if settings allow it</option>
627 <option value="no">No if settings allow it</option>
628 <option value="inherit">Inherit from settings</option>
629 [% ELSIF ( checkprevcheckout == 'no' ) %]
630 <option value="yes">Yes if settings allow it</option>
631 <option value="no" selected="selected">No if settings allow it</option>
632 <option value="inherit">Inherit from settings</option>
634 <option value="yes">Yes if settings allow it</option>
635 <option value="no">No if settings allow it</option>
636 <option value="inherit" selected="selected">Inherit from settings</option>
641 [% IF Koha.Preference('TranslateNotices') %]
643 <label for="lang">Preferred language for notices: </label>
644 <select id="lang" name="lang">
645 <option value="default">Default</option>
646 [% FOR language IN languages %]
647 [% FOR sublanguage IN language.sublanguages_loop %]
648 [% IF language.plural %]
649 [% IF sublanguage.rfc4646_subtag == lang %]
650 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
652 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</option>
655 [% IF sublanguage.rfc4646_subtag == lang %]
656 <option value="[% sublanguage.rfc4646_subtag %]" selected="selected">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
658 <option value="[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</option>
668 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
669 <fieldset class="rows" id="memberentry_subscription">
670 <legend id="library_setup_lgd">Library set-up</legend><ol>
671 [% UNLESS nodateenrolled %]
673 [% IF ( mandatorydateenrolled ) %]
674 <label for="from" class="required">
678 Registration date: </label>
679 [% IF ( dateformat == "metric" ) %]
680 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
682 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
684 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
685 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
686 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
689 [% UNLESS nodateexpiry %]
692 <li style="display:none">
694 [% IF ( mandatorydateexpiry ) %]
695 <label for="to" class="required">
699 Expiry date (leave blank for auto calc): </label>
700 [% IF ( dateformat == "metric" ) %]
701 [% UNLESS ( opadd ) %]
702 <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" />
704 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
707 [% UNLESS ( opadd ) %]
708 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry UNLESS opduplicate %]" class="datepickerto" />
710 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
713 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
714 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
715 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
717 [% UNLESS noopacnote %]
719 [% IF ( mandatoryopacnote ) %]
720 <label for="opacnote" class="required">
722 <label for="opacnote">
725 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote | html UNLESS opduplicate %]</textarea>
726 <div class="hint">This message appears on this patron's user page in the OPAC</div>
727 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
730 [% UNLESS noborrowernotes %]
732 [% IF ( mandatoryborrowernotes ) %]
733 <label for="borrowernotes" class="required">
735 <label for="borrowernotes">
737 Circulation note: </label>
738 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes | html UNLESS opduplicate %]</textarea>
739 <div class="hint">This message displays when checking out to this patron</div>
740 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
745 [% END # hide fieldset %]
747 [% UNLESS nouserid && nopassword %]
748 <fieldset class="rows" id="memberentry_userid">
749 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
750 [% UNLESS nouserid %]
752 [% IF ( mandatoryuserid ) %]
753 <label for="userid" class="required">
759 [% IF ( NoUpdateLogin ) %]
760 [% IF ( opduplicate ) %]
761 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
763 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
766 [% IF ( opduplicate ) %]
767 <input type="text" id="userid" name="userid" size="20" value="" />
769 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
773 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
774 <input type="text" disabled="disabled" style="display:none" />
776 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
779 [% UNLESS nopassword %]
781 [% IF ( mandatorypassword ) %]
782 <label for="password" class="required">
784 <label for="password">
788 [% IF ( NoUpdateLogin ) %]
789 [% IF ( opduplicate ) %]
790 <input type="password" id="password" name="password" size="20" disabled="disabled" />
792 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
795 [% IF ( opduplicate ) %]
796 <input type="password" id="password" name="password" size="20" />
798 <input type="password" id="password" name="password" size="20" value="[% password %]" />
802 [% IF ( password ) %]
803 [% IF ( NoUpdateLogin ) %]
804 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
806 [% IF ( opduplicate ) %]
807 <input type="password" id="password" name="password" size="20" />
809 <input type="password" id="password" name="password" size="20" value="****" />
813 [% IF ( NoUpdateLogin ) %]
814 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
816 <input type="password" id="password" name="password" size="20" value="" />
820 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %]
821 [% IF ( ERROR_password_too_short ) %]<span class="required">Password is too short</span>[% END %]
822 [% IF ( ERROR_password_too_weak ) %]<span class="required">Password is too weak</span>[% END %]
823 [% IF ( ERROR_password_has_whitespaces ) %]<span class="required">Password has leading or trailing whitespaces</span>[% END %]
824 <div class="hint">Minimum password length: [% minPasswordLength %]</div>
827 [% IF ( mandatorypassword ) %]
828 <label for="password2" class="required">
830 <label for="password2">
832 Confirm password: </label>
834 [% IF ( NoUpdateLogin ) %]
835 [% IF ( opduplicate ) %]
836 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
838 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
841 [% IF ( opduplicate ) %]
842 <input type="password" id="password2" name="password2" size="20" />
844 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
848 [% IF ( password ) %]
849 [% IF ( NoUpdateLogin ) %]
850 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
852 [% IF ( opduplicate ) %]
853 <input type="password" id="password2" name="password2" size="20" />
855 <input type="password" id="password2" name="password2" size="20" value="****" />
859 [% IF ( NoUpdateLogin ) %]
860 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
862 <input type="password" id="password2" name="password2" size="20" value="" />
866 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
870 [% END # hide fieldset %][% END %]
871 <!--this zones are not necessary in modif mode -->
872 [% UNLESS ( opadd || opduplicate ) %]
873 <fieldset class="rows" id="memberentry_account_flags">
874 <legend id="account_flags_lgd">Patron account flags</legend>
876 [% FOREACH flagloo IN flagloop %]
877 <li><label class="radio" for="yes[% flagloo.name %]">
878 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
879 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
881 [% IF CAN_user_circulate_manage_restrictions %]
882 <label for="yes[% flagloo.name %]">
883 [% IF ( flagloo.yes ) %]
884 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
886 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
889 <label for="no[% flagloo.name %]">
890 [% IF ( flagloo.no ) %]
891 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
893 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
897 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
906 <fieldset class="rows" id="memberentry_restrictions">
907 <legend id="restrictions_lgd">Patron restrictions</legend>
909 [% IF ( debarments ) %]
917 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
924 [% FOREACH d IN debarments %]
926 <td>[% d.type %]</td>
928 [% IF d.comment.search('OVERDUES_PROCESS') %]
929 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
934 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
935 <td>[% d.created | $KohaDates %]</td>
936 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
938 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
946 <p>Patron is currently unrestricted.</p>
949 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
950 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
951 <fieldset id="manual_restriction_form">
952 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
953 <legend id="manual_restriction_lgd">Add manual restriction</legend>
955 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
956 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
957 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
961 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
971 [% IF Koha.Preference('HouseboundModule') %]
972 <fieldset class="rows" id="memberentry_housebound_roles">
973 <legend id="housebound_roles">Housebound roles</legend>
976 <label class="radio" for="housebound_chooser">
979 [% IF ( housebound_role.housebound_chooser == 1 ) %]
980 <label for="yes_housebound_chooser">Yes </label>
981 <input type="radio" id="yes_housebound_chooser"
982 name="housebound_chooser" value="1"
984 <label for="no_housebound_chooser">No </label>
985 <input type="radio" id="no_housebound_chooser"
986 name="housebound_chooser" value="0" />
988 <label for="yes_housebound_chooser">Yes </label>
989 <input type="radio" id="yes_housebound_chooser"
990 name="housebound_chooser" value="1" />
991 <label for="no_housebound_chooser">No </label>
992 <input type="radio" id="no_housebound_chooser"
993 name="housebound_chooser" value="0"
998 <label class="radio" for="housebound_deliverer">Deliverer:</label>
999 [% IF ( housebound_role.housebound_deliverer == 1 ) %]
1000 <label for="yes_housebound_deliverer">Yes </label>
1001 <input type="radio" id="yes_housebound_deliverer"
1002 name="housebound_deliverer" value="1"
1003 checked="checked" />
1004 <label for="no_housebound_deliverer">No </label>
1005 <input type="radio" id="no_housebound_deliverer"
1006 name="housebound_deliverer" value="0" />
1008 <label for="yes_housebound_deliverer">Yes </label>
1009 <input type="radio" id="yes_housebound_deliverer"
1010 name="housebound_deliverer" value="1" />
1011 <label for="no_housebound_deliverer">No </label>
1012 <input type="radio" id="no_housebound_deliverer"
1013 name="housebound_deliverer" value="0"
1014 checked="checked" />
1019 [% END # hide fieldset %]
1020 [% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1021 <fieldset class="rows" id="memberentry_patron_attributes">
1022 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1023 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1024 [% FOREACH pa_loo IN patron_attributes %]
1025 [% IF pa_loo.class %]
1026 <fieldset id="aai_[% pa_loo.class %]">
1027 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
1029 <ol class="attributes_table">
1030 [% FOREACH patron_attribute IN pa_loo.items %]
1031 <li data-category_code="[% patron_attribute.category_code %]">
1032 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1033 [% IF ( patron_attribute.use_dropdown ) %]
1034 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1035 <option value=""></option>
1036 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1037 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1038 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1039 [% auth_val_loo.lib %]
1042 <option value="[% auth_val_loo.authorised_value %]" >
1043 [% auth_val_loo.lib %]
1049 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
1051 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1052 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
1053 [% IF ( patron_attribute.repeatable ) %]
1054 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
1059 [% IF pa_loo.class %]</fieldset>[% END %]
1062 [% END %][% END %][% END %]
1064 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1065 <fieldset class="rows" id="memberentry_messaging_prefs">
1066 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1068 <!-- handle changing prefs if creating new patron and changing
1071 <script type="text/javascript">//<![CDATA[
1072 $(document).ready(function(){
1073 var message_prefs_dirty = false;
1074 $('#memberentry_messaging_prefs > *').change(function() {
1075 message_prefs_dirty = true;
1077 $('#categorycode_entry').change(function() {
1078 var categorycode = $(this).val();
1079 if (message_prefs_dirty) {
1080 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1084 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1086 $.each(data.messaging_preferences, function(i, item) {
1087 var attrid = item.message_attribute_id;
1088 var transports = ['email', 'rss', 'sms'];
1089 $.each(transports, function(j, transport) {
1090 if (item['transports_' + transport] == 1) {
1091 $('#' + transport + attrid).prop('checked', true);
1093 $('#' + transport + attrid).prop('checked', false);
1096 if (item.digest && item.digest != ' ') {
1097 $('#digest' + attrid).prop('checked', true);
1099 $('#digest' + attrid).prop('checked', false);
1101 if (item.takes_days == '1') {
1102 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1105 message_prefs_dirty = false;
1113 <input type="hidden" name="setting_messaging_prefs" value="1" />
1114 [% INCLUDE 'messaging-preference-form.inc' %]
1115 [% IF ( SMSSendDriver ) %]
1116 <p><label for="SMSnumber">SMS number:</label>
1117 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1119 [% UNLESS nosms_provider_id %]
1121 <label for="sms_provider_id">SMS provider:</label>
1122 <select id="sms_provider_id" name="sms_provider_id"/>
1123 <option value="">Unknown</option>
1124 [% FOREACH s IN sms_providers %]
1125 [% IF s.id == sms_provider_id %]
1126 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1128 <option value="[% s.id %]">[% s.name %]</option>
1140 [% IF quickadd && opadd && !check_member %]
1141 <form id="quick_add_form" class="toggler">
1142 <fieldset class="rows quick_add"><legend>Quick add</legend>
1143 <ol id="quick_add_list">
1151 [% UNLESS ( opadd ) %]<div class="yui-b">
1152 [% INCLUDE 'members-menu.inc' %]
1157 [% MACRO jsinclude BLOCK %]
1158 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
1159 [% INCLUDE 'calendar.inc' %]
1160 <script type="text/javascript">
1161 $(document).ready(function() {
1163 $("#saverecord").css({ 'margin-left': 0 });
1164 var original_offset = $("#toolbar").position().top;
1165 var additional_height = $("#filters").height();
1166 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1167 $("#filteraction_on").on("click", function(){
1168 $(window).off('scroll');
1169 $("#toolbar").css({ top: original_offset + additional_height });
1170 $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
1172 $("#filteraction_off").on("click", function(){
1173 $(window).off('scroll');
1174 $("#toolbar").css({ top: original_offset });
1175 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
1178 [% IF categorycode %]
1179 update_category_code( "[% categorycode %]" );
1181 if ( $("#categorycode_entry").length > 0 ){
1182 var category_code = $("#categorycode_entry").find("option:selected").val();
1183 update_category_code( category_code );
1188 function update_cardnumber_warning(size){
1189 var max_len = [% maxlength_cardnumber %];
1190 if ( size >= max_len ) {
1191 $("#cn_max").show();
1193 $("#cn_max").hide();
1197 $(document).ready(function() {
1198 $("#cn_max").hide();
1200 $("#cardnumber").on("keydown", function(e){
1201 content = $(this).val();
1203 $("#cardnumber").on("keyup", function(e){
1204 // .val() will return the value of the input after the key has been released
1205 var l = $(this).val().length;
1206 if ( l == content.length + 1 ) { l--; }
1207 update_cardnumber_warning(l);
1209 $("#cardnumber").bind("paste", function(e){
1210 var pastedData = e.originalEvent.clipboardData.getData('text');
1211 update_cardnumber_warning(pastedData.length - 1);
1213 var toggle_quick_add = $(".toggle_quick_add");
1214 $(toggle_quick_add).click(function(e){
1215 toggle_quick_add.toggle();
1218 var toggle_from = '';
1219 if( $("#entryform:visible").length ) {
1220 toggle_to = "#quick_add_form label";
1221 toggle_from = "#entryform label";
1223 toggle_to="#entryform label";
1224 toggle_from = "#quick_add_form label";
1226 $(toggle_from).each(function() {
1227 var input_label = $(this).attr('for');
1228 if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
1229 $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
1232 $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
1235 $(".toggler").toggle();
1238 $("#save_quick_add").click(function(){
1239 $("#quick_add_form").validate();
1240 if( $("#quick_add_form").valid()){
1241 $('.toggle_quick_add').click();
1242 $('#saverecord').click();
1244 else {return false;}
1247 $("#entryform").validate({
1250 password_strong: true,
1251 password_no_spaces: true
1254 password_match: true
1259 $("#saverecord").click(function(){
1260 if( check_form_borrowers() ){
1261 $("#entryform").submit();
1265 $('#duplicate').on('click', function() {
1266 $("input[name='op']").val('modify');
1267 $("input[name='borrowernumber']").val('[% check_member %]');
1268 $("input[name='check_member']").val('');
1269 $('#entryform').submit();
1272 $('#not-duplicate').on('click', function() {
1273 $("input[name='nodouble']").val('1');
1274 $('#entryform').submit();
1278 var MSG_SEPARATOR = _("Separator must be / in field %s");
1279 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
1280 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
1281 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
1282 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
1283 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
1284 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
1285 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
1286 var MSG_MONTH = _("%s month")
1287 var MSG_MONTHS = _("%s months")
1288 var MSG_YEAR = _("%s year")
1289 var MSG_YEARS = _("%s years")
1290 var LABEL_CHANGE = _("Change");
1291 var LABEL_SET_TO_PATRON = _("Set to patron");
1292 var LABEL_AGE = _("Age");
1294 [% IF quickadd && opadd && !check_member %]
1295 $(document).ready(function () {
1297 $("#entryform,#saverecord").hide();
1298 [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
1299 var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
1300 var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
1301 $("#entryform label").each(function () {
1302 var input_label = $(this).attr('for');
1303 if ( input_label == 'sex-female' ) {
1306 else if ( input_label == 'btitle' ) {
1307 input_label='title';
1309 if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
1310 if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
1311 $(this).parent().clone().appendTo("#quick_add_list");
1312 [% UNLESS mandatorypassword %]
1313 if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
1317 if( $("#memberentry_guarantor").length ) {
1318 $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
1319 $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
1320 $("#quick_add_list #guarantordelete").prop('id','qagd');
1322 $("#qagd").click(function() { $("#guarantordelete").click(); });
1323 $("#quick_add_form").show();
1328 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members_[% KOHA_VERSION %].js"></script>
1329 <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
1332 [% INCLUDE 'intranet-bottom.inc' %]
1333 [% PROCESS 'password_check.inc' %]
1334 [% PROCESS 'add_password_check' new_password => 'password' %]