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() {
12 update_category_code( "[% categorycode %]" );
14 if ( $("#categorycode_entry").length > 0 ){
15 var category_code = $("#categorycode_entry").find("option:selected").val();
16 update_category_code( category_code );
21 var MSG_SEPARATOR = _("Separator must be / in field %s");
22 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
23 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
24 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
25 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
26 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
27 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
28 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
29 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
30 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
31 var LABEL_CHANGE = _("Change");
32 var LABEL_SET_TO_PATRON = _("Set to patron");
35 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
37 <body id="pat_memberentrygen" class="pat">
38 [% INCLUDE 'header.inc' %]
39 [% INCLUDE 'patron-search.inc' %]
41 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
42 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
43 <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>
45 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
51 [% IF ( error_alert == "no_email" ) %]
52 <div class="error">This member has no email</div>
54 <div class="error">[% error_alert %]</div>
58 <div class="dialog message">Email has been sent.</div>
61 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
62 [% 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 %]
63 [% 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 %]
65 [% UNLESS ( no_add ) %]
66 <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>
68 [% IF ( check_member ) %]
69 <div class="dialog alert">
70 <h3>Duplicate patron record?</h3>
71 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');" >View existing record</a></p>
72 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
73 <input type="hidden" name="op" value="modify" />
74 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
75 <input class="edit" type="submit" value="It is a duplicate. Edit existing record" />
78 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
79 <input type="hidden" name="nodouble" value="1" />
80 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
85 <div class="dialog alert">
86 <p>The following fields are wrong. Please fix them.</p>
88 [% IF ( ERROR_login_exist ) %]
89 <li id="ERROR_login_exist">Username/password already exists.</li>
91 [% IF ERROR_cardnumber_already_exists %]
92 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
94 [% IF ERROR_cardnumber_length %]
95 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
97 [% IF ( ERROR_age_limitations ) %]
98 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
99 Ages allowed are [% age_low %]-[% age_high %].</li>
101 [% IF ( ERROR_branch ) %]
102 <li id="ERROR_branch">Library is invalid.</li>
104 [% IF ( ERROR_dateofbirth ) %]
105 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
107 [% IF ( ERROR_dateenrolled ) %]
108 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
110 [% IF ( ERROR_dateexpiry ) %]
111 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
113 [% IF ( ERROR_short_password ) %]
114 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
116 [% IF ( ERROR_password_mismatch ) %]
117 <li id="ERROR_password_mismatch">Passwords do not match.</li>
119 [% IF ( ERROR_extended_unique_id_failed ) %]
120 <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]</strong> attribute value <i>[% ERROR_extended_unique_id_failed_value %]</i> is already in use by another patron record.</li>
122 [% IF ERROR_bad_email %]
123 <li id="ERROR_bad_email">The primary email is invalid.</li>
125 [% IF ERROR_bad_email_secondary %]
126 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
128 [% IF ERROR_bad_email_alternative %]
129 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
136 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
137 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
138 <!-- field always hidden in different form (1,2,3) -->
139 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
140 <input type="hidden" name="category_type" value="[% category_type %]" />
141 <input type="hidden" name="updtype" value="[% updtype %]" />
142 <input type="hidden" name="destination" value="[% destination %]" />
143 <input type="hidden" name="check_member" value="[% check_member %]" />
144 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
145 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
146 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
147 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
148 [% ELSIF ( opduplicate ) %]
149 <input type="hidden" name="op" value="insert" />
151 <input type="hidden" name="op" value="save" />
152 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
153 [%# Only put the cardnumber if we arent showing it in the form later %]
155 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
161 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
162 <fieldset class="rows" id="memberentry_identity">
163 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
167 [% IF ( title_cgipopup ) %]
169 [% IF ( mandatorytitle ) %]
170 <label for="btitle" class="required">
175 [% borrotitlepopup %]
176 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
181 [% UNLESS nosurname %]
183 [% IF ( mandatorysurname ) %]
184 <label for="surname" class="required">
186 <label for="surname">
189 [% IF ( uppercasesurnames ) %]
190 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
192 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
194 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
198 [% UNLESS nofirstname %]
200 [% IF ( mandatoryfirstname ) %]
201 <label for="firstname" class="required">
203 <label for="firstname">
206 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
207 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
210 [% UNLESS nodateofbirth %]
212 [% IF ( mandatorydateofbirth ) %]
213 <label for="dateofbirth" class="required">
215 <label for="dateofbirth">
217 Date of birth: </label>
219 [% IF ( dateformat == "metric" ) %]
220 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
222 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
225 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
226 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
227 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
230 [% UNLESS noinitials %]
232 [% IF ( mandatoryinitials ) %]
233 <label for="initials" class="required">
235 <label for="initials">
238 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
239 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
243 [% UNLESS noothernames %]
245 [% IF ( mandatoryothernames ) %]
246 <label for="othernames" class="required">
248 <label for="othernames">
251 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
252 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
253 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
260 [% UNLESS ( opduplicate ) %]
262 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
264 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
267 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
269 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
272 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
274 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
277 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
278 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
279 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
287 [% END # hide fieldset %]
289 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
290 <fieldset class="rows">
291 <legend>Guarantor information</legend>
294 [% IF ( guarantorid ) %]
295 <li id="contact-details">
297 <li id="contact-details" style="display: none">
299 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
302 <label for="contactname">Organization name: </label>
303 [% IF ( guarantorid ) %]
304 <span>[% contactname %]</span>
305 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
307 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
312 [% IF ( guarantorid ) %]
313 <li id="contact-details">
315 <li id="contact-details" style="display: none">
317 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
319 [% UNLESS nocontactname %]
321 <label for="contactname">Surname: </label>
322 [% IF ( guarantorid ) %]
323 <span>[% contactname %]</span>
324 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
326 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
330 [% UNLESS nocontactfirstname %]
332 <label for="contactfirstname">First name: </label>
333 [% IF ( guarantorid ) %]
334 <span>[% contactfirstname %]</span>
335 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
337 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
341 [% IF ( relshiploop ) %]
343 <label for="relationship">Relationship: </label>
344 <select name="relationship" id="relationship" >
345 [% FOREACH relshiploo IN relshiploop %]
346 [% IF ( relshiploo.selected ) %]
347 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
349 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
358 <span class="label"> </span>
359 [% IF ( guarantorid ) %]
360 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
362 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
364 <input id="guarantordelete" type="button" value="Delete" />
366 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
368 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
369 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
370 [% IF privacy_guarantor_checkouts %]
371 <option value="0">No</option>
372 <option value="1" selected>Yes</option>
374 <option value="0" selected>No</option>
375 <option value="1">Yes</option>
378 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
385 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
386 [% IF Koha.Preference( 'AddressFormat' ) %]
387 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
389 [% INCLUDE 'member-main-address-style-us.inc' %]
391 [% END # nostreet && nocity etc group%]
393 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
394 <fieldset class="rows" id="memberentry_contact">
395 <legend id="contact_lgd">Contact</legend><ol>
398 [% IF ( mandatoryphone ) %]
399 <label for="phone" class="required">
403 Primary phone: </label>
404 <input type="text" id="phone" name="phone" value="[% phone %]" />
405 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
409 [% UNLESS nophonepro %]
411 [% IF ( mandatoryphonepro ) %]
412 <label for="phonepro" class="required">
414 <label for="phonepro">
416 Secondary phone: </label>
417 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
418 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
421 [% UNLESS nomobile %]
423 [% IF ( mandatorymobile ) %]
424 <label for="mobile" class="required">
428 Other phone: </label>
429 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
430 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
435 [% IF ( mandatoryemail ) %]
436 <label for="email" class="required">
440 Primary email: </label>
441 <input type="text" id="email" name="email" size="45" value="[% email %]" />
442 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
446 [% UNLESS noemailpro %]
448 [% IF ( mandatoryemailpro ) %]
449 <label for="emailpro" class="required">
451 <label for="emailpro">
453 Secondary email: </label>
454 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
455 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
460 [% IF ( mandatoryfax ) %]
461 <label for="fax" class="required">
466 <input type="text" id="fax" name="fax" value="[% fax %]" />
467 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
472 [%END # hide fieldset %]
474 <!-- ************************ STEP_1 *********************** -->
478 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
479 [% IF Koha.Preference( 'AddressFormat' ) %]
480 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
482 [% INCLUDE 'member-alt-address-style-us.inc' %]
484 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
487 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
488 [% IF Koha.Preference( 'AddressFormat' ) %]
489 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
491 [% INCLUDE 'member-alt-contact-style-us.inc' %]
493 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
498 <fieldset class="rows" id="memberentry_library_management">
499 <legend id="library_management_lgd">Library management</legend><ol>
500 [% UNLESS nocardnumber %]
502 [% IF ( mandatorycardnumber ) %]
503 <label for="cardnumber" class="required">
505 <label for="cardnumber" class="validated">
507 Card number: </label>
508 [% IF minlength_cardnumber == maxlength_cardnumber %]
509 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
510 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
511 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
512 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
513 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
514 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
515 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
516 [% ELSIF maxlength_cardnumber %]
517 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
518 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
519 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
521 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
522 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
523 <div class="hint">There is no minimum or maximum character length.</div>
527 [% UNLESS nobranchcode %]
529 <label for="libraries" class="required">Library:</label>
530 <select name="branchcode" size="1" id="libraries">
531 [%- FOREACH branchloo IN branchloop %]
532 [% IF ( branchloo.selected ) -%]
533 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
535 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
539 <span class="required">Required</span>
543 <label for="categorycode_entry" class="required">Category: </label>
544 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
545 [% FOREACH typeloo IN typeloop %]
546 [% FOREACH categoryloo IN typeloo.categoryloop %]
547 [% IF ( loop.first ) %]
548 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
549 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
550 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
551 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
552 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
553 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
555 [% IF ( categoryloo.categorycodeselected ) %]
556 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
558 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
560 [% IF ( loop.last ) %]
566 <span class="required">Required</span>
570 [% IF ( mandatorysort1 ) %]
571 <label for="sort1" class="required">
576 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
577 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
582 [% IF ( mandatorysort2 ) %]
583 <label for="sort2" class="required">
588 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
589 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
592 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
594 <label for="sort2">Sync with the Norwegian national patron database:</label>
595 [% IF ( sync == 0 ) %]
596 <input type="radio" id="sync" name="sync" value="1"> Yes
597 <input type="radio" id="sync" name="sync" value="0" checked> No
599 <input type="radio" id="sync" name="sync" value="1" checked> Yes
600 <input type="radio" id="sync" name="sync" value="0"> No
606 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
607 <fieldset class="rows" id="memberentry_subscription">
608 <legend id="library_setup_lgd">Library set-up</legend><ol>
609 [% UNLESS nodateenrolled %]
611 [% IF ( mandatorydateenrolled ) %]
612 <label for="from" class="required">
616 Registration date: </label>
617 [% IF ( dateformat == "metric" ) %]
618 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
620 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
622 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
623 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
624 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
627 [% UNLESS nodateexpiry %]
630 <li style="display:none">
632 [% IF ( mandatorydateexpiry ) %]
633 <label for="to" class="required">
637 Expiry date (leave blank for auto calc) </label>
638 [% IF ( dateformat == "metric" ) %]
639 [% UNLESS ( opadd ) %]
640 <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" />
642 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
645 [% UNLESS ( opadd ) %]
646 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
648 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
651 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
652 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
653 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
655 [% UNLESS noopacnote %]
657 [% IF ( mandatoryopacnote ) %]
658 <label for="opacnote" class="required">
660 <label for="opacnote">
663 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
664 <div class="hint">This message appears on this patron's user page in the OPAC</div>
665 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
668 [% UNLESS noborrowernotes %]
670 [% IF ( mandatoryborrowernotes ) %]
671 <label for="borrowernotes" class="required">
673 <label for="borrowernotes">
675 Circulation note: </label>
676 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
677 <div class="hint">This message displays when checking out to this patron</div>
678 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
683 [% END # hide fieldset %]
685 [% UNLESS nouserid && nopassword %]
686 <fieldset class="rows" id="memberentry_userid">
687 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
688 [% UNLESS nouserid %]
690 [% IF ( mandatoryuserid ) %]
691 <label for="userid" class="required">
697 [% IF ( NoUpdateLogin ) %]
698 [% IF ( opduplicate ) %]
699 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
701 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
704 [% IF ( opduplicate ) %]
705 <input type="text" id="userid" name="userid" size="20" value="" />
707 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
711 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
712 <input type="text" disabled="disabled" style="display:none" />
714 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
717 [% UNLESS nopassword %]
719 [% IF ( mandatorypassword ) %]
720 <label for="password" class="required">
722 <label for="password">
726 [% IF ( NoUpdateLogin ) %]
727 [% IF ( opduplicate ) %]
728 <input type="password" id="password" name="password" size="20" disabled="disabled" />
730 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
733 [% IF ( opduplicate ) %]
734 <input type="password" id="password" name="password" size="20" />
736 <input type="password" id="password" name="password" size="20" value="[% password %]" />
740 [% IF ( password ) %]
741 [% IF ( NoUpdateLogin ) %]
742 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
744 [% IF ( opduplicate ) %]
745 <input type="password" id="password" name="password" size="20" />
747 <input type="password" id="password" name="password" size="20" value="****" />
751 [% IF ( NoUpdateLogin ) %]
752 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
754 <input type="password" id="password" name="password" size="20" value="" />
758 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
759 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
762 [% IF ( mandatorypassword ) %]
763 <label for="password2" class="required">
765 <label for="password2">
767 Confirm password: </label>
769 [% IF ( NoUpdateLogin ) %]
770 [% IF ( opduplicate ) %]
771 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
773 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
776 [% IF ( opduplicate ) %]
777 <input type="password" id="password2" name="password2" size="20" />
779 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
783 [% IF ( password ) %]
784 [% IF ( NoUpdateLogin ) %]
785 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
787 [% IF ( opduplicate ) %]
788 <input type="password" id="password2" name="password2" size="20" />
790 <input type="password" id="password2" name="password2" size="20" value="****" />
794 [% IF ( NoUpdateLogin ) %]
795 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
797 <input type="password" id="password2" name="password2" size="20" value="" />
801 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
805 [% END # hide fieldset %][% END %]
806 <!--this zones are not necessary in modif mode -->
807 [% UNLESS ( opadd || opduplicate ) %]
808 <fieldset class="rows">
809 <legend>Patron account flags</legend>
811 [% FOREACH flagloo IN flagloop %]
812 <li><label class="radio" for="yes[% flagloo.name %]">
813 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
814 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
816 [% IF CAN_user_circulate_manage_restrictions %]
817 <label for="yes[% flagloo.name %]">Yes </label>
818 [% IF ( flagloo.yes ) %]
819 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
821 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
823 <label for="no[% flagloo.name %]">No </label>
824 [% IF ( flagloo.no ) %]
825 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
827 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
830 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
839 <fieldset class="rows">
840 <legend>Patron restrictions</legend>
842 [% IF ( debarments ) %]
849 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
856 [% FOREACH d IN debarments %]
858 <td>[% d.type %]</td>
859 <td>[% d.comment %]</td>
860 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
861 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
863 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
871 <p>Patron is currently unrestricted.</p>
874 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
875 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
876 <fieldset id="manual_restriction_form">
877 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
878 <legend>Add manual restriction</legend>
880 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
881 <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);" />
882 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
886 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
895 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
896 <fieldset class="rows" id="memberentry_patron_attributes">
897 <legend>Additional attributes and identifiers</legend>
898 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
899 [% FOREACH pa_loo IN patron_attributes %]
900 [% IF pa_loo.class %]
901 <fieldset id="aai_[% pa_loo.class %]">
902 <legend>[% pa_loo.lib %]</legend>
904 <ol class="attributes_table">
905 [% FOREACH patron_attribute IN pa_loo.items %]
906 <li data-category_code="[% patron_attribute.category_code %]">
907 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
908 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
909 [% IF ( patron_attribute.use_dropdown ) %]
910 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
911 <option value=""></option>
912 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
913 [% IF ( auth_val_loo.selected ) %]
914 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
915 [% auth_val_loo.lib %]
918 <option value="[% auth_val_loo.authorised_value %]" >
919 [% auth_val_loo.lib %]
925 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
927 [% IF ( patron_attribute.password_allowed ) %]
928 (<label class="yesno" for="[% patron_attribute.form_id %]_password">Password:</label> <input type="password" maxlength="64" value="[% patron_attribute.password %]"
929 id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
931 <a href="#" class="clear-field" onclick="clear_entry(this); return false;">Clear</a>
932 [% IF ( patron_attribute.repeatable ) %]
933 <a href="#" class="clone-field" onclick="clone_entry(this); return false;">New</a>
938 [% IF pa_loo.class %]</fieldset>[% END %]
941 [% END %][% END %][% END %]
943 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
944 <fieldset class="rows" id="memberentry_messaging_prefs">
945 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
947 <!-- handle changing prefs if creating new patron and changing
950 <script type="text/javascript">//<![CDATA[
951 $(document).ready(function(){
952 var message_prefs_dirty = false;
953 $('#memberentry_messaging_prefs > *').change(function() {
954 message_prefs_dirty = true;
956 $('#categorycode_entry').change(function() {
957 var categorycode = $(this).val();
958 if (message_prefs_dirty) {
959 if (!confirm(_("Change messaging preferences to default for this category?"))) {
963 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
965 $.each(data.messaging_preferences, function(i, item) {
966 var attrid = item.message_attribute_id;
967 var transports = ['email', 'rss', 'sms'];
968 $.each(transports, function(j, transport) {
969 if (item['transports_' + transport] == 1) {
970 $('#' + transport + attrid).attr('checked', 'checked');
972 $('#' + transport + attrid).removeAttr('checked');
975 if (item.digest && item.digest != ' ') {
976 $('#digest' + attrid).attr('checked', item.digest);
978 $('#digest' + attrid).removeAttr('checked');
980 if (item.takes_days == '1') {
981 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
984 message_prefs_dirty = false;
992 <input type="hidden" name="setting_messaging_prefs" value="1" />
993 [% INCLUDE 'messaging-preference-form.inc' %]
994 [% IF ( SMSSendDriver ) %]
995 <p><label for="SMSnumber">SMS number:</label>
996 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
999 <label for="sms_provider_id">SMS provider:</label>
1000 <select id="sms_provider_id" name="sms_provider_id"/>
1001 <option value="">Unknown</option>
1002 [% FOREACH s IN sms_providers %]
1003 [% IF s.id == sms_provider_id %]
1004 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1006 <option value="[% s.id %]">[% s.name %]</option>
1015 [% UNLESS ( check_member ) %]
1016 <fieldset class="action">
1017 <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1019 <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1021 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1030 [% UNLESS ( opadd ) %]<div class="yui-b">
1031 [% INCLUDE 'members-menu.inc' %]
1035 [% INCLUDE 'intranet-bottom.inc' %]