3 [% INCLUDE 'doc-head-open.inc' %]
4 <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>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <script type="text/javascript">
9 $(document).ready(function() {
11 update_category_code( "[% categorycode %]" );
13 if ( $("#categorycode_entry").length > 0 ){
14 var category_code = $("#categorycode_entry").find("option:selected").val();
15 update_category_code( category_code );
20 var MSG_SEPARATOR = _("Separator must be / in field %s");
21 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
22 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
23 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
24 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
25 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
26 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
27 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
28 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
29 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
30 var MSG_MONTH = _("%s month")
31 var MSG_MONTHS = _("%s months")
32 var MSG_YEAR = _("%s year")
33 var MSG_YEARS = _("%s years")
34 var LABEL_CHANGE = _("Change");
35 var LABEL_SET_TO_PATRON = _("Set to patron");
36 var LABEL_AGE = _("Age");
40 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
42 <body id="pat_memberentrygen" class="pat">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'patron-search.inc' %]
46 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
47 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
48 <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>
50 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
56 [% IF ( error_alert == "no_email" ) %]
57 <div class="error">This member has no email</div>
59 <div class="error">[% error_alert %]</div>
63 <div class="dialog message">Email has been sent.</div>
66 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
67 [% IF ( no_branches ) %]<p><strong>There are no libraries defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/branches.pl">Please add a library.</a>[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
68 [% IF ( no_categories ) %]<p><strong>There are no patron categories defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categories.pl">Please add a patron category.</a>[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
70 [% UNLESS ( no_add ) %]
71 <h1>[% 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 %])</h1>
73 [% IF ( check_member ) %]
74 <div class="dialog alert">
75 <h3>Duplicate patron record?</h3>
76 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
77 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
78 <input type="hidden" name="op" value="modify" />
79 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
80 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
81 Edit existing record</button>
84 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
85 <input type="hidden" name="nodouble" value="1" />
86 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
87 Save as new record</button>
92 <div class="dialog alert">
93 <p>The following fields are wrong. Please fix them.</p>
95 [% IF ( ERROR_login_exist ) %]
96 <li id="ERROR_login_exist">Username/password already exists.</li>
98 [% IF ERROR_cardnumber_already_exists %]
99 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
101 [% IF ERROR_cardnumber_length %]
102 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
104 [% IF ( ERROR_age_limitations ) %]
105 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
106 Ages allowed are [% age_low %]-[% age_high %].</li>
108 [% IF ( ERROR_branch ) %]
109 <li id="ERROR_branch">Library is invalid.</li>
111 [% IF ( ERROR_dateofbirth ) %]
112 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
114 [% IF ( ERROR_dateenrolled ) %]
115 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
117 [% IF ( ERROR_dateexpiry ) %]
118 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
120 [% IF ( ERROR_short_password ) %]
121 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
123 [% IF ( ERROR_password_mismatch ) %]
124 <li id="ERROR_password_mismatch">Passwords do not match.</li>
126 [% IF ( ERROR_extended_unique_id_failed ) %]
127 <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>
129 [% IF ERROR_bad_email %]
130 <li id="ERROR_bad_email">The primary email is invalid.</li>
132 [% IF ERROR_bad_email_secondary %]
133 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
135 [% IF ERROR_bad_email_alternative %]
136 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
143 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
144 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
145 <!-- field always hidden in different form (1,2,3) -->
146 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
147 <input type="hidden" name="category_type" value="[% category_type %]" />
148 <input type="hidden" name="updtype" value="[% updtype %]" />
149 <input type="hidden" name="destination" value="[% destination %]" />
150 <input type="hidden" name="check_member" value="[% check_member %]" />
151 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
152 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
153 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
154 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
155 [% ELSIF ( opduplicate ) %]
156 <input type="hidden" name="op" value="insert" />
158 <input type="hidden" name="op" value="save" />
159 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
160 [%# Only put the cardnumber if we arent showing it in the form later %]
162 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
168 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
169 <fieldset class="rows" id="memberentry_identity">
170 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
174 [% IF ( title_cgipopup ) %]
176 [% IF ( mandatorytitle ) %]
177 <label for="btitle" class="required">
182 [% borrotitlepopup %]
183 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
188 [% UNLESS nosurname %]
190 [% IF ( mandatorysurname ) %]
191 <label for="surname" class="required">
193 <label for="surname">
196 [% IF ( uppercasesurnames ) %]
197 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
199 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
201 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
205 [% UNLESS nofirstname %]
207 [% IF ( mandatoryfirstname ) %]
208 <label for="firstname" class="required">
210 <label for="firstname">
213 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
214 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
217 [% UNLESS nodateofbirth %]
219 [% IF ( mandatorydateofbirth ) %]
220 <label for="dateofbirth" class="required">
222 <label for="dateofbirth">
224 Date of birth: </label>
226 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
228 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
229 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
230 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
233 [% UNLESS noinitials %]
235 [% IF ( mandatoryinitials ) %]
236 <label for="initials" class="required">
238 <label for="initials">
241 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
242 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
246 [% UNLESS noothernames %]
248 [% IF ( mandatoryothernames ) %]
249 <label for="othernames" class="required">
251 <label for="othernames">
254 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
255 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
256 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
263 [% UNLESS ( opduplicate ) %]
265 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
267 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
270 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
272 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
275 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
277 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
280 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
281 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
282 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
290 [% END # hide fieldset %]
292 [% IF ( showguarantor ) %]
293 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
295 <input type="hidden" name="branchcode" value="[% branchcode %]" />
297 <fieldset id="memberentry_guarantor" class="rows">
298 <legend id="guarantor_lgd">Guarantor information</legend>
301 [% IF ( guarantorid ) %]
302 <li id="contact-details">
304 <li id="contact-details" style="display: none">
306 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
309 <label for="contactname">Organization name: </label>
310 [% IF ( guarantorid ) %]
311 <span>[% contactname %]</span>
312 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
314 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
319 [% IF ( guarantorid ) %]
320 <li id="contact-details">
322 <li id="contact-details" style="display: none">
324 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
326 [% UNLESS nocontactname %]
328 <label for="contactname">Surname: </label>
329 [% IF ( guarantorid ) %]
330 <span>[% contactname %]</span>
331 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
333 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
337 [% UNLESS nocontactfirstname %]
339 <label for="contactfirstname">First name: </label>
340 [% IF ( guarantorid ) %]
341 <span>[% contactfirstname %]</span>
342 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
344 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
348 [% IF ( relshiploop ) %]
350 <label for="relationship">Relationship: </label>
351 <select name="relationship" id="relationship" >
352 [% FOREACH relshiploo IN relshiploop %]
353 [% IF ( relshiploo.selected ) %]
354 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
356 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
365 <span class="label"> </span>
366 [% IF ( guarantorid ) %]
367 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
369 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
371 <input id="guarantordelete" type="button" value="Delete" />
373 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
375 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
376 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
377 [% IF privacy_guarantor_checkouts %]
378 <option value="0">No</option>
379 <option value="1" selected>Yes</option>
381 <option value="0" selected>No</option>
382 <option value="1">Yes</option>
385 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
392 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
393 [% IF Koha.Preference( 'AddressFormat' ) %]
394 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
396 [% INCLUDE 'member-main-address-style-us.inc' %]
398 [% END # nostreet && nocity etc group%]
400 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
401 <fieldset class="rows" id="memberentry_contact">
402 <legend id="contact_lgd">Contact</legend><ol>
405 [% IF ( mandatoryphone ) %]
406 <label for="phone" class="required">
410 Primary phone: </label>
411 <input type="text" id="phone" name="phone" value="[% phone %]" />
412 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
416 [% UNLESS nophonepro %]
418 [% IF ( mandatoryphonepro ) %]
419 <label for="phonepro" class="required">
421 <label for="phonepro">
423 Secondary phone: </label>
424 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
425 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
428 [% UNLESS nomobile %]
430 [% IF ( mandatorymobile ) %]
431 <label for="mobile" class="required">
435 Other phone: </label>
436 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
437 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
442 [% IF ( mandatoryemail ) %]
443 <label for="email" class="required">
447 Primary email: </label>
448 <input type="text" id="email" name="email" size="45" value="[% email %]" />
449 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
453 [% UNLESS noemailpro %]
455 [% IF ( mandatoryemailpro ) %]
456 <label for="emailpro" class="required">
458 <label for="emailpro">
460 Secondary email: </label>
461 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
462 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
467 [% IF ( mandatoryfax ) %]
468 <label for="fax" class="required">
473 <input type="text" id="fax" name="fax" value="[% fax %]" />
474 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
479 [%END # hide fieldset %]
481 <!-- ************************ STEP_1 *********************** -->
485 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
486 [% IF Koha.Preference( 'AddressFormat' ) %]
487 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
489 [% INCLUDE 'member-alt-address-style-us.inc' %]
491 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
494 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
495 [% IF Koha.Preference( 'AddressFormat' ) %]
496 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
498 [% INCLUDE 'member-alt-contact-style-us.inc' %]
500 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
505 <fieldset class="rows" id="memberentry_library_management">
506 <legend id="library_management_lgd">Library management</legend><ol>
507 [% UNLESS nocardnumber %]
509 [% IF ( mandatorycardnumber ) %]
510 <label for="cardnumber" class="required">
512 <label for="cardnumber" class="validated">
514 Card number: </label>
515 [% IF minlength_cardnumber == maxlength_cardnumber %]
516 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
517 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
518 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
519 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
520 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
521 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
522 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
523 [% ELSIF maxlength_cardnumber %]
524 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
525 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
526 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
528 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
529 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
530 <div class="hint">There is no minimum or maximum character length.</div>
534 [% UNLESS nobranchcode %]
536 <label for="libraries" class="required">Library:</label>
537 <select name="branchcode" size="1" id="libraries">
538 [%- FOREACH branchloo IN branchloop %]
539 [% IF ( branchloo.selected ) -%]
540 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
542 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
546 <span class="required">Required</span>
550 <label for="categorycode_entry" class="required">Category: </label>
551 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
552 [% FOREACH typeloo IN typeloop %]
553 [% FOREACH categoryloo IN typeloo.categoryloop %]
554 [% IF ( loop.first ) %]
555 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
556 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
557 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
558 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
559 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
560 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
562 [% IF ( categoryloo.categorycodeselected ) %]
563 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
565 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
567 [% IF ( loop.last ) %]
573 <span class="required">Required</span>
577 [% IF ( mandatorysort1 ) %]
578 <label for="sort1" class="required">
583 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
584 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
589 [% IF ( mandatorysort2 ) %]
590 <label for="sort2" class="required">
595 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
596 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
599 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
601 <label for="sort2">Sync with the Norwegian national patron database:</label>
602 [% IF ( sync == 0 ) %]
603 <input type="radio" id="sync" name="sync" value="1"> Yes
604 <input type="radio" id="sync" name="sync" value="0" checked> No
606 <input type="radio" id="sync" name="sync" value="1" checked> Yes
607 <input type="radio" id="sync" name="sync" value="0"> No
613 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
614 <fieldset class="rows" id="memberentry_subscription">
615 <legend id="library_setup_lgd">Library set-up</legend><ol>
616 [% UNLESS nodateenrolled %]
618 [% IF ( mandatorydateenrolled ) %]
619 <label for="from" class="required">
623 Registration date: </label>
624 [% IF ( dateformat == "metric" ) %]
625 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
627 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
629 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
630 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
631 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
634 [% UNLESS nodateexpiry %]
637 <li style="display:none">
639 [% IF ( mandatorydateexpiry ) %]
640 <label for="to" class="required">
644 Expiry date (leave blank for auto calc): </label>
645 [% IF ( dateformat == "metric" ) %]
646 [% UNLESS ( opadd ) %]
647 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
649 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
652 [% UNLESS ( opadd ) %]
653 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
655 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
658 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
659 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
660 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
662 [% UNLESS noopacnote %]
664 [% IF ( mandatoryopacnote ) %]
665 <label for="opacnote" class="required">
667 <label for="opacnote">
670 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
671 <div class="hint">This message appears on this patron's user page in the OPAC</div>
672 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
675 [% UNLESS noborrowernotes %]
677 [% IF ( mandatoryborrowernotes ) %]
678 <label for="borrowernotes" class="required">
680 <label for="borrowernotes">
682 Circulation note: </label>
683 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
684 <div class="hint">This message displays when checking out to this patron</div>
685 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
690 [% END # hide fieldset %]
692 [% UNLESS nouserid && nopassword %]
693 <fieldset class="rows" id="memberentry_userid">
694 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
695 [% UNLESS nouserid %]
697 [% IF ( mandatoryuserid ) %]
698 <label for="userid" class="required">
704 [% IF ( NoUpdateLogin ) %]
705 [% IF ( opduplicate ) %]
706 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
708 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
711 [% IF ( opduplicate ) %]
712 <input type="text" id="userid" name="userid" size="20" value="" />
714 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
718 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
719 <input type="text" disabled="disabled" style="display:none" />
721 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
724 [% UNLESS nopassword %]
726 [% IF ( mandatorypassword ) %]
727 <label for="password" class="required">
729 <label for="password">
733 [% IF ( NoUpdateLogin ) %]
734 [% IF ( opduplicate ) %]
735 <input type="password" id="password" name="password" size="20" disabled="disabled" />
737 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
740 [% IF ( opduplicate ) %]
741 <input type="password" id="password" name="password" size="20" />
743 <input type="password" id="password" name="password" size="20" value="[% password %]" />
747 [% IF ( password ) %]
748 [% IF ( NoUpdateLogin ) %]
749 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
751 [% IF ( opduplicate ) %]
752 <input type="password" id="password" name="password" size="20" />
754 <input type="password" id="password" name="password" size="20" value="****" />
758 [% IF ( NoUpdateLogin ) %]
759 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
761 <input type="password" id="password" name="password" size="20" value="" />
765 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
766 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
769 [% IF ( mandatorypassword ) %]
770 <label for="password2" class="required">
772 <label for="password2">
774 Confirm password: </label>
776 [% IF ( NoUpdateLogin ) %]
777 [% IF ( opduplicate ) %]
778 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
780 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
783 [% IF ( opduplicate ) %]
784 <input type="password" id="password2" name="password2" size="20" />
786 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
790 [% IF ( password ) %]
791 [% IF ( NoUpdateLogin ) %]
792 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
794 [% IF ( opduplicate ) %]
795 <input type="password" id="password2" name="password2" size="20" />
797 <input type="password" id="password2" name="password2" size="20" value="****" />
801 [% IF ( NoUpdateLogin ) %]
802 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
804 <input type="password" id="password2" name="password2" size="20" value="" />
808 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
812 [% END # hide fieldset %][% END %]
813 <!--this zones are not necessary in modif mode -->
814 [% UNLESS ( opadd || opduplicate ) %]
815 <fieldset class="rows" id="memberentry_account_flags">
816 <legend id="account_flags_lgd">Patron account flags</legend>
818 [% FOREACH flagloo IN flagloop %]
819 <li><label class="radio" for="yes[% flagloo.name %]">
820 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
821 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
823 [% IF CAN_user_circulate_manage_restrictions %]
824 <label for="yes[% flagloo.name %]">Yes </label>
825 [% IF ( flagloo.yes ) %]
826 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
828 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
830 <label for="no[% flagloo.name %]">No </label>
831 [% IF ( flagloo.no ) %]
832 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
834 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
837 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
846 <fieldset class="rows" id="memberentry_restrictions">
847 <legend id="restrictions_lgd">Patron restrictions</legend>
849 [% IF ( debarments ) %]
856 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
863 [% FOREACH d IN debarments %]
865 <td>[% d.type %]</td>
866 <td>[% d.comment %]</td>
867 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
868 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
870 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
878 <p>Patron is currently unrestricted.</p>
881 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
882 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
883 <fieldset id="manual_restriction_form">
884 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
885 <legend id="manual_restriction_lgd">Add manual restriction</legend>
887 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
888 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" readonly="readonly" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
889 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
893 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
902 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
903 <fieldset class="rows" id="memberentry_patron_attributes">
904 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
905 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
906 [% FOREACH pa_loo IN patron_attributes %]
907 [% IF pa_loo.class %]
908 <fieldset id="aai_[% pa_loo.class %]">
909 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
911 <ol class="attributes_table">
912 [% FOREACH patron_attribute IN pa_loo.items %]
913 <li data-category_code="[% patron_attribute.category_code %]">
914 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
915 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
916 [% IF ( patron_attribute.use_dropdown ) %]
917 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
918 <option value=""></option>
919 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
920 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
921 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
922 [% auth_val_loo.lib %]
925 <option value="[% auth_val_loo.authorised_value %]" >
926 [% auth_val_loo.lib %]
932 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
934 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
935 [% IF ( patron_attribute.repeatable ) %]
936 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
941 [% IF pa_loo.class %]</fieldset>[% END %]
944 [% END %][% END %][% END %]
946 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
947 <fieldset class="rows" id="memberentry_messaging_prefs">
948 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
950 <!-- handle changing prefs if creating new patron and changing
953 <script type="text/javascript">//<![CDATA[
954 $(document).ready(function(){
955 var message_prefs_dirty = false;
956 $('#memberentry_messaging_prefs > *').change(function() {
957 message_prefs_dirty = true;
959 $('#categorycode_entry').change(function() {
960 var categorycode = $(this).val();
961 if (message_prefs_dirty) {
962 if (!confirm(_("Change messaging preferences to default for this category?"))) {
966 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
968 $.each(data.messaging_preferences, function(i, item) {
969 var attrid = item.message_attribute_id;
970 var transports = ['email', 'rss', 'sms'];
971 $.each(transports, function(j, transport) {
972 if (item['transports_' + transport] == 1) {
973 $('#' + transport + attrid).prop('checked', true);
975 $('#' + transport + attrid).prop('checked', false);
978 if (item.digest && item.digest != ' ') {
979 $('#digest' + attrid).prop('checked', true);
981 $('#digest' + attrid).prop('checked', false);
983 if (item.takes_days == '1') {
984 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
987 message_prefs_dirty = false;
995 <input type="hidden" name="setting_messaging_prefs" value="1" />
996 [% INCLUDE 'messaging-preference-form.inc' %]
997 [% IF ( SMSSendDriver ) %]
998 <p><label for="SMSnumber">SMS number:</label>
999 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1002 <label for="sms_provider_id">SMS provider:</label>
1003 <select id="sms_provider_id" name="sms_provider_id"/>
1004 <option value="">Unknown</option>
1005 [% FOREACH s IN sms_providers %]
1006 [% IF s.id == sms_provider_id %]
1007 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1009 <option value="[% s.id %]">[% s.name %]</option>
1018 <fieldset class="rows" id="floating-save">
1019 [% UNLESS ( check_member ) %]
1020 <fieldset class="action">
1021 <button type="submit" name="save" onclick="return check_form_borrowers();">
1022 <i class="fa fa-save"></i> Save
1025 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1027 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1037 [% UNLESS ( opadd ) %]<div class="yui-b">
1038 [% INCLUDE 'members-menu.inc' %]
1042 [% INCLUDE 'intranet-bottom.inc' %]