Bug 8080 - login and password is pre-filled by the browser when creating a new patron
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / memberentrygen.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Patrons &rsaquo; 
3 [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] [% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %][% UNLESS ( opadd ) %] [% surname %], [% firstname %][% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 <script type="text/JavaScript">
7 //<![CDATA[
8     $(document).ready(function() {
9                 $("fieldset.rows input").keydown(function(e){ return checkEnter(e); });
10         $("#guarantordelete").click(function() {
11             $("#contact-details").hide().find('a').remove();
12             $("#guarantorid, #contactname, #contactfirstname").each(function () { this.value = "" });
13             $("#contactname, #contactfirstname")
14                 .each(function () { this.type = 'text' })
15                 .parent().find('span').remove();
16             $("#guarantorsearch").val("Set to Patron");
17         });
18         $("#select_city").change(function(){
19             var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
20             document.form.select_city.value.match(myRegEx);
21             document.form.zipcode.value=RegExp.$1;
22             document.form.city.value=RegExp.$2;
23             document.form.state.value=RegExp.$3;
24             document.form.country.value=RegExp.$4;
25         });
26
27         [% IF categorycode %]
28             update_category_code( "[% categorycode %]" );
29         [% ELSE %]
30             if ( $("#categorycode").length > 0 ){
31                 var category_code = $("#categorycode").find("option:selected").val();
32                 update_category_code( category_code );
33             }
34         [% END %]
35
36     });
37
38     function clear_entry(node) {
39         var original = node.parentNode.parentNode;
40         $("input[type=text]", original).attr('value', '');
41         $("select", original).attr('value', '');
42     }
43
44     function clone_entry(node) {
45         var original = node.parentNode.parentNode;
46         var clone = original.cloneNode(true);
47         var newId = 50 + parseInt(Math.random() * 100000);
48         $("input", clone).attr('id', function() {
49             return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
50         });
51         $("input", clone).attr('name', function() {
52             return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
53         });
54         $("select", clone).attr('id', function() {
55             return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
56         });
57         $("select", clone).attr('name', function() {
58             return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
59         });
60         $("input#patron_attr_" + newId, clone).attr('value','');
61         $("select#patron_attr_" + newId, clone).attr('value','');
62         original.parentNode.insertBefore(clone, original.nextSibling);
63     }
64
65     function update_category_code(category_code) {
66         if ( $(category_code).is("select") ) {
67             category_code = $("#categorycode").find("option:selected").val();
68         }
69         var mytables = $(".attributes_table>tbody");
70
71         mytables.find("tr").each(function(){
72             $(this).hide()
73         });
74
75         mytables.find("tr[data-category_code="+category_code+"]").each(function(){
76             $(this).show();
77         });
78         mytables.find("tr[data-category_code='']").each(function(){
79             $(this).show();
80         });
81
82     }
83
84                 var MSG_SEPARATOR = _("Separator must be / in field ");
85         var MSG_INCORRECT_DAY = _("Invalid day entered in field ");
86         var MSG_INCORRECT_MONTH = _("Invalid month entered in field ");
87         var MSG_INCORRECT_YEAR = _("Invalid year entered in field ");
88         var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
89         var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
90         var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
91         var MSG_MISSING_MANDATORY = _("The following fields are mandatory:");
92         var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
93         var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
94 //]]>
95 </script>
96 <script type="text/javascript" src="[% themelang %]/js/members.js"></script>
97 </head>
98 <body id="pat_memberentrygen" class="pat">
99 [% INCLUDE 'header.inc' %]
100 [% INCLUDE 'patron-search.inc' %]
101
102 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; 
103 [% IF ( opadd ) %]
104                 Add[% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %]
105 [% surname %] [% firstname %]
106 [% ELSE %] 
107 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% firstname %] [% surname %]</a> &rsaquo; <strong>[% IF ( opduplicate ) %]Duplicate[% ELSE %]Modify[% END %][% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %]
108 </strong>[% END %]</div>
109 [% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
110    
111    <div id="bd">
112         <div id="yui-main">
113         <div class="yui-b">
114
115     [% IF error_alert %]
116         [% IF ( error_alert == "no_email" ) %]
117             <div class="error">This member has no email</div>
118         [% ELSE %]
119             <div class="error">[% error_alert %]</div>
120         [% END %]
121     [% END %]
122     [% IF info_alert %]
123         <div class="dialog message">Email has been sent.</div>
124     [% END %]
125
126         [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
127                 [% IF ( no_branches ) %]<p>There are <strong>no libraries defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/branches.pl">add a library</a>.[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
128                 [% IF ( no_categories ) %]<p>There are <strong>no patron categories defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/categorie.pl">add a patron category</a>.[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
129
130         [% UNLESS ( no_add ) %]
131         [% IF ( opadd ) %]
132         <h1>
133                 Add[% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %] [% firstname %] [% surname %] 
134         </h1>
135         [% ELSE %]
136         <h1>
137                 [% IF ( opduplicate ) %]Duplicate[% ELSE %]Modify[% END %][% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %]
138 [% firstname %] [% surname %] 
139         </h1>
140         [% END %]
141   
142         [% IF ( check_member ) %]
143                         <div class="dialog alert">
144                                 <h3>Duplicate patron record?</h3>
145                                 <p><a class="popup" href="javascript:Dopop('moremember.pl?print=brief&amp;borrowernumber=[% check_member %]');" >View existing record</a></p>
146                                 <form action="/cgi-bin/koha/members/memberentry.pl" method="get"><input type="hidden" name="op" value="modify" /><input type="hidden" name="borrowernumber" value="[% check_member %]" /><input type="hidden" name="category_type" value="[% check_categorytype %]" /><input class="edit" type="submit" value="It is a duplicate. Edit existing record" /></form>
147
148                 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
149                                 <input type="hidden" name="nodouble" value="1" />
150                                 <input class="new" type="submit" value="Not a duplicate. Save as new record" />
151                         </div>
152         [% END %]
153
154         [% IF ( debug ) %]
155                 <div id="debug">
156                                 <div>Debug is on (level [% debug %])</div>
157                 </div>
158         [% END %]
159         [% IF ( nok ) %]
160                 <div class="dialog alert">
161                         <p>The following fields are wrong. Please fix them.</p>
162                         <ul>
163                         [% IF ( ERROR_login_exist ) %]
164                                 <li id="ERROR_login_exist">Username/password already exists.</li>
165                         [% END %]
166                         [% IF ( ERROR_cardnumber ) %]
167                                 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
168                         [% END %]
169                         [% IF ( ERROR_age_limitations ) %]
170                                 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.  
171                                         Ages allowed are [% ERROR_age_limitations %].</li>
172                         [% END %]
173                         [% IF ( ERROR_branch ) %]
174                                 <li id="ERROR_branch">Library is invalid.</li>
175                         [% END %]   
176                         [% IF ( ERROR_dateofbirth ) %]
177                                 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
178                         [% END %]
179                         [% IF ( ERROR_dateenrolled ) %]
180                                 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
181                         [% END %]
182                         [% IF ( ERROR_dateexpiry ) %]
183                                 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
184                         [% END %]
185                         [% IF ( ERROR_short_password ) %]
186                                 <li id="ERROR_short_password">Password must be at least [% minPasswordLength %] characters long.</li>
187                         [% END %]
188                         [% IF ( ERROR_password_mismatch ) %]
189                                 <li id="ERROR_password_mismatch">Passwords do not match.</li>
190                         [% END %]
191             [% IF ( ERROR_extended_unique_id_failed ) %]
192                 <li id="ERROR_extended_unique_id_failed">The attribute value 
193                     [% ERROR_extended_unique_id_failed %] is already is use by another patron record.</li>
194                         [% END %]
195                         </ul>
196                 </div>
197         [% END %]
198
199
200 [% UNLESS ( check_member ) %]<form name="form" id="entryform"  action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off">
201 <input type="hidden" name="nodouble"  value="[% nodouble %]" /> [% END %]
202 <!--    field always hidden in different form (1,2,3) -->
203 <input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
204 <input type="hidden" name="category_type" value="[% category_type %]" />
205 <input type="hidden" name="updtype" value="[% updtype %]" />
206 <input type="hidden" name="select_roadtype" value="[% select_roadtype %]" />
207 <input type="hidden" name="destination" value="[% destination %]" />
208 <input type="hidden" name="check_member" value="[% check_member %]" />
209 <input type="hidden" name="borrowernumber" value="[% IF ( opduplicate ) %][% ELSE %][% borrowernumber %][% END %]" />
210 <input type="hidden" name="nodouble"  value="[% IF ( opduplicate ) %][% ELSE %][% nodouble %][% END %]" />
211 [% IF ( step ) %]<input type="hidden" name="step"  value="[% step %]" />[% END %]
212 [% IF ( opadd ) %]<input type="hidden" name="op" value="insert" />
213 [% ELSIF ( opduplicate ) %]
214 <input type="hidden" name="op" value="insert" />
215 [% ELSE %]
216 <input type="hidden" name="op" value="save" />
217 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
218 [%# Only put the cardnumber if we arent showing it in the form later %]
219 [% IF cardnumber %]
220 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
221 [% END %]
222 [% END %]
223 [% END %]
224
225 [% IF ( step_1 ) %]
226 [%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
227         <fieldset class="rows" id="memberentry_identity">
228                 <legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
229                 <ol>
230                 [% UNLESS ( I ) %]
231         [% UNLESS notitle %]
232                 [% IF ( title_cgipopup ) %]
233             <li>
234             [% IF ( mandatorytitle ) %]
235                 <label for="btitle" class="required">
236             [% ELSE %]
237                 <label for="btitle">
238             [% END %]
239             Salutation: </label>
240             [% borrotitlepopup %]
241             [% IF ( mandatorytitle ) %]<span class="required">Required</span>[% END %]
242             </li>
243                 [% END %]
244         [% END %]
245                 [% END %]
246         [% UNLESS nosurname %]
247                 <li>
248                 [% IF ( mandatorysurname ) %]
249                 <label for="surname" class="required">
250                 [% ELSE %]
251                 <label for="surname">
252                 [% END %]
253                 Surname: </label>
254                 [% IF ( uppercasesurnames ) %]
255                         [% IF ( opduplicate ) %]
256                                 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20"  value="[% surname %]" onclick="this.value=''" />
257                         [% ELSE %]
258                                 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20"  value="[% surname %]" />
259                         [% END %]
260                 [% ELSE %]
261                         [% IF ( opduplicate ) %]
262                                 <input type="text" id="surname" name="surname" size="20"  value="[% surname %]" onclick="this.value=''" />
263                         [% ELSE %]
264                                 <input type="text" id="surname" name="surname" size="20"  value="[% surname %]" />
265                         [% END %]
266                 [% END %]
267                 [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
268                 </li>
269         [% END %]
270                 [% UNLESS ( I ) %]
271         [% UNLESS nofirstname %]
272             <li>
273                 [% IF ( mandatoryfirstname ) %]
274                 <label for="firstname" class="required">
275                 [% ELSE %]
276                 <label for="firstname">
277                 [% END %]
278                 First name: </label>
279                 <input type="text" id="firstname" name="firstname" size="20"  value="[% IF ( opduplicate ) %][% ELSE %][% firstname %][% END %]" />
280                 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
281             </li>
282         [% END %]
283         [% UNLESS nodateofbirth %]
284             <li>
285                 [% IF ( mandatorydateofbirth ) %]
286                 <label for="dateofbirth" class="required">
287                 [% ELSE %]
288                 <label for="dateofbirth">
289                 [% END %]
290                 Date of birth: </label>
291                                 
292         [% IF ( metric ) %]                     
293                 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
294 [% ELSE %]
295                 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
296 [% END %]
297
298                 <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofbirth_button" alt="Show Calendar" />
299         <script language="JavaScript" type="text/javascript">
300             Calendar.setup(
301             {
302                 inputField : "dateofbirth",
303                 ifFormat : "[% DHTMLcalendar_dateformat %]",
304                 button : "dateofbirth_button"
305             }
306             );
307         </script>
308         [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
309         [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
310                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
311             </li>
312         [% END %]
313         [% UNLESS noinitials %]
314             <li>
315                 [% IF ( mandatoryinitials ) %]
316                     <label for="initials" class="required">
317                 [% ELSE %]
318                     <label for="initials">
319                 [% END %]
320                 Initials: </label>
321                 [% IF ( opduplicate ) %]
322                                         <input type="text" id="initials" name="initials" size="20"  value="[% initials %]" onclick="this.value=''" />
323                 [% ELSE %]
324                                         <input type="text" id="initials" name="initials" size="20"  value="[% initials %]" />
325                 [% END %]
326                 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
327             </li>
328         [% END %]
329         [% END %]
330         [% UNLESS noothernames %]
331                 <li>
332                         [% IF ( mandatoryothernames ) %]
333                         <label for="othernames" class="required">
334                         [% ELSE %]
335                         <label for="othernames">
336                         [% END %]
337                         Other name: </label>
338                         [% IF ( opduplicate ) %]
339                                 <input type="text" id="othernames" name="othernames" size="20"  value="[% othernames %]" onclick="this.value=''" />
340                         [% ELSE %]
341                                 <input type="text" id="othernames" name="othernames" size="20"  value="[% othernames %]" />
342                         [% END %]
343 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
344                 [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
345                 </li>
346         [% END %]
347     [% UNLESS ( I ) %]
348         [% UNLESS nosex %]
349                 <li class="radio">
350                 
351                 [% IF ( female ) %]
352                                 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked"  />
353 [% ELSE %]
354                                 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
355 [% END %]
356                 [% IF ( male ) %]
357                 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
358 [% ELSE %]
359                                 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
360 [% END %]
361 [% IF ( none ) %]
362                                 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value=""  checked="checked"  />
363 [% ELSE %]
364                                 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
365 [% END %]
366         </li>
367         [% END %]
368     [% END %]
369                 </ol>
370         </fieldset>
371 [% END # hide fieldset %]
372
373 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid"   value="[% guarantorid %]" />
374     <fieldset class="rows">
375         <legend>Guarantor information</legend>
376         <ol>
377 [% IF ( P ) %]
378                 [% IF ( guarantorid ) %]
379                 <li id="contact-details">
380                 [% ELSE %]
381                 <li id="contact-details" style="display: none">
382                 [% END %]
383                     <span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
384                 </li>
385                 <li>
386                     <label for="contactname">Organization name: </label>
387                     [% IF ( guarantorid ) %]
388                     <span>[% contactname %]</span>
389                     <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
390                     [% ELSE %]
391                             [% IF ( opduplicate ) %]
392                                                 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" onclick="this.value=''" />
393                             [% ELSE %]
394                                                 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
395                             [% END %]
396                     [% END %]
397                 </li>
398 [% ELSE %]
399  [% IF ( C ) %]
400  [% IF ( guarantorid ) %]
401  <li id="contact-details">
402  [% ELSE %]
403  <li id="contact-details" style="display: none">
404  [% END %]
405      <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
406  </li>
407         [% UNLESS nocontactname %]
408  <li>
409      <label for="contactname">Surname: </label>
410      [% IF ( guarantorid ) %]
411      <span>[% contactname %]</span>
412      <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
413      [% ELSE %]
414                 [% IF ( opduplicate ) %]
415                         <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" onclick="this.value=''" />
416                 [% ELSE %]
417                         <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
418                 [% END %]
419      [% END %]
420  </li>
421         [% END %]
422         [% UNLESS nocontactfirstname %]
423  <li>
424      <label for="contactfirstname">First name: </label>
425      [% IF ( guarantorid ) %]
426      <span>[% contactfirstname %]</span>
427      <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" />
428      [% ELSE %]
429              [% IF ( opduplicate ) %]
430                                 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" onclick="this.value=''" />
431              [% ELSE %]
432                                 <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" />
433              [% END %]
434      [% END %]
435  </li>
436         [% END %]
437  [% IF ( relshiploop ) %]
438  <li>
439      <label for="relationship">Relationship: </label>
440      <select name="relationship" id="relationship" >
441          [% FOREACH relshiploo IN relshiploop %]
442          [% IF ( relshiploo.selected ) %]
443          <option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option>
444          [% ELSE %]
445          <option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option>
446          [% END %]
447          [% END %]
448      </select>
449  </li>
450  [% END %]
451  [% END %]
452 [% END %]
453         <li>
454             <span class="label">&nbsp;</span>
455             [% IF ( guarantorid ) %]
456             <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
457             [% ELSE %]
458             <input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl?category_type=[% category_type %]');" />
459             [% END %]
460             <input id="guarantordelete" type="button" value="Delete" />
461         </li>
462         </ol>
463     </fieldset>
464
465 [% END %]
466 [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
467 <fieldset class="rows">
468     <legend id="main_address_lgd">Main address</legend><ol>
469         [% UNLESS nostreetnumber %]
470     <li>
471       [% IF ( mandatorystreetnumber ) %]
472       <label for="streetnumber" class="required">
473       [% ELSE %]
474       <label for="streetnumber">
475       [% END %]
476       Street number: </label>
477       [% IF ( opduplicate ) %]
478                 <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" onclick="this.value=''" />
479       [% ELSE %]
480                 <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" />
481       [% END %]
482 [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
483     </li>
484         [% END %]
485         [% UNLESS nostreettype %]
486     [% IF ( road_cgipopup ) %]
487       <li>
488       [% IF ( mandatorystreettype ) %]
489       <label for="streettype" class="required">
490       [% ELSE %]
491       <label for="streettype">
492       [% END %]
493       Street type: </label>
494       [% roadpopup %]
495           [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
496       </li>
497     [% END %] 
498         [% END %]
499         [% UNLESS noaddress %]
500     <li>
501       [% IF ( mandatoryaddress ) %]
502       <label for="address" class="required">
503       [% ELSE %]
504       <label for="address">
505       [% END %]
506       Address: </label>
507       [% IF ( opduplicate ) %]
508                         <input type="text" id="address" name="address" size="35" value="[% address %]" onclick="this.value=''" />
509       [% ELSE %]
510                         <input type="text" id="address" name="address" size="35" value="[% address %]" />
511       [% END %]
512           [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
513     </li>
514         [% END %]
515         [% UNLESS noaddress2 %]
516     <li>
517       [% IF ( mandatoryaddress2 ) %]
518       <label for="address2" class="required">
519       [% ELSE %]
520       <label for="address2">
521       [% END %]
522       Address 2: </label>
523       [% IF ( opduplicate ) %]
524                         <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" onclick="this.value=''" />
525       [% ELSE %]
526                         <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" />
527       [% END %]
528           [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
529     </li>  
530         [% END %]
531         [% UNLESS nocity %]
532     <li>
533       [% IF ( mandatorycity ) %]
534         <label for="city" class="required">
535       [% ELSE %]
536         <label for="city">
537       [% END %]
538       City: </label>
539         [% IF ( opduplicate ) %]
540                         <input type="text" id="city" name="city" size="20" value="[% city %]" onclick="this.value=''" />
541         [% ELSE %]
542                         <input type="text" id="city" name="city" size="20" value="[% city %]" />
543         [% END %]
544         [% IF ( city_cgipopup ) %]or <strong>choose</strong>
545         <select id="select_city" name="select_city">
546         [% FOREACH city_loo IN city_loop %]
547             [% IF ( city_loo.selected ) %]
548             <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected">
549             [% ELSE %]
550             <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]">
551             [% END %]
552                 [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %]
553             </option>
554         [% END %]
555         </select>
556         [% END %]
557           [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
558     </li>
559         [% END %]
560         [% UNLESS nostate %]
561     <li> 
562       [% IF ( mandatorystate ) %]
563         <label for="state" class="required">
564       [% ELSE %]
565         <label for="state">
566       [% END %]
567       State: </label>
568       <input type="text" name="state" id="state" size="20" value="[% state %]" />
569           [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
570     </li>
571         [% END %]
572         [% UNLESS nozipcode %]
573     <li> 
574       [% IF ( mandatoryzipcode ) %]
575         <label for="zipcode" class="required">
576       [% ELSE %]
577         <label for="zipcode">
578       [% END %]
579       Zip/Postal code: </label>
580       [% IF ( opduplicate ) %]
581                         <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" onclick="this.value=''" />
582       [% ELSE %]
583                         <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" />
584       [% END %]
585           [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
586     </li>
587         [% END %]
588         [% UNLESS nocountry %]
589     <li> 
590       [% IF ( mandatorycountry ) %]
591         <label for="country" class="required">
592       [% ELSE %]
593         <label for="country">
594       [% END %]
595       Country: </label>
596       [% IF ( opduplicate ) %]
597                         <input type="text" name="country" id="country" size="20" value="[% country %]" onclick="this.value=''" />
598       [% ELSE %]
599                         <input type="text" name="country" id="country" size="20" value="[% country %]" />
600       [% END %]
601           [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
602     </li>    
603         [% END %]
604         </ol>
605     </fieldset>
606 [% END # nostreet && nocity etc group%]
607
608 [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
609   <fieldset class="rows" id="memberentry_contact">
610     <legend id="contact_lgd">Contact</legend><ol>
611         [% UNLESS nophone %]
612       <li>
613       [% IF ( mandatoryphone ) %] 
614       <label for="phone" class="required">
615       [% ELSE %]
616       <label for="phone">
617       [% END %]
618       Primary phone: </label>
619       [% IF ( opduplicate ) %]
620                         <input type="text" id="phone" name="phone" value="[% phone %]" onclick="this.value=''" />
621       [% ELSE %]
622                         <input type="text" id="phone" name="phone" value="[% phone %]" />
623       [% END %]
624           [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
625
626     </li>
627         [% END %]
628         [% UNLESS nophonepro %]
629     <li>
630       [% IF ( mandatoryphonepro ) %]
631       <label for="phonepro" class="required">
632       [% ELSE %]
633       <label for="phonepro">
634       [% END %]
635       Secondary phone: </label>
636       [% IF ( opduplicate ) %]
637                         <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" onclick="this.value=''" />
638       [% ELSE %]
639                         <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" />
640       [% END %]
641           [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
642     </li>
643         [% END %]
644         [% UNLESS nomobile %]
645     <li>
646       [% IF ( mandatorymobile ) %]
647       <label for="mobile" class="required">
648       [% ELSE %]
649       <label for="mobile">
650       [% END %]
651       Other phone: </label>
652       [% IF ( opduplicate ) %]
653                 <input type="text" id="mobile" name="mobile" value="[% mobile %]" onclick="this.value=''" />
654       [% ELSE %]
655                 <input type="text" id="mobile" name="mobile" value="[% mobile %]" />
656       [% END %]
657           [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
658     </li>
659         [% END %]
660         [% UNLESS noemail %]
661     <li>
662       [% IF ( mandatoryemail ) %]
663       <label for="email" class="required">
664       [% ELSE %]
665       <label for="email">
666       [% END %]
667       Primary email: </label>
668       [% IF ( opduplicate ) %]
669                 <input type="text" id="email" name="email" size="45" value="[% email %]" onclick="this.value=''" />
670       [% ELSE %]
671                 <input type="text" id="email" name="email" size="45" value="[% email %]" />
672       [% END %]
673           [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
674
675     </li>
676         [% END %]
677         [% UNLESS noemailpro %]
678     <li>
679       [% IF ( mandatoryemailpro ) %] 
680       <label for="emailpro" class="required">
681       [% ELSE %]
682       <label for="emailpro">
683       [% END %]
684       Secondary email: </label>
685       [% IF ( opduplicate ) %]
686                 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" onclick="this.value=''" />
687       [% ELSE %]
688                 <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" />
689       [% END %]
690           [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
691     </li>
692         [% END %]
693         [% UNLESS nofax %]
694     <li>
695       [% IF ( mandatoryfax ) %]
696       <label for="fax" class="required">
697       [% ELSE %]
698       <label for="fax">
699       [% END %]
700       Fax: </label>
701       [% IF ( opduplicate ) %]
702                 <input type="text" id="fax" name="fax" value="[% fax %]" onclick="this.value=''" />
703       [% ELSE %]
704                 <input type="text" id="fax" name="fax" value="[% fax %]" />
705       [% END %]
706           [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
707     </li>
708         [% END %]
709         </ol>
710   </fieldset>
711 [%END # hide fieldset %]
712
713 <!-- ************************ STEP_1 *********************** -->
714 [% END %]
715 [% IF ( step_6 ) %]
716
717     [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
718                 <fieldset class="rows" id="memberentry_address">
719                 <legend id="alt_address_lgd">Alternate address</legend><ol>
720         [% UNLESS noB_address %]
721                         <li>
722                                 [% IF ( mandatoryB_address ) %]
723                                         <label for="B_address" class="required">
724                                 [% ELSE %]
725                                         <label for="B_address">
726                                 [% END %]
727                                 Address: </label>
728                                 [% IF ( opduplicate ) %]
729                                         <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" onclick="this.value=''" />
730                                 [% ELSE %]
731                                         <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" />
732                                 [% END %]
733           [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
734                         </li>
735         [% END %]
736         [% UNLESS noB_address2 %]
737                         <li>
738                                 [% IF ( mandatoryB_address2 ) %]
739                                         <label for="B_address2" class="required">
740                                 [% ELSE %]
741                                         <label for="B_address2">
742                                 [% END %]
743                                 Address 2: </label>
744                                 [% IF ( opduplicate ) %]
745                                         <input type="text" id="B_address2" name="B_address2" size="40" value="[% B_address2 %]" onclick="this.value=''" />
746                                 [% ELSE %]
747                                         <input type="text" id="B_address2" name="B_address2" size="40" value="[% B_address2 %]" />
748                                 [% END %]
749           [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
750                         </li>
751         [% END %]
752         [% UNLESS noB_city %]
753                         <li>
754                                 [% IF ( mandatoryB_city ) %]
755                                         <label for="B_city" class="required" >
756                                 [% ELSE %]
757                                         <label for="B_city">
758                                 [% END %]
759                                 City: </label>
760                                 <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
761           [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
762                         </li>
763         [% END %]
764         [% UNLESS noB_state %]
765                         <li>
766                                 [% IF ( mandatoryB_state ) %]
767                                         <label for="B_state" class="required" >
768                                 [% ELSE %]
769                                         <label for="B_state">
770                                 [% END %]
771                                 State: </label>
772                                 <input type="text" id="B_state" name="B_state" size="20" value="[% B_state %]" />
773           [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
774                         </li>
775         [% END %]
776         [% UNLESS noB_zipcode %]
777                         <li>
778                                 [% IF ( mandatoryB_zipcode ) %]
779                                         <label for="B_zipcode" class="required">
780                                 [% ELSE %]
781                                         <label for="B_zipcode">
782                                 [% END %]
783                                 Zip/Postal code: </label>
784                                 [% IF ( opduplicate ) %]
785                                         <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" onclick="this.value=''" />
786                                 [% ELSE %]
787                                         <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" />
788                                 [% END %]
789           [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
790                         </li>
791         [% END %]
792         [% UNLESS noB_country %]
793                         <li>
794                                 [% IF ( mandatoryB_country ) %]
795                                         <label for="B_country" class="required">
796                                 [% ELSE %]
797                                         <label for="B_country">
798                                 [% END %]
799                                 Country: </label>
800                                 [% IF ( opduplicate ) %]
801                                         <input type="text" id="B_country" name="B_country" size="20" value="[% B_country %]" onclick="this.value=''" />
802                                 [% ELSE %]
803                                         <input type="text" id="B_country" name="B_country" size="20" value="[% B_country %]" />
804                                 [% END %]
805           [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
806                         </li>
807         [% END %]
808         [% UNLESS noB_phone %]
809             <li>
810                 [% IF ( mandatoryB_phone ) %]
811                 <label for="B_phone" class="required">
812                 [% ELSE %]
813                 <label for="B_phone">
814                 [% END %]
815                 Phone: </label>
816                 [% IF ( opduplicate ) %]
817                                         <input type="text" id="B_phone" name="B_phone" value="[% B_phone %]" onclick="this.value=''" />
818                 [% ELSE %]
819                                         <input type="text" id="B_phone" name="B_phone" value="[% B_phone %]" />
820                 [% END %]
821                 [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
822             </li>
823         [% END %]
824         [% UNLESS noB_email %]
825                         <li> 
826         [% IF ( mandatoryB_email ) %]
827           <label for="B_email" class="required">
828         [% ELSE %]
829           <label for="B_email">
830         [% END %]
831         Email: </label>
832         [% IF ( opduplicate ) %]
833                         <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" onclick="this.value=''" />
834         [% ELSE %]
835                         <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" />
836                 [% END %]
837                 [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
838         [% END %]
839         [% UNLESS nocontactnote %]
840             <li>
841                 [% IF ( mandatorycontactnote ) %]
842                 <label for="contactnote" class="required">
843                 [% ELSE %]
844                 <label for="contactnote">
845                 [% END %]
846                 Contact note: </label>
847                 <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote %]</textarea>
848         [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
849             </li>
850         [% END %]
851                         </ol>
852                 </fieldset>
853     [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
854 [% END %]
855 [% IF ( step_2 ) %]
856     [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
857                 <fieldset class="rows" id="memberentry_altaddress">       
858             <legend id="alt_contact_lgd">Alternate contact</legend><ol>
859         [% UNLESS noaltcontactsurname %]
860                         <li>
861                             [% IF ( mandatoryaltcontactsurname ) %]
862                                 <label for="altcontactsurname" class="required">
863                                 [% ELSE %]
864                                 <label for="altcontactsurname">
865                                 [% END %]
866                                 Surname:</label>
867                                 [% IF ( opduplicate ) %]
868                                         <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" onclick="this.value=''" />
869                                 [% ELSE %]
870                                         <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" />
871                                 [% END %]
872                                 [% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
873                         </li>
874         [% END %]
875         [% UNLESS noaltcontactfirstname %]
876                         <li>
877                             [% IF ( mandatoryaltcontactfirstname ) %]
878                                 <label for="altcontactfirstname" class="required">
879                                 [% ELSE %]
880                                 <label for="altcontactfirstname">
881                                 [% END %]
882                                 First name:</label>
883                                 [% IF ( opduplicate ) %]
884                                         <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" onclick="this.value=''" />
885                                 [% ELSE %]
886                                         <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" />
887                                 [% END %]
888                                 [% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
889                         </li>
890         [% END %]
891         [% UNLESS noaltcontactaddress1 %]
892                         <li>
893                             [% IF ( mandatoryaltcontactaddress1 ) %]
894                                 <label for="altcontactaddress1" class="required">
895                                 [% ELSE %]
896                                 <label for="altcontactaddress1">
897                                 [% END %]
898                                 Address:</label>
899                                 [% IF ( opduplicate ) %]
900                                         <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" onclick="this.value=''" size="40" />
901                                 [% ELSE %]
902                                         <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" />
903                                 [% END %]
904                                 [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
905                         </li>
906         [% END %]
907         [% UNLESS noaltcontactaddress2 %]
908                         <li>
909                             [% IF ( mandatoryaltcontactaddress2 ) %]
910                                 <label for="altcontactaddress2" class="required">
911                                 [% ELSE %]
912                                 <label for="altcontactaddress2">
913                                 [% END %]
914                                 Address 2:</label>
915                                 [% IF ( opduplicate ) %]
916                                         <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" onclick="this.value=''" size="40" />
917                                 [% ELSE %]
918                                         <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" size="40" />
919                                 [% END %]
920                                 [% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
921                         </li>
922         [% END %]
923         [% UNLESS noaltcontactaddress3 %]
924                         <li>
925                             [% IF ( mandatoryaltcontactaddress3 ) %]
926                                 <label for="altcontactaddress3" class="required">
927                                 [% ELSE %]
928                                 <label for="altcontactaddress3">
929                                 [% END %]
930                                 City:</label>
931                                 <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
932                                 [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
933                         </li>
934         [% END %]
935         [% UNLESS noaltcontactstate %]
936                         <li>
937                             [% IF ( mandatoryaltcontactstate ) %]
938                                 <label for="altcontactstate" class="required">
939                                 [% ELSE %]
940                                 <label for="altcontactstate">
941                                 [% END %]
942                                 State:</label>
943                                 <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" />
944                                 [% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
945                         </li>
946         [% END %]
947         [% UNLESS noaltcontactzipcode %]
948                         <li>
949                             [% IF ( mandatoryaltcontactzipcode ) %]
950                                 <label for="altcontactzipcode" class="required">
951                                 [% ELSE %]
952                                 <label for="altcontactzipcode">
953                                 [% END %]
954                                 Zip/Postal code:</label>
955                                 [% IF ( opduplicate ) %]
956                                         <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" onclick="this.value=''" size="5" />
957                                 [% ELSE %]
958                                         <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" />
959                                 [% END %]
960                                 [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
961                         </li>
962         [% END %]
963         [% UNLESS noaltcontactcountry %]
964                         <li>
965                             [% IF ( mandatoryaltcontactcountry ) %]
966                                 <label for="altcontactcountry" class="required">
967                                 [% ELSE %]
968                                 <label for="altcontactcountry">
969                                 [% END %]
970                                 Country:</label>
971                                 [% IF ( opduplicate ) %]
972                                         <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" onclick="this.value=''" size="20" />
973                                 [% ELSE %]
974                                         <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" size="20" />
975                                 [% END %]
976                                 [% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
977                         </li>                   
978         [% END %]
979         [% UNLESS noaltcontactphone %]
980                         <li>
981                             [% IF ( mandatoryaltcontactphone ) %]
982                                 <label for="altcontactphone" class="required">
983                                 [% ELSE %]
984                                 <label for="altcontactphone">
985                                 [% END %]
986                                 Phone:</label>
987                                 [% IF ( opduplicate ) %]
988                                         <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" onclick="this.value=''" />
989                                 [% ELSE %]
990                                         <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" />
991                                 [% END %]
992                                 [% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
993                         </li>
994         [% END %]
995             </ol>
996         </fieldset>
997     [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
998
999 [% END %]
1000 [% IF ( step_3 ) %]
1001
1002   <fieldset class="rows" id="memberentry_library_management">
1003     <legend id="library_management_lgd">Library management</legend><ol>
1004         [% UNLESS nocardnumber %]
1005    <li> [% IF ( mandatorycardnumber ) %]
1006       <label for="cardnumber" class="required">
1007     [% ELSE %]
1008       <label for="cardnumber">
1009     [% END %] 
1010     Card number: </label>
1011     [% IF ( opduplicate ) %]
1012                 <input type="text" id="cardnumber" name="cardnumber" size="20" />
1013     [% ELSE %]
1014                 <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
1015     [% END %]
1016           [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]</li>
1017         [% END %]
1018         [% UNLESS nobranchcode %]
1019     <li>
1020       [% IF ( mandatorybranchcode ) %]
1021         <label for="branchcode" class="required">
1022       [% ELSE %]
1023         <label for="branchcode">
1024       [% END %]
1025       Library: </label>
1026       [% CGIbranch %]
1027           [% IF ( mandatorybranchcode ) %]<span class="required">Required</span>[% END %]
1028     </li>
1029         [% END %]
1030     <li>
1031         <label for="categorycode">Category: </label>
1032         <select id="categorycode" name="categorycode" onchange="update_category_code(this);">
1033         [% FOREACH typeloo IN typeloop %]
1034             [% FOREACH categoryloo IN typeloo.categoryloop %]
1035                 [% IF ( loop.first ) %]
1036                     [% IF ( typeloo.typename_C ) %]<optgroup label="Child"        value="C">[% END %]
1037                     [% IF ( typeloo.typename_A ) %]<optgroup label="Adult"        value="A">[% END %]
1038                     [% IF ( typeloo.typename_S ) %]<optgroup label="Staff"        value="S">[% END %]
1039                     [% IF ( typeloo.typename_I ) %]<optgroup label="Organization" value="I">[% END %]
1040                     [% IF ( typeloo.typename_P ) %]<optgroup label="Professional" value="P">[% END %]
1041                     [% IF ( typeloo.typename_X ) %]<optgroup label="Statistical"  value="X">[% END %]
1042                 [% END %]
1043                 [% IF ( categoryloo.categorycodeselected ) %]
1044                     <option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
1045                 [% ELSE %]
1046                     <option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option>
1047                 [% END %]
1048                 [% IF ( loop.last ) %]
1049                     </optgroup>
1050                 [% END %]
1051             [% END %]
1052        [% END %]
1053        </select>
1054     </li>
1055         [% UNLESS nosort1 %]
1056     <li>
1057       [% IF ( mandatorysort1 ) %]
1058         <label for="sort1" class="required">
1059       [% ELSE %]
1060         <label for="sort1">
1061       [% END %]
1062       Sort 1: </label>
1063       [% IF ( CGIsort1 ) %] 
1064         [% CGIsort1 %]
1065       [% ELSE %]
1066         <input  type="text" id="sort1" name="sort1" size="20"  value="[% sort1 %]" />
1067           [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
1068       [% END %]   
1069     </li>
1070         [% END %]
1071         [% UNLESS nosort2 %]
1072     <li>
1073     [% IF ( mandatorysort2 ) %]
1074     <label for="sort2" class="required">
1075     [% ELSE %]
1076     <label for="sort2">
1077     [% END %]
1078     Sort 2: </label>
1079     [% IF ( CGIsort2 ) %] 
1080       [% CGIsort2 %]
1081     [% ELSE %]
1082       [% IF ( opduplicate ) %]
1083                 <input  type="text" id="sort2" name="sort2" size="20"  value="[% sort2 %]" onclick="this.value=''" />
1084       [% ELSE %]
1085                 <input  type="text" id="sort2" name="sort2" size="20"  value="[% sort2 %]" />
1086       [% END %]
1087           [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
1088     [% END %] 
1089     </li>
1090         [% END %]
1091         </ol>
1092   </fieldset>
1093     [% UNLESS nodateenrolled && nodateexpiry &&  noopacnote && noborrowernotes %]
1094         <fieldset class="rows" id="memberentry_subscription">
1095         <legend id="library_setup_lgd">Library set-up</legend><ol>
1096         [% UNLESS nodateenrolled %]
1097                 <li>
1098                         [% IF ( mandatorydateenrolled ) %]
1099                         <label for="dateenrolled" class="required">
1100                         [% ELSE %]
1101                         <label for="dateenrolled">
1102                         [% END %]
1103                         Registration date: </label>
1104                         [% IF ( metric ) %]
1105                                 <input type="text" id="dateenrolled" name="dateenrolled"  maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" />
1106                         [% ELSE %]
1107                                 <input type="text" id="dateenrolled" name="dateenrolled"  maxlength="10" size="10" value="[% dateenrolled %]" />
1108                         [% END %]
1109             <img src="[% themelang %]/lib/calendar/cal.gif" id="dateenrolled_button" alt="Show Calendar" />
1110       <script language="JavaScript" type="text/javascript">
1111         Calendar.setup(
1112           {
1113             inputField : "dateenrolled",
1114             ifFormat : "[% DHTMLcalendar_dateformat %]",
1115             button : "dateenrolled_button"
1116           }
1117         );
1118       </script>
1119                 [% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
1120                 [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
1121                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1122                 </li>
1123         [% END %]
1124         [% UNLESS nodateexpiry %]
1125                 <li>
1126                         [% IF ( mandatorydateexpiry ) %]
1127                         <label for="dateexpiry" class="required">
1128                         [% ELSE %]
1129                         <label for="dateexpiry">
1130                         [% END %]
1131                         Expiry date (leave blank for auto calc) </label>
1132                         [% IF ( metric ) %]
1133                                 [% UNLESS ( opadd ) %]
1134                                         <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" />
1135                                 [% ELSE %]
1136                                         <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" />
1137                                 [% END %]
1138                         [% ELSE %]
1139                                 [% UNLESS ( opadd ) %]
1140                                 <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" value="[% dateexpiry %]" />
1141                                 [% ELSE %]
1142                                 <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" />
1143                                 [% END %]
1144                         [% END %]
1145             <img src="[% themelang %]/lib/calendar/cal.gif" id="dateexpiry_button" alt="Show Calendar" />
1146       <script language="JavaScript" type="text/javascript">
1147         Calendar.setup(
1148           {
1149             inputField : "dateexpiry",
1150             ifFormat : "[% DHTMLcalendar_dateformat %]",
1151             button : "dateexpiry_button"
1152           }
1153         );
1154       </script>
1155                 [% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
1156                 [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
1157                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1158                 </li>
1159         [% END %]
1160         [% UNLESS noopacnote %]
1161                 <li>
1162                         [% IF ( mandatoryopacnote ) %]
1163                                 <label for="opacnote" class="required">
1164                         [% ELSE %]
1165                                 <label for="opacnote">
1166                         [% END %]       
1167                         OPAC note: </label>
1168                         <textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote %]</textarea>
1169                         <div class="hint">This message appears on this patron's user page in the OPAC</div>
1170           [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
1171                 </li>
1172         [% END %]
1173         [% UNLESS noborrowernotes %]
1174                 <li>
1175                         [% IF ( mandatoryborrowernotes ) %]     
1176                                 <label for="borrowernotes" class="required">
1177                         [% ELSE %]
1178                                 <label for="borrowernotes">
1179                         [% END %]
1180                         Circulation note: </label>
1181                         <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes %]</textarea>
1182                         <div class="hint">This message displays when checking out to this patron</div>
1183           [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
1184                 </li>
1185         [% END %]
1186                 </ol>
1187         </fieldset>
1188     [% END # hide fieldset %]
1189
1190     [% UNLESS nouserid && nopassword %]
1191         <fieldset class="rows" id="memberentry_userid">
1192         <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
1193         [% UNLESS nouserid %]
1194                 <li>
1195                         [% IF ( mandatoryuserid ) %]
1196                         <label for="userid" class="required">
1197                         [% ELSE %]
1198                         <label for="userid">
1199                         [% END %]
1200                         Username: </label>
1201
1202 [% IF ( NoUpdateLogin ) %]
1203         [% IF ( opduplicate ) %]
1204                 <input type="text" id="userid" name="userid" size="20" disabled="disabled" />
1205         [% ELSE %]
1206                 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% userid %]" />
1207         [% END %]
1208 [% ELSE %]
1209         [% IF ( opduplicate ) %]
1210                 <input type="text" id="userid" name="userid" size="20" value="" />
1211         [% ELSE %]
1212                 <input type="text" id="userid" name="userid" size="20" value="[% userid %]" />
1213         [% END %]
1214 [% END %]
1215
1216           [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
1217                 </li>
1218         [%END %]
1219         [% UNLESS nopassword %]
1220                 <li>
1221                         [% IF ( mandatorypassword ) %]
1222                         <label for="password" class="required">
1223                         [% ELSE %]
1224                         <label for="password">
1225                         [% END %]
1226                         Password: </label>
1227                         [% IF ( opadd ) %]
1228                         [% IF ( NoUpdateLogin ) %]
1229                                 [% IF ( opduplicate ) %]
1230                                         <input type="password" id="password" name="password" size="20"  disabled="disabled" />
1231                                 [% ELSE %]
1232                                         <input type="password" id="password" name="password" size="20"  disabled="disabled" value="[% password %]" />
1233                                 [% END %]
1234 [% ELSE %]
1235                                 [% IF ( opduplicate ) %]
1236                                         <input type="password" id="password" name="password" size="20" />
1237                                 [% ELSE %]
1238                                         <input type="password" id="password" name="password" size="20" value="[% password %]" />
1239                                 [% END %]
1240 [% END %]
1241                         [% ELSE %]
1242                         [% IF ( password ) %]
1243                                 [% IF ( NoUpdateLogin ) %]
1244                                         <input type="password" id="password" name="password" size="20"  disabled="disabled" value="****" />
1245                                 [% ELSE %]
1246                                         [% IF ( opduplicate ) %]
1247                                                 <input type="password" id="password" name="password" size="20" />
1248                                         [% ELSE %]
1249                                                 <input type="password" id="password" name="password" size="20" value="****" />
1250                                         [% END %]
1251                                 [% END %]
1252                         [% ELSE %]
1253                                 [% IF ( NoUpdateLogin ) %]
1254                                         <input type="password" id="password" name="password" size="20"  disabled="disabled" value="" />
1255                                 [% ELSE %]
1256                                         <input type="password" id="password" name="password" size="20" value="" />
1257                                 [% END %]
1258                         [% END %]
1259                         [% END %]
1260           [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
1261 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
1262                 </li>
1263                 <li>
1264                         [% IF ( mandatorypassword ) %]
1265                         <label for="password2" class="required">
1266                         [% ELSE %]
1267                         <label for="password2">
1268                         [% END %]
1269                         Confirm password: </label>
1270                         [% IF ( opadd ) %]
1271                         [% IF ( NoUpdateLogin ) %]
1272                                 [% IF ( opduplicate ) %]
1273                                         <input type="password" id="password2" name="password2" size="20"  disabled="disabled" />
1274                                 [% ELSE %]
1275                                         <input type="password" id="password2" name="password2" size="20"  disabled="disabled" value="[% password %]" />
1276                                 [% END %]
1277 [% ELSE %]
1278                                 [% IF ( opduplicate ) %]
1279                                         <input type="password" id="password2" name="password2" size="20" />
1280                                 [% ELSE %]
1281                                         <input type="password" id="password2" name="password2" size="20" value="[% password %]" />
1282                                 [% END %]
1283 [% END %]
1284                         [% ELSE %]
1285                         [% IF ( password ) %]
1286                                 [% IF ( NoUpdateLogin ) %]
1287                                         <input type="password" id="password2" name="password2" size="20"  disabled="disabled" value="****" />
1288                                 [% ELSE %]
1289                                         [% IF ( opduplicate ) %]
1290                                                 <input type="password" id="password2" name="password2" size="20" />
1291                                         [% ELSE %]
1292                                                 <input type="password" id="password2" name="password2" size="20" value="****" />
1293                                         [% END %]
1294                                 [% END %]
1295                         [% ELSE %]
1296                                 [% IF ( NoUpdateLogin ) %]
1297                                         <input type="password" id="password2" name="password2" size="20"  disabled="disabled" value="" />
1298                                 [% ELSE %]
1299                                         <input type="password" id="password2" name="password2" size="20" value="" />
1300                                 [% END %]
1301                         [% END %]
1302                         [% END %]
1303           [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
1304                 </li>
1305                 </ol>
1306                 </fieldset>
1307         [% END # hide fieldset %][% END %]
1308                 <!--this zones are not necessary in modif mode -->
1309                 [% UNLESS ( opadd ) %]
1310                 <fieldset class="rows">
1311             <legend>Patron account flags</legend>
1312                         <ol class="radio">
1313                         [% FOREACH flagloo IN flagloop %]
1314                                 <li><label class="radio" for="yes[% flagloo.name %]">
1315                 [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1316                                 [% IF ( flagloo.key == 'debarred' ) %]Restricted:[% END %]
1317                 [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1318                 </label>
1319                                 <label for="yes[% flagloo.name %]">Yes </label>
1320                                 [% IF ( flagloo.yes ) %]
1321                                 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" />
1322                                 [% ELSE %]
1323                                 <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" />
1324                                 [% END %]
1325                                 <label for="no[% flagloo.name %]">No </label>
1326                                 [% IF ( flagloo.no ) %]
1327                                 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" checked="checked"/>
1328                                 [% ELSE %]
1329                                 <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" />
1330                                 [% END %]
1331
1332             </li>
1333                         [% END %]
1334                         <li>
1335                                 <label for="yesdebarred" class="radio">Restricted: </label>
1336                                 [% IF ( debarred ) %]
1337                                 <label for="yesdebarred">Yes </label>
1338                                 <input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/>
1339                 <label for="nodebarred">No </label>
1340                 <input type="radio" id="nodebarred" name="debarred" value="0"/>
1341                                 [% ELSE %]
1342                                 <label for="yesdebarred">Yes </label>
1343                                 <input type="radio" id="yesdebarred" name="debarred" value="1" />
1344                 <label for="nodebarred">No </label>
1345                 <input type="radio" id="nodebarred" name="debarred" value="0" checked="checked"/>
1346                                 [% END %]
1347                                 
1348                                 <br />
1349                                 <label for="datedebarred" class="radio">until:</label> 
1350                                 [% IF opduplicate %]
1351                                     <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" onclick="this.value=''" />
1352                                 [% ELSE %]
1353                                     <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" />
1354                                 [% END %]
1355                                 <img src="[% themelang %]/lib/calendar/cal.gif" id="debarred_button" alt="Show Calendar" />
1356                          <script language="JavaScript" type="text/javascript">
1357                             Calendar.setup(
1358                             {
1359                                 inputField : "datedebarred",
1360                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
1361                                 button : "debarred_button"
1362                             }
1363                             );
1364                         </script>
1365                         <br />
1366                         <label for="debarredcomment" class="radio">Comment:</label>
1367                                [% IF ( opduplicate ) %] 
1368                                    <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" onclick="this.value=''">[% debarredcomment %]</textarea>
1369                                [% ELSE %]
1370                                    <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3">[% debarredcomment %]</textarea>
1371                                [% END %]
1372                 </li>
1373
1374                         </ol>
1375                         </fieldset>
1376     
1377                 [% END %]
1378
1379 [% END %]
1380
1381 [% IF ( step_4 ) %][% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1382   <fieldset class="rows" id="memberentry_patron_attributes">
1383     <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1384     <legend>Additional attributes and identifiers</legend>
1385     [% FOREACH pa_loo IN patron_attributes %]
1386         [% IF pa_loo.class %]
1387             <table id="aai_[% pa_loo.class %]" class="attributes_table">
1388             <caption>[% pa_loo.lib %]</caption>
1389         [% ELSE %]
1390             <table id="aai" class="attributes_table">
1391         [% END %]
1392         <thead>
1393             <tr>
1394                 <th>Type</th>
1395                 <th colspan="2">Value</th>
1396             </tr>
1397         </thead>
1398         <tbody>
1399             [% FOREACH patron_attribute IN pa_loo.items %]
1400                 <tr data-category_code="[% patron_attribute.category_code %]">
1401                     <td>
1402                         [% patron_attribute.code %] ([% patron_attribute.description %])
1403                     </td>
1404                     <td>
1405                         <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1406                         [% IF ( patron_attribute.use_dropdown ) %]
1407                             <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1408                                 <option value="" />
1409                                 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1410                                     [% IF ( auth_val_loo.selected ) %]
1411                                         <option value="[% auth_val_loo.authorised_value %]" selected="selected">
1412                                             [% auth_val_loo.lib %]
1413                                         </option>
1414                                     [% ELSE %]
1415                                         <option value="[% auth_val_loo.authorised_value %]" >
1416                                             [% auth_val_loo.lib %]
1417                                         </option>
1418                                     [% END %]
1419                                 [% END %]
1420                             </select>
1421                         [% ELSE %]
1422                             [% IF ( opduplicate ) %]
1423                             <input type="text" maxlength="64" value="[% patron_attribute.value %]"
1424                                    id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" />
1425                             [% ELSE %]
1426                             <input type="text" maxlength="64" value="[% patron_attribute.value %]"
1427                                    id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" />
1428                             [% END %]
1429                         [% END %]
1430                         [% IF ( patron_attribute.password_allowed ) %]
1431                             (Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1432                                    id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1433                         [% END %]
1434                     </td>
1435                     <td>
1436                         <a href="#" onclick="clear_entry(this); return false;">Clear</a>
1437                         [% IF ( patron_attribute.repeatable ) %]
1438                         <a href="#" onclick="clone_entry(this); return false;">New</a>
1439                         [% END %]
1440                     </td>
1441                 </tr>
1442             [% END %]
1443         </tbody>
1444         </table>
1445     [% END %]
1446   </fieldset>
1447 [% END %][% END %][% END %]
1448
1449 [% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1450   <fieldset class="rows" id="memberentry_messaging_prefs">
1451     [% IF ( opadd ) %]
1452     <!-- handle changing prefs if creating new patron and changing
1453          the patron category
1454     -->
1455     <script language="javascript" type="text/javascript">//<![CDATA[
1456        $(document).ready(function(){
1457             var message_prefs_dirty = false;
1458             $('#memberentry_messaging_prefs > *').change(function() {
1459                 message_prefs_dirty = true;
1460             });
1461             $('#categorycode').change(function() {
1462                 var categorycode = $(this).val();
1463                 if (message_prefs_dirty) {
1464                     if (!confirm('Change messaging preferences to default for this category?')) {
1465                         return;
1466                     }
1467                 }
1468                 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1469                     function(data) {
1470                         $.each(data.messaging_preferences, function(i, item) {
1471                             var attrid = item.message_attribute_id;
1472                             var transports = ['email', 'rss', 'sms'];
1473                             $.each(transports, function(j, transport) {
1474                                 if (item['transport-' + transport] != ' ') {
1475                                     $('#' + transport + attrid).attr('checked', item['transport-' + transport]);
1476                                 } else {
1477                                     $('#' + transport + attrid).removeAttr('checked');
1478                                 }
1479                             });
1480                             if (item.digest && item.digest != ' ') {
1481                                 $('#digest' + attrid).attr('checked', item.digest);
1482                             } else {
1483                                 $('#digest' + attrid).removeAttr('checked');
1484                             }
1485                             if (item.takes_days == '1') {
1486                                 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1487                             }
1488                         });
1489                         message_prefs_dirty = false;
1490                     }
1491                 );
1492             });
1493         });
1494     //]]>
1495     </script>
1496     [% END %]
1497     <input type="hidden" name="setting_messaging_prefs" value="1" />
1498     <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1499     [% IF type_only %]
1500         <p>If no preferences are selected, the default preferences for the category chosen will be applied on save, otherwise your selection here is saved</p>
1501     [% END %]
1502     [% INCLUDE 'messaging-preference-form.inc' %]
1503     [% IF ( SMSSendDriver ) %]
1504         <p><label for="SMSnumber">SMS number:</label>
1505           [% IF ( opduplicate ) %]
1506             <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" onclick="this.value=''" />
1507           [% ELSE %]
1508             <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
1509         [% END %]
1510         </p>
1511     [% END %]
1512   </fieldset>
1513 [% END %] [% END %]
1514
1515     <fieldset class="action">
1516         <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1517       [% IF ( opadd ) %]
1518        <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1519            [% ELSE %]
1520           <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
1521            [% END %]
1522     </fieldset>
1523 </form>
1524   
1525 </div>
1526 </div>
1527
1528 [% UNLESS ( opadd ) %]<div class="yui-b">
1529 [% INCLUDE 'members-menu.inc' %]
1530 </div>[% END %]
1531 [% END %]
1532 </div>
1533 [% INCLUDE 'intranet-bottom.inc' %]
1534