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 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
7 [% INCLUDE 'calendar.inc' %]
8 <script type="text/javascript">
10 $(document).ready(function() {
12 var original_offset = $("#toolbar").position().top;
13 var additional_height = $("#filters").height();
14 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
15 $("#filteraction_on").on("click", function(){
16 $(window).off('scroll');
17 $("#toolbar").css({ top: original_offset });
18 $('#toolbar').fixFloat({ 'originalOffset': original_offset });
20 $("#filteraction_off").on("click", function(){
21 $(window).off('scroll');
22 $("#toolbar").css({ top: original_offset - additional_height});
23 $('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
27 update_category_code( "[% categorycode %]" );
29 if ( $("#categorycode_entry").length > 0 ){
30 var category_code = $("#categorycode_entry").find("option:selected").val();
31 update_category_code( category_code );
36 var MSG_SEPARATOR = _("Separator must be / in field %s");
37 var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
38 var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
39 var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
40 var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
41 var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
42 var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
43 var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
44 var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
45 var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
46 var MSG_MONTH = _("%s month")
47 var MSG_MONTHS = _("%s months")
48 var MSG_YEAR = _("%s year")
49 var MSG_YEARS = _("%s years")
50 var LABEL_CHANGE = _("Change");
51 var LABEL_SET_TO_PATRON = _("Set to patron");
52 var LABEL_AGE = _("Age");
56 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>
58 <body id="pat_memberentrygen" class="pat">
59 [% INCLUDE 'header.inc' %]
60 [% INCLUDE 'patron-search.inc' %]
62 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
63 [% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %]
64 <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>
66 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
72 [% IF ( error_alert == "no_email" ) %]
73 <div class="error">This member has no email</div>
75 <div class="error">[% error_alert %]</div>
79 <div class="dialog message">Email has been sent.</div>
82 [% INCLUDE 'noadd-warnings.inc' %]
84 [% UNLESS ( no_add ) %]
85 <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>
87 [% IF ( check_member ) %]
88 <div class="dialog alert">
89 <h3>Duplicate patron record?</h3>
90 <p><a class="popup" href="#" onclick="Dopop('moremember.pl?print=brief&borrowernumber=[% check_member %]');return false;" >View existing record</a></p>
91 <form action="/cgi-bin/koha/members/memberentry.pl" method="get">
92 <input type="hidden" name="op" value="modify" />
93 <input type="hidden" name="borrowernumber" value="[% check_member %]" />
94 <button type="submit" class="new"><i class="fa fa-pencil"></i> It is a duplicate.
95 Edit existing record</button>
98 <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
99 <input type="hidden" name="nodouble" value="1" />
100 <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate.
101 Save as new record</button>
106 <div class="dialog alert">
107 <p>The following fields are wrong. Please fix them.</p>
109 [% IF ( ERROR_login_exist ) %]
110 <li id="ERROR_login_exist">Username/password already exists.</li>
112 [% IF ERROR_cardnumber_already_exists %]
113 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
115 [% IF ERROR_cardnumber_length %]
116 <li id="ERROR_cardnumber">Cardnumber length is incorrect.</li>
118 [% IF ( ERROR_age_limitations ) %]
119 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.
120 Ages allowed are [% age_low %]-[% age_high %].</li>
122 [% IF ( ERROR_branch ) %]
123 <li id="ERROR_branch">Library is invalid.</li>
125 [% IF ( ERROR_dateofbirth ) %]
126 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
128 [% IF ( ERROR_dateenrolled ) %]
129 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
131 [% IF ( ERROR_dateexpiry ) %]
132 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
134 [% IF ( ERROR_short_password ) %]
135 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
137 [% IF ( ERROR_password_mismatch ) %]
138 <li id="ERROR_password_mismatch">Passwords do not match.</li>
140 [% IF ( ERROR_extended_unique_id_failed ) %]
141 <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>
143 [% IF ERROR_bad_email %]
144 <li id="ERROR_bad_email">The primary email is invalid.</li>
146 [% IF ERROR_bad_email_secondary %]
147 <li id="ERROR_bad_email_secondary">The secondary email is invalid.</li>
149 [% IF ERROR_bad_email_alternative %]
150 <li id="ERROR_bad_email_alternative">The alternative email is invalid.</li>
157 [% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
158 <input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %]
159 <!-- field always hidden in different form (1,2,3) -->
160 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
161 <input type="hidden" name="category_type" value="[% category_type %]" />
162 <input type="hidden" name="updtype" value="[% updtype %]" />
163 <input type="hidden" name="destination" value="[% destination %]" />
164 <input type="hidden" name="check_member" value="[% check_member %]" />
165 <input type="hidden" name="borrowernumber" value="[% UNLESS opduplicate %][% borrowernumber %][% END %]" />
166 <input type="hidden" name="nodouble" value="[% UNLESS opduplicate %][% nodouble %][% END %]" />
167 [% IF ( step ) %]<input type="hidden" name="step" value="[% step %]" />[% END %]
168 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
169 [% ELSIF ( opduplicate ) %]
170 <input type="hidden" name="op" value="insert" />
172 <input type="hidden" name="op" value="save" />
173 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
174 [%# Only put the cardnumber if we arent showing it in the form later %]
176 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
180 <div id="toolbar" class="btn-toolbar">
181 [% UNLESS ( check_member ) %]
182 <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();"><i class="fa fa-save"></i> Save</button>
184 <a class="btn btn-small" href="/cgi-bin/koha/members/member.pl">
186 <a class="btn btn-small" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
188 <i class="fa fa-times"></i> Cancel
194 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
195 <fieldset class="rows" id="memberentry_identity">
196 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
200 [% IF Koha.Preference('BorrowersTitles') %]
202 [% IF ( mandatorytitle ) %]
203 <label for="btitle" class="required">
208 <select id="btitle" name="title">
209 <option value=""></option>
210 [% FOREACH t IN Koha.Preference('BorrowersTitles').split('\|') %]
212 <option value="[% t %]" selected="selected">[% t %]</option>
214 <option value="[% t %]">[% t %]</option>
218 [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
223 [% UNLESS nosurname %]
225 [% IF ( mandatorysurname ) %]
226 <label for="surname" class="required">
228 <label for="surname">
231 [% IF ( uppercasesurnames ) %]
232 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" />
234 <input type="text" id="surname" name="surname" size="20" value="[% surname %]" />
236 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
240 [% UNLESS nofirstname %]
242 [% IF ( mandatoryfirstname ) %]
243 <label for="firstname" class="required">
245 <label for="firstname">
248 <input type="text" id="firstname" name="firstname" size="20" value="[% UNLESS opduplicate %][% firstname %][% END %]" />
249 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
252 [% UNLESS nodateofbirth %]
254 [% IF ( mandatorydateofbirth ) %]
255 <label for="dateofbirth" class="required">
257 <label for="dateofbirth">
259 Date of birth: </label>
261 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="write_age();" value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" />
263 [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
264 [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
265 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
268 [% UNLESS noinitials %]
270 [% IF ( mandatoryinitials ) %]
271 <label for="initials" class="required">
273 <label for="initials">
276 <input type="text" id="initials" name="initials" size="20" value="[% UNLESS opduplicate %][% initials %][% END %]" />
277 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
281 [% UNLESS noothernames %]
283 [% IF ( mandatoryothernames ) %]
284 <label for="othernames" class="required">
286 <label for="othernames">
289 <input type="text" id="othernames" name="othernames" size="20" value="[% UNLESS opduplicate %][% othernames %][% END %]" />
290 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
291 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
298 [% UNLESS ( opduplicate ) %]
300 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
302 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
305 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
307 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
310 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
312 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" />
315 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
316 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
317 <label for="sex-none">None specified </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
325 [% END # hide fieldset %]
327 [% IF ( showguarantor ) %]
328 <input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
330 <input type="hidden" name="branchcode" value="[% branchcode %]" />
332 <fieldset id="memberentry_guarantor" class="rows">
333 <legend id="guarantor_lgd">Guarantor information</legend>
336 [% IF ( guarantorid ) %]
337 <li id="contact-details">
339 <li id="contact-details" style="display: none">
341 <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
344 <label for="contactname">Organization name: </label>
345 [% IF ( guarantorid ) %]
346 <span>[% contactname %]</span>
347 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
349 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
354 [% IF ( guarantorid ) %]
355 <li id="contact-details">
357 <li id="contact-details" style="display: none">
359 <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
361 [% UNLESS nocontactname %]
363 <label for="contactname">Surname: </label>
364 [% IF ( guarantorid ) %]
365 <span>[% contactname %]</span>
366 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
368 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
372 [% UNLESS nocontactfirstname %]
374 <label for="contactfirstname">First name: </label>
375 [% IF ( guarantorid ) %]
376 <span>[% contactfirstname %]</span>
377 <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
379 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
383 [% IF ( relshiploop ) %]
385 <label for="relationship">Relationship: </label>
386 <select name="relationship" id="relationship" >
387 [% FOREACH relshiploo IN relshiploop %]
388 [% IF ( relshiploo.selected ) %]
389 <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
391 <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
400 <span class="label"> </span>
401 [% IF ( guarantorid ) %]
402 <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
404 <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" />
406 <input id="guarantordelete" type="button" value="Delete" />
408 [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
410 <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
411 <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
412 [% IF privacy_guarantor_checkouts %]
413 <option value="0">No</option>
414 <option value="1" selected>Yes</option>
416 <option value="0" selected>No</option>
417 <option value="1">Yes</option>
420 <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
427 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
428 [% IF Koha.Preference( 'AddressFormat' ) %]
429 [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
431 [% INCLUDE 'member-main-address-style-us.inc' %]
433 [% END # nostreet && nocity etc group%]
435 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
436 <fieldset class="rows" id="memberentry_contact">
437 <legend id="contact_lgd">Contact</legend><ol>
440 [% IF ( mandatoryphone ) %]
441 <label for="phone" class="required">
445 Primary phone: </label>
446 <input type="text" id="phone" name="phone" value="[% phone %]" />
447 [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
451 [% UNLESS nophonepro %]
453 [% IF ( mandatoryphonepro ) %]
454 <label for="phonepro" class="required">
456 <label for="phonepro">
458 Secondary phone: </label>
459 <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
460 [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
463 [% UNLESS nomobile %]
465 [% IF ( mandatorymobile ) %]
466 <label for="mobile" class="required">
470 Other phone: </label>
471 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
472 [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
477 [% IF ( mandatoryemail ) %]
478 <label for="email" class="required">
482 Primary email: </label>
483 <input type="text" id="email" name="email" size="45" value="[% email %]" />
484 [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
488 [% UNLESS noemailpro %]
490 [% IF ( mandatoryemailpro ) %]
491 <label for="emailpro" class="required">
493 <label for="emailpro">
495 Secondary email: </label>
496 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
497 [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
502 [% IF ( mandatoryfax ) %]
503 <label for="fax" class="required">
508 <input type="text" id="fax" name="fax" value="[% fax %]" />
509 [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
514 [%END # hide fieldset %]
516 <!-- ************************ STEP_1 *********************** -->
520 [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
521 [% IF Koha.Preference( 'AddressFormat' ) %]
522 [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
524 [% INCLUDE 'member-alt-address-style-us.inc' %]
526 [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
529 [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
530 [% IF Koha.Preference( 'AddressFormat' ) %]
531 [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
533 [% INCLUDE 'member-alt-contact-style-us.inc' %]
535 [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
540 <fieldset class="rows" id="memberentry_library_management">
541 <legend id="library_management_lgd">Library management</legend><ol>
542 [% UNLESS nocardnumber %]
544 [% IF ( mandatorycardnumber ) %]
545 <label for="cardnumber" class="required">
547 <label for="cardnumber" class="validated">
549 Card number: </label>
550 [% IF minlength_cardnumber == maxlength_cardnumber %]
551 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
552 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
553 <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
554 [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
555 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
556 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
557 <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
558 [% ELSIF maxlength_cardnumber %]
559 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
560 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
561 <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
563 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
564 [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]
565 <div class="hint">There is no minimum or maximum character length.</div>
569 [% UNLESS nobranchcode %]
571 <label for="libraries" class="required">Library:</label>
572 <select name="branchcode" size="1" id="libraries">
573 [%- FOREACH branchloo IN branchloop %]
574 [% IF ( branchloo.selected ) -%]
575 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
577 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
581 <span class="required">Required</span>
585 <label for="categorycode_entry" class="required">Category: </label>
586 <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);">
587 [% FOREACH typeloo IN typeloop %]
588 [% FOREACH categoryloo IN typeloo.categoryloop %]
589 [% IF ( loop.first ) %]
590 [% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
591 [% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
592 [% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
593 [% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
594 [% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
595 [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
597 [% IF ( categoryloo.categorycodeselected ) %]
598 <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
600 <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
602 [% IF ( loop.last ) %]
608 <span class="required">Required</span>
612 [% IF ( mandatorysort1 ) %]
613 <label for="sort1" class="required">
618 [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %]
619 [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
624 [% IF ( mandatorysort2 ) %]
625 <label for="sort2" class="required">
630 [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
631 [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
634 [% IF ( Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 ) %]
636 <label for="sort2">Sync with the Norwegian national patron database:</label>
637 [% IF ( sync == 0 ) %]
638 <input type="radio" id="sync" name="sync" value="1"> Yes
639 <input type="radio" id="sync" name="sync" value="0" checked> No
641 <input type="radio" id="sync" name="sync" value="1" checked> Yes
642 <input type="radio" id="sync" name="sync" value="0"> No
648 [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
649 <fieldset class="rows" id="memberentry_subscription">
650 <legend id="library_setup_lgd">Library set-up</legend><ol>
651 [% UNLESS nodateenrolled %]
653 [% IF ( mandatorydateenrolled ) %]
654 <label for="from" class="required">
658 Registration date: </label>
659 [% IF ( dateformat == "metric" ) %]
660 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
662 <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
664 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
665 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
666 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
669 [% UNLESS nodateexpiry %]
672 <li style="display:none">
674 [% IF ( mandatorydateexpiry ) %]
675 <label for="to" class="required">
679 Expiry date (leave blank for auto calc): </label>
680 [% IF ( dateformat == "metric" ) %]
681 [% UNLESS ( opadd ) %]
682 <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" />
684 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
687 [% UNLESS ( opadd ) %]
688 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% UNLESS opduplicate %][% dateexpiry %][% END %]" class="datepickerto" />
690 <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
693 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
694 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
695 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
697 [% UNLESS noopacnote %]
699 [% IF ( mandatoryopacnote ) %]
700 <label for="opacnote" class="required">
702 <label for="opacnote">
705 <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea>
706 <div class="hint">This message appears on this patron's user page in the OPAC</div>
707 [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
710 [% UNLESS noborrowernotes %]
712 [% IF ( mandatoryborrowernotes ) %]
713 <label for="borrowernotes" class="required">
715 <label for="borrowernotes">
717 Circulation note: </label>
718 <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% UNLESS opduplicate %][% borrowernotes %][% END %]</textarea>
719 <div class="hint">This message displays when checking out to this patron</div>
720 [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
725 [% END # hide fieldset %]
727 [% UNLESS nouserid && nopassword %]
728 <fieldset class="rows" id="memberentry_userid">
729 <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
730 [% UNLESS nouserid %]
732 [% IF ( mandatoryuserid ) %]
733 <label for="userid" class="required">
739 [% IF ( NoUpdateLogin ) %]
740 [% IF ( opduplicate ) %]
741 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
743 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
746 [% IF ( opduplicate ) %]
747 <input type="text" id="userid" name="userid" size="20" value="" />
749 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
753 [%# Dummy input to avoid Firefox from using userid/password saved for authentication %]
754 <input type="text" disabled="disabled" style="display:none" />
756 [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
759 [% UNLESS nopassword %]
761 [% IF ( mandatorypassword ) %]
762 <label for="password" class="required">
764 <label for="password">
768 [% IF ( NoUpdateLogin ) %]
769 [% IF ( opduplicate ) %]
770 <input type="password" id="password" name="password" size="20" disabled="disabled" />
772 <input type="password" id="password" name="password" size="20" disabled="disabled" value="[% password %]" />
775 [% IF ( opduplicate ) %]
776 <input type="password" id="password" name="password" size="20" />
778 <input type="password" id="password" name="password" size="20" value="[% password %]" />
782 [% IF ( password ) %]
783 [% IF ( NoUpdateLogin ) %]
784 <input type="password" id="password" name="password" size="20" disabled="disabled" value="****" />
786 [% IF ( opduplicate ) %]
787 <input type="password" id="password" name="password" size="20" />
789 <input type="password" id="password" name="password" size="20" value="****" />
793 [% IF ( NoUpdateLogin ) %]
794 <input type="password" id="password" name="password" size="20" disabled="disabled" value="" />
796 <input type="password" id="password" name="password" size="20" value="" />
800 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
801 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
804 [% IF ( mandatorypassword ) %]
805 <label for="password2" class="required">
807 <label for="password2">
809 Confirm password: </label>
811 [% IF ( NoUpdateLogin ) %]
812 [% IF ( opduplicate ) %]
813 <input type="password" id="password2" name="password2" size="20" disabled="disabled" />
815 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% password %]" />
818 [% IF ( opduplicate ) %]
819 <input type="password" id="password2" name="password2" size="20" />
821 <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
825 [% IF ( password ) %]
826 [% IF ( NoUpdateLogin ) %]
827 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" />
829 [% IF ( opduplicate ) %]
830 <input type="password" id="password2" name="password2" size="20" />
832 <input type="password" id="password2" name="password2" size="20" value="****" />
836 [% IF ( NoUpdateLogin ) %]
837 <input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" />
839 <input type="password" id="password2" name="password2" size="20" value="" />
843 [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
847 [% END # hide fieldset %][% END %]
848 <!--this zones are not necessary in modif mode -->
849 [% UNLESS ( opadd || opduplicate ) %]
850 <fieldset class="rows" id="memberentry_account_flags">
851 <legend id="account_flags_lgd">Patron account flags</legend>
853 [% FOREACH flagloo IN flagloop %]
854 <li><label class="radio" for="yes[% flagloo.name %]">
855 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
856 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
858 [% IF CAN_user_circulate_manage_restrictions %]
859 <label for="yes[% flagloo.name %]">Yes </label>
860 [% IF ( flagloo.yes ) %]
861 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
863 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
865 <label for="no[% flagloo.name %]">No </label>
866 [% IF ( flagloo.no ) %]
867 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
869 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
872 [% IF flagloo.yes %]Yes[% ELSE %]No[% END %]
881 <fieldset class="rows" id="memberentry_restrictions">
882 <legend id="restrictions_lgd">Patron restrictions</legend>
884 [% IF ( debarments ) %]
891 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
898 [% FOREACH d IN debarments %]
900 <td>[% d.type %]</td>
902 [% IF d.comment.search('OVERDUES_PROCESS') %]
903 Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %]
908 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
909 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
911 <input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
919 <p>Patron is currently unrestricted.</p>
922 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
923 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
924 <fieldset id="manual_restriction_form">
925 <input type="hidden" id="add_debarment" name="add_debarment" value="0" />
926 <legend id="manual_restriction_lgd">Add manual restriction</legend>
928 <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
929 <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
930 <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
934 <a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a>
943 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
944 <fieldset class="rows" id="memberentry_patron_attributes">
945 <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
946 <input type="hidden" name="setting_extended_patron_attributes" value="1" />
947 [% FOREACH pa_loo IN patron_attributes %]
948 [% IF pa_loo.class %]
949 <fieldset id="aai_[% pa_loo.class %]">
950 <legend id="[% pa_loo.class %]_lgd">[% pa_loo.lib %]</legend>
952 <ol class="attributes_table">
953 [% FOREACH patron_attribute IN pa_loo.items %]
954 <li data-category_code="[% patron_attribute.category_code %]">
955 <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
956 <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
957 [% IF ( patron_attribute.use_dropdown ) %]
958 <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
959 <option value=""></option>
960 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
961 [% IF auth_val_loo.authorised_value == patron_attribute.value %]
962 <option value="[% auth_val_loo.authorised_value %]" selected="selected">
963 [% auth_val_loo.lib %]
966 <option value="[% auth_val_loo.authorised_value %]" >
967 [% auth_val_loo.lib %]
973 <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
975 <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
976 [% IF ( patron_attribute.repeatable ) %]
977 <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a>
982 [% IF pa_loo.class %]</fieldset>[% END %]
985 [% END %][% END %][% END %]
987 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
988 <fieldset class="rows" id="memberentry_messaging_prefs">
989 <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
991 <!-- handle changing prefs if creating new patron and changing
994 <script type="text/javascript">//<![CDATA[
995 $(document).ready(function(){
996 var message_prefs_dirty = false;
997 $('#memberentry_messaging_prefs > *').change(function() {
998 message_prefs_dirty = true;
1000 $('#categorycode_entry').change(function() {
1001 var categorycode = $(this).val();
1002 if (message_prefs_dirty) {
1003 if (!confirm(_("Change messaging preferences to default for this category?"))) {
1007 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1009 $.each(data.messaging_preferences, function(i, item) {
1010 var attrid = item.message_attribute_id;
1011 var transports = ['email', 'rss', 'sms'];
1012 $.each(transports, function(j, transport) {
1013 if (item['transports_' + transport] == 1) {
1014 $('#' + transport + attrid).prop('checked', true);
1016 $('#' + transport + attrid).prop('checked', false);
1019 if (item.digest && item.digest != ' ') {
1020 $('#digest' + attrid).prop('checked', true);
1022 $('#digest' + attrid).prop('checked', false);
1024 if (item.takes_days == '1') {
1025 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1028 message_prefs_dirty = false;
1036 <input type="hidden" name="setting_messaging_prefs" value="1" />
1037 [% INCLUDE 'messaging-preference-form.inc' %]
1038 [% IF ( SMSSendDriver ) %]
1039 <p><label for="SMSnumber">SMS number:</label>
1040 <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1043 <label for="sms_provider_id">SMS provider:</label>
1044 <select id="sms_provider_id" name="sms_provider_id"/>
1045 <option value="">Unknown</option>
1046 [% FOREACH s IN sms_providers %]
1047 [% IF s.id == sms_provider_id %]
1048 <option value="[% s.id %]" selected="selected">[% s.name %]</option>
1050 <option value="[% s.id %]">[% s.name %]</option>
1064 [% UNLESS ( opadd ) %]<div class="yui-b">
1065 [% INCLUDE 'members-menu.inc' %]
1069 [% INCLUDE 'intranet-bottom.inc' %]