Markup corrections to fix for Bug 4248
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / memberentrygen.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Patrons &rsaquo; 
3 <!-- TMPL_IF NAME="opadd" -->   Add<!-- TMPL_ELSE --> Modify<!--/TMPL_IF--> <!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF --><!--TMPL_UNLESS Name="opadd"--> <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR name="firstname" --><!--/TMPL_UNLESS--></title>
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/members.js"></script>
6 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
7 <script type="text/JavaScript" language="JavaScript">
8 //<![CDATA[
9     $(document).ready(function() {
10                 $("fieldset.rows input").keydown(function(e){ return checkEnter(e); });
11         $("#guarantordelete").click(function() {
12             $("#contact-details").hide().find('a').remove();
13             $("#guarantorid, #contactname, #contactfirstname").each(function () { this.value = "" });
14             $("#contactname, #contactfirstname")
15                 .each(function () { this.type = 'text' })
16                 .parent().find('span').remove();
17             $("#guarantorsearch").val("Set to Patron");
18         });
19         $("#select_city").change(function(){
20             var myRegEx=new RegExp(/(.*)\|(.*)/);
21             document.form.select_city.value.match(myRegEx);
22             document.form.zipcode.value=RegExp.$1;
23             document.form.city.value=RegExp.$2;
24         });
25     });
26
27     function clear_entry(node) {
28         var original = node.parentNode.parentNode;
29         $("input[type=text]", original).attr('value', '');
30         $("select", original).attr('value', '');
31     }
32
33     function clone_entry(node) {
34         var original = node.parentNode.parentNode;
35         var clone = original.cloneNode(true);
36         var newId = 50 + parseInt(Math.random() * 100000);
37         $("input", clone).attr('id', function() {
38             return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
39         });
40         $("input", clone).attr('name', function() {
41             return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
42         });
43         $("select", clone).attr('id', function() {
44             return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
45         });
46         $("select", clone).attr('name', function() {
47             return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
48         });
49         original.parentNode.insertBefore(clone, original.nextSibling);
50     }
51
52 //]]>
53 </script>
54 </head>
55 <body>
56 <!-- TMPL_INCLUDE NAME="header.inc" -->
57 <!-- TMPL_INCLUDE NAME="patron-search.inc" -->
58
59 <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; 
60 <!-- TMPL_IF NAME="opadd" -->
61                 Add<!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF -->
62 <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" -->
63 <!-- TMPL_ELSE --> 
64 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR NAME="surname" --></a> &rsaquo; <strong>Modify<!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF -->
65 </strong><!-- /TMPL_IF --></div>
66
67 <!-- TMPL_IF NAME="opadd" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
68    
69    <div id="bd">
70         <div id="yui-main">
71         <div class="yui-b">
72
73
74         <!-- TMPL_IF NAME="opadd" -->
75         <h1>
76                 Add<!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF --> <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR NAME="surname" --> 
77         </h1>
78         <!-- TMPL_ELSE -->
79         <h1>
80                 Modify<!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF -->
81 <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR NAME="surname" --> 
82         </h1>
83         <!-- /TMPL_IF -->
84   
85         <!-- TMPL_IF NAME="check_member" -->
86                 <p>
87                 <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post">
88                         <div class="dialog alert">
89                                 <h3>Duplicate suspected</h3>
90                                 <a href="javascript:Dopop('borrowers_details.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->');" >Detail</a>
91                                 Duplicate ?
92                                 <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=<!--TMPL_VAR NAME="check_member"-->&amp;category_type=<!--TMPL_VAR NAME="check_categorytype"-->">Yes</a>
93                                 &nbsp;&nbsp;&nbsp; No, it is not
94                                 <!-- TMPL_IF NAME="checked"-->
95                                         <input type="checkbox" checked="checked" name="answernodouble" >
96                                 <!-- TMPL_ELSE -->
97                                         <input type="checkbox" name="answernodouble" />
98                                 <!-- /TMPL_IF -->
99                         </div>
100                 </form>
101                 </p>
102         <!--/TMPL_IF-->
103
104         <!-- TMPL_IF Name="debug" -->
105                 <div id="debug">
106                                 <div>Debug is on (level <!-- TMPL_VAR NAME="debug" -->)</div>
107                 </div>
108         <!-- /TMPL_IF -->
109         <!-- TMPL_IF Name="nok" -->
110                 <div class="dialog alert">
111                         <p>The following fields are wrong. Please fix them.</p>
112                         <ul>
113                         <!-- TMPL_IF NAME="ERROR_login_exist" -->
114                                 <li id="ERROR_login_exist">Login/password already exists.</li>
115                         <!-- /TMPL_IF -->
116                         <!-- TMPL_IF NAME="ERROR_cardnumber" -->
117                                 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
118                         <!-- /TMPL_IF -->
119                         <!-- TMPL_IF NAME="ERROR_age_limitations" -->
120                                 <li id="ERROR_age_limitations">Patron's age is incorrect for their category.  
121                                         Ages allowed are <!-- TMPL_VAR NAME="ERROR_age_limitations"-->.</li>
122                         <!-- /TMPL_IF -->
123                         <!-- TMPL_IF NAME="ERROR_branch" -->
124                                 <li id="ERROR_branch">Library is invalid.</li>
125                         <!-- /TMPL_IF -->   
126                         <!-- TMPL_IF NAME="ERROR_dateofbirth" -->
127                                 <li id="ERROR_dateofbirth">Date of birth is invalid.</li>
128                         <!-- /TMPL_IF -->
129                         <!-- TMPL_IF NAME="ERROR_dateenrolled" -->
130                                 <li id="ERROR_dateenrolled">Date of enrollment is invalid.</li>
131                         <!-- /TMPL_IF -->
132                         <!-- TMPL_IF NAME="ERROR_dateexpiry" -->
133                                 <li id="ERROR_dateexpiry">Date of expiration is invalid.</li>
134                         <!-- /TMPL_IF -->
135                         <!-- TMPL_IF NAME="ERROR_short_password" -->
136                                 <li id="ERROR_short_password">Password must be at least <!-- TMPL_VAR NAME="minPasswordLength" --> characters long.</li>
137                         <!-- /TMPL_IF -->
138             <!-- TMPL_IF NAME="ERROR_extended_unique_id_failed" -->
139                 <li id="ERROR_extended_unique_id_failed">The attribute value 
140                     <!-- TMPL_VAR NAME="ERROR_extended_unique_id_failed" --> is already is use by another patron record.</li>
141                         <!-- /TMPL_IF -->
142                         </ul>
143                 </div>
144         <!-- /TMPL_IF -->
145         
146   
147 <form name="form" id="entryform"  action="/cgi-bin/koha/members/memberentry.pl" method="post"> 
148 <!--    field always hidden in different form (1,2,3) -->
149 <input type="hidden" name="BorrowerMandatoryField" value="<!--TMPL_VAR NAME="BorrowerMandatoryField"-->" />
150 <input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->" />
151 <input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->" />
152 <input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->" />
153 <input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
154 <input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
155 <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
156 <input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
157 <!--TMPL_IF Name="step"--><input type="hidden" name="step"  value="<!-- TMPL_VAR NAME="step" -->" /><!--/TMPL_IF-->
158 <!-- TMPL_IF NAME="opadd" --><input type="hidden" name="op" value="insert" /><!-- TMPL_ELSE --><input type="hidden" name="op" value="save" /><!-- /TMPL_IF -->
159
160 <!--TMPL_IF Name="step_1"-->
161         <fieldset class="rows" id="memberentry_identity">
162                 <legend><!--TMPL_IF Name="I"-->Organization <!--TMPL_ELSE-->Patron <!--/TMPL_IF-->identity</legend>
163                 <ol>
164                 <!-- TMPL_UNLESS name="I" -->
165                 <!-- TMPL_IF NAME="title_cgipopup" -->
166             <li>
167             <!-- TMPL_IF NAME="mandatorytitle" -->
168                 <label for="btitle" class="required">
169             <!-- TMPL_ELSE -->
170                 <label for="btitle">
171             <!-- /TMPL_IF-->
172             Salutation: </label>
173             <!-- TMPL_VAR NAME="borrotitlepopup" -->
174             <!-- TMPL_IF NAME="mandatorytitle" --><span class="required">Required</span><!-- /TMPL_IF -->
175             </li>
176                 <!-- /TMPL_IF -->
177         <!-- /TMPL_UNLESS -->
178                 <li>
179                 <!-- TMPL_IF NAME="mandatorysurname" -->
180                 <label for="surname" class="required">
181                 <!-- TMPL_ELSE -->
182                 <label for="surname">
183                 <!-- /TMPL_IF-->
184                 Surname: </label>
185                 <!-- TMPL_IF NAME="uppercasesurnames" -->
186                 <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" />
187                 <!-- TMPL_ELSE -->
188                 <input type="text" id="surname" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" />
189                 <!-- /TMPL_IF -->
190                 <!-- TMPL_IF NAME="mandatorysurname" --><span class="required">Required</span><!-- /TMPL_IF -->
191                 </li>
192                 <!-- TMPL_UNLESS name="I" -->
193             <li>
194                 <!-- TMPL_IF NAME="mandatoryfirstname" -->
195                 <label for="firstname" class="required">
196                 <!-- TMPL_ELSE -->
197                 <label for="firstname">
198                 <!-- /TMPL_IF-->
199                 First name: </label>
200                 <input type="text" id="firstname" name="firstname" size="20"  value="<!-- TMPL_VAR NAME="firstname" -->" />
201                 <!-- TMPL_IF NAME="mandatoryfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
202             </li>
203             <li>
204                 <!-- TMPL_IF NAME="mandatorydateofbirth" -->
205                 <label for="dateofbirth" class="required">
206                 <!-- TMPL_ELSE -->
207                 <label for="dateofbirth">
208                 <!-- /TMPL_IF-->
209                 Date of birth: </label>
210                                 
211         <!-- TMPL_IF NAME="metric" -->                  
212                 <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="<!-- TMPL_VAR NAME="dateofbirth" -->" />
213 <!-- TMPL_ELSE -->
214                 <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="<!-- TMPL_VAR NAME="dateofbirth" -->" />
215 <!-- /TMPL_IF -->
216
217                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="dateofbirth_button" alt="Show Calendar" />
218         <script language="JavaScript" type="text/javascript">
219             Calendar.setup(
220             {
221                 inputField : "dateofbirth",
222                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
223                 button : "dateofbirth_button"
224             }
225             );
226         </script>
227         <!-- TMPL_IF NAME="mandatorydateofbirth" --><span class="required">Required</span><!-- /TMPL_IF -->
228         <!-- TMPL_IF NAME="ERROR_dateofbirth" --><span class="required">(Error)</span><!-- /TMPL_IF -->
229                 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
230             </li>
231             <li>
232                 <!-- TMPL_IF NAME="mandatoryinitials" -->
233                     <label for="initials" class="required">
234                 <!-- TMPL_ELSE -->
235                     <label for="initials">
236                 <!-- /TMPL_IF-->
237                 Initials: </label>
238                 <input type="text" id="initials" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->" />        
239                 <!-- TMPL_IF NAME="mandatoryinitials" --><span class="required">Required</span><!-- /TMPL_IF -->
240             </li>
241         <!-- /TMPL_UNLESS -->
242                 <li>
243                         <!-- TMPL_IF NAME="mandatoryothernames" -->
244                         <label for="othernames" class="required">
245                         <!-- TMPL_ELSE -->
246                         <label for="othernames">
247                         <!-- /TMPL_IF-->
248                         Other name: </label>
249                         <input type="text" id="othernames" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" />
250 <!-- TMPL_IF NAME="mandatoryothernames" --><span class="required">Required</span><!-- /TMPL_IF -->
251                 <!-- TMPL_IF NAME="I" --><input type="hidden" name="sex" value="N" /><!-- /TMPL_IF -->
252                 </li>
253     <!--TMPL_UNLESS Name="I"-->
254                 <li class="radio">
255                 
256                 <!-- TMPL_IF NAME="female" -->
257                                 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked"  />
258 <!-- TMPL_ELSE -->
259                                 <label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
260 <!-- /TMPL_IF -->
261                 <!-- TMPL_IF NAME="male" -->
262                 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
263 <!-- TMPL_ELSE -->
264                                 <label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
265 <!-- /TMPL_IF -->
266 <!-- TMPL_IF NAME="none" -->
267                                 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value=""  checked="checked"  />
268 <!-- TMPL_ELSE -->
269                                 <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
270 <!-- /TMPL_IF -->
271         </li>
272     <!--/TMPL_UNLESS-->
273                 </ol>
274         </fieldset>
275         
276 <!--TMPL_IF Name="showguarantor"--><input type="hidden" id="guarantorid" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->" />
277     <fieldset class="rows">
278         <legend>Guarantor Information</legend>
279         <ol>
280 <!--TMPL_IF Name="P"-->
281                 <!-- TMPL_IF NAME="guarantorid" -->
282                 <li id="contact-details">
283                 <!-- TMPL_ELSE -->
284                 <li id="contact-details" style="display: none">
285                 <!-- /TMPL_IF -->
286                     <span class="label">Organization #:</span> <!-- TMPL_IF NAME="guarantorid" --> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="guarantorid" -->" target="blank"><!-- TMPL_VAR NAME="guarantorid" --></a><!-- /TMPL_IF -->
287                 </li>
288                 <li>
289                     <label for="contactname">Organization name: </label>
290                     <!-- TMPL_IF NAME="guarantorid" -->
291                     <span><!-- TMPL_VAR NAME="contactname" --></span>
292                     <input name="contactname" id="contactname" type="hidden" size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
293                     <!-- TMPL_ELSE -->
294                     <input name="contactname" id="contactname" type="text" size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
295                     <!-- /TMPL_IF -->
296                 </li>
297 <!-- TMPL_ELSE -->
298  <!-- TMPL_IF NAME="C" -->
299  <!-- TMPL_IF NAME="guarantorid" -->
300  <li id="contact-details">
301  <!-- TMPL_ELSE -->
302  <li id="contact-details" style="display: none">
303  <!-- /TMPL_IF -->
304      <span class="label">Patron #:</span> <!-- TMPL_IF NAME="guarantorid" --> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="guarantorid" -->" target="blank"><!-- TMPL_VAR NAME="guarantorid" --></a><!-- /TMPL_IF -->
305  </li>
306  <li>
307      <label for="contactname">Surname: </label>
308      <!-- TMPL_IF NAME="guarantorid" -->
309      <span><!-- TMPL_VAR NAME="contactname" --></span>
310      <input name="contactname" id="contactname" type="hidden" size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
311      <!-- TMPL_ELSE -->
312      <input name="contactname" id="contactname" type="text" size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
313      <!-- /TMPL_IF -->
314  </li>
315  <li>
316      <label for="contactfirstname">First name: </label>
317      <!-- TMPL_IF NAME="guarantorid" -->
318      <span><!-- TMPL_VAR NAME="contactfirstname" --></span>
319      <input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->" />
320      <!-- TMPL_ELSE -->
321      <input name="contactfirstname" id="contactfirstname" type="text" size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->" />
322      <!-- /TMPL_IF -->
323  </li>
324  <!-- TMPL_IF name="relshiploop" -->
325  <li>
326      <label for="relationship">Relationship: </label>
327      <select name="relationship" id="relationship" >
328          <!-- TMPL_LOOP name="relshiploop" -->
329          <!-- TMPL_IF name="selected" -->
330          <option value="<!-- TMPL_VAR name="relationship" -->" selected="selected" ><!-- TMPL_VAR name="relationship" --></option>
331          <!-- TMPL_ELSE -->
332          <option value="<!-- TMPL_VAR name="relationship" -->"><!-- TMPL_VAR name="relationship" --></option>
333          <!-- /TMPL_IF -->
334          <!-- /TMPL_LOOP -->
335      </select>
336  </li>
337  <!-- /TMPL_IF -->
338  <!-- /TMPL_IF -->
339 <!--/TMPL_IF -->
340         <li>
341             <span class="label">&nbsp;</span>
342             <!-- TMPL_IF NAME="guarantorid" -->
343             <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
344             <!-- TMPL_ELSE -->
345             <input id="guarantorsearch" type="button" value="Set to Patron" onclick="Dopopguarantor('guarantor_search.pl');" />
346             <!-- /TMPL_IF -->
347             <input id="guarantordelete" type="button" value="Delete" />
348         </li>
349         </ol>
350     </fieldset>
351
352 <!--/TMPL_IF-->
353 <fieldset class="rows">
354     <legend>Main address</legend><ol>
355     <li>
356       <!-- TMPL_IF NAME="mandatorystreetnumber" -->
357       <label for="streetnumber" class="required">
358       <!--TMPL_ELSE-->
359       <label for="streetnumber">
360       <!-- /TMPL_IF-->
361       Street number: </label>
362       <input type="text" id="streetnumber" name="streetnumber" size="5" value="<!-- TMPL_VAR NAME="streetnumber" -->" />
363 <!-- TMPL_IF NAME="mandatorystreetnumber" --><span class="required">Required</span><!-- /TMPL_IF -->
364     </li>
365     <!-- TMPL_IF NAME="road_cgipopup" -->
366       <li>
367       <!-- TMPL_IF NAME="mandatorystreettype" -->
368       <label for="streettype" class="required">
369       <!--TMPL_ELSE-->
370       <label for="streettype">
371       <!-- /TMPL_IF-->
372       Street type: </label>
373       <!-- TMPL_VAR NAME="roadpopup" -->
374           <!-- TMPL_IF NAME="mandatorystreettype" --><span class="required">Required</span><!-- /TMPL_IF -->
375       </li>
376     <!--/TMPL_IF--> 
377     <li>
378       <!-- TMPL_IF NAME="mandatoryaddress" -->
379       <label for="address" class="required">
380       <!--TMPL_ELSE-->
381       <label for="address">
382       <!--/TMPL_IF-->
383       Address: </label>
384       <input type="text" id="address" name="address" size="35" value="<!-- TMPL_VAR NAME="address" -->" />
385           <!-- TMPL_IF NAME="mandatoryaddress" --><span class="required">Required</span><!-- /TMPL_IF -->
386     </li>
387     <li>
388       <!-- TMPL_IF NAME="mandatoryaddress2" -->
389       <label for="address2" class="required">
390       <!--TMPL_ELSE-->
391       <label for="address2">
392       <!-- /TMPL_IF-->
393       Address 2: </label>
394       <input type="text" id="address2" name="address2" size="35" value="<!-- TMPL_VAR NAME="address2" -->" />
395           <!-- TMPL_IF NAME="mandatoryaddress2" --><span class="required">Required</span><!-- /TMPL_IF -->
396     </li>  
397     <li>
398       <!-- TMPL_IF NAME="mandatorycity" -->
399         <label for="city" class="required">
400       <!--TMPL_ELSE-->
401         <label for="city">
402       <!-- /TMPL_IF-->
403       City, State: </label>
404         
405         <input type="text" id="city" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->" />
406         <!-- TMPL_IF NAME="city_cgipopup" -->or <strong>choose</strong>
407         <select id="select_city" name="select_city">
408         <!-- TMPL_LOOP NAME="city_loop" -->
409             <!-- TMPL_IF NAME="selected" -->
410             <option value="<!-- TMPL_VAR NAME="city_zipcode"-->|<!-- TMPL_VAR NAME="city_name" -->" selected="selected">
411             <!-- TMPL_ELSE -->
412             <option value="<!-- TMPL_VAR NAME="city_zipcode"-->|<!-- TMPL_VAR NAME="city_name" -->">
413             <!-- /TMPL_IF -->
414                 <!-- TMPL_VAR NAME="city_name" --> <!-- TMPL_VAR NAME="city_zipcode" -->
415             </option>
416         <!-- /TMPL_LOOP -->
417         </select>
418         <!-- /TMPL_IF -->
419           <!-- TMPL_IF NAME="mandatorycity" --><span class="required">Required</span><!-- /TMPL_IF -->
420     </li>
421     <li> 
422       <!-- TMPL_IF NAME="mandatoryzipcode" -->
423         <label for="zipcode" class="required">
424       <!--TMPL_ELSE-->
425         <label for="zipcode">
426       <!-- /TMPL_IF-->
427       Zip/Postal code: </label>
428       <input type="text" name="zipcode" id="zipcode" size="10" value="<!-- TMPL_VAR NAME="zipcode" -->" />
429           <!-- TMPL_IF NAME="mandatoryzipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
430     </li>
431     
432     <li> 
433       <!-- TMPL_IF NAME="mandatorycountry" -->
434         <label for="country" class="required">
435       <!--TMPL_ELSE-->
436         <label for="country">
437       <!-- /TMPL_IF-->
438       Country: </label>
439       <input type="text" name="country" id="country" size="20" value="<!-- TMPL_VAR NAME="country" -->" />
440           <!-- TMPL_IF NAME="mandatorycountry" --><span class="required">Required</span><!-- /TMPL_IF -->
441     </li>    
442   
443         </ol>
444     </fieldset>
445   <fieldset class="rows" id="memberentry_contact">
446     <legend>Contact</legend><ol>
447       <li>
448       <!-- TMPL_IF NAME="mandatoryphone" --> 
449       <label for="phone" class="required">
450       <!--TMPL_ELSE-->
451       <label for="phone">
452       <!-- /TMPL_IF-->
453       Phone (home): </label>
454       <input type="text" id="phone" name="phone" value="<!-- TMPL_VAR NAME="phone" -->" />
455           <!-- TMPL_IF NAME="mandatoryphone" --><span class="required">Required</span><!-- /TMPL_IF --><div class="hint">Shows on transit slips</div>
456
457     </li>
458     <li>
459       <!-- TMPL_IF NAME="mandatoryphonepro" -->
460       <label for="phonepro" class="required">
461       <!--TMPL_ELSE-->
462       <label for="phonepro">
463       <!-- /TMPL_IF-->
464       Phone (work): </label>
465       <input type="text" id="phonepro" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" />
466           <!-- TMPL_IF NAME="mandatoryphonepro" --><span class="required">Required</span><!-- /TMPL_IF -->
467     </li>
468     <li>
469       <!-- TMPL_IF NAME="mandatorymobile" -->
470       <label for="mobile" class="required">
471       <!--TMPL_ELSE-->
472       <label for="mobile">
473       <!-- /TMPL_IF-->
474       Phone (cell): </label>
475       <input type="text" id="mobile" name="mobile" value="<!-- TMPL_VAR NAME="mobile" -->" />
476           <!-- TMPL_IF NAME="mandatorymobile" --><span class="required">Required</span><!-- /TMPL_IF -->
477     </li>
478     <li>
479       <!-- TMPL_IF NAME="mandatoryemail" -->
480       <label for="email" class="required">
481       <!--TMPL_ELSE-->
482       <label for="email">
483       <!-- /TMPL_IF-->
484       Email (home): </label>
485       <input type="text" id="email" name="email" size="45" value="<!-- TMPL_VAR NAME="email" -->" />  
486           <!-- TMPL_IF NAME="mandatoryemail" --><span class="required">Required</span><!-- /TMPL_IF --><div class="hint">Shows on transit slips</div>
487
488     </li>
489     <li>
490       <!-- TMPL_IF NAME="mandatoryemailpro" --> 
491       <label for="emailpro" class="required">
492       <!--TMPL_ELSE-->
493       <label for="emailpro">
494       <!-- /TMPL_IF-->
495       Email (work): </label>
496       <input type="text" id="emailpro" name="emailpro" size="45" value="<!-- TMPL_VAR NAME="emailpro" -->" />
497           <!-- TMPL_IF NAME="mandatoryemailpro" --><span class="required">Required</span><!-- /TMPL_IF -->
498     </li>
499     <li>
500       <!-- TMPL_IF NAME="mandatoryfax" -->
501       <label for="fax" class="required">
502       <!--TMPL_ELSE-->
503       <label for="fax">
504       <!-- /TMPL_IF-->
505       Fax: </label>
506       <input type="text" id="fax" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" />
507           <!-- TMPL_IF NAME="mandatoryfax" --><span class="required">Required</span><!-- /TMPL_IF -->
508     </li>
509         </ol>
510   </fieldset>
511
512
513 <!-- ************************ STEP_1 *********************** -->
514 <!--/TMPL_IF -->
515 <!--TMPL_IF Name="step_6"-->
516
517                 <fieldset class="rows" id="memberentry_address">
518                 <legend>Alternate address</legend><ol>
519                         <li>
520                                 <!-- TMPL_IF NAME="mandatoryB_address" -->
521                                         <label for="B_address" class="required">
522                                 <!--TMPL_ELSE-->
523                                         <label for="B_address">
524                                 <!-- /TMPL_IF-->
525                                 Address: </label>
526                                 <input type="text" id="B_address" name="B_address" size="40" value="<!-- TMPL_VAR NAME="B_address" -->" />
527           <!-- TMPL_IF NAME="mandatoryB_address" --><span class="required">Required</span><!-- /TMPL_IF -->
528                         </li>
529                         <li>
530                                 <!-- TMPL_IF NAME="mandatoryB_address2" -->
531                                         <label for="B_address2" class="required">
532                                 <!--TMPL_ELSE-->
533                                         <label for="B_address2">
534                                 <!-- /TMPL_IF-->
535                                 Address 2: </label>
536                                 <input type="text" id="B_address2" name="B_address2" size="40" value="<!-- TMPL_VAR NAME="B_address2" -->" />
537           <!-- TMPL_IF NAME="mandatoryB_address2" --><span class="required">Required</span><!-- /TMPL_IF -->
538                         </li>                   
539                         <li>
540                                 <!-- TMPL_IF NAME="mandatoryB_city" -->
541                                         <label for="B_city" class="required" >
542                                 <!--TMPL_ELSE-->
543                                         <label for="B_city">
544                                 <!-- /TMPL_IF-->
545                                 City, State: </label>
546                                 <input type="text" id="B_city" name="B_city" size="20" value="<!-- TMPL_VAR NAME="B_city" -->" />
547           <!-- TMPL_IF NAME="mandatoryB_city" --><span class="required">Required</span><!-- /TMPL_IF -->
548                         </li>
549                         <li>
550                                 <!-- TMPL_IF NAME="mandatoryB_zipcode" -->
551                                         <label for="B_zipcode" class="required">
552                                 <!--TMPL_ELSE-->
553                                         <label for="B_zipcode">
554                                 <!-- /TMPL_IF-->
555                                 Zip/Postal code: </label>
556                                 <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="<!-- TMPL_VAR NAME="B_zipcode" -->" />
557           <!-- TMPL_IF NAME="mandatoryB_zipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
558                         </li>
559                         <li>
560                                 <!-- TMPL_IF NAME="mandatoryB_country" -->
561                                         <label for="B_country" class="required">
562                                 <!--TMPL_ELSE-->
563                                         <label for="B_country">
564                                 <!-- /TMPL_IF-->
565                                 Country: </label>
566                                 <input type="text" id="B_country" name="B_country" size="20" value="<!-- TMPL_VAR NAME="B_country" -->" />
567           <!-- TMPL_IF NAME="mandatoryB_country" --><span class="required">Required</span><!-- /TMPL_IF -->
568                         </li>
569             <li>
570                 <!-- TMPL_IF NAME="mandatoryB_phone" -->
571                 <label for="B_phone" class="required">
572                 <!--TMPL_ELSE-->
573                 <label for="B_phone">
574                 <!-- /TMPL_IF-->
575                 Phone: </label>  
576                 <input type="text" id="B_phone" name="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" />
577                 <!-- TMPL_IF NAME="mandatoryB_phone" --><span class="required">Required</span><!-- /TMPL_IF -->
578             </li>
579                         <li> 
580         <!-- TMPL_IF NAME="mandatoryB_email" -->
581           <label for="B_email" class="required">
582         <!--TMPL_ELSE-->
583           <label for="B_email">
584         <!-- /TMPL_IF-->
585         Email: </label>
586         <input type="text" id="B_email" name="B_email" size="45" value="<!-- TMPL_VAR NAME="B_email" -->" />
587                 <!-- TMPL_IF NAME="mandatoryB_email" --><span class="required">Required</span><!-- /TMPL_IF --> </li>
588             <li>
589                 <!-- TMPL_IF NAME="mandatorycontactnote" -->
590                 <label for="contactnote" class="required">
591                 <!--TMPL_ELSE-->
592                 <label for="contactnote">
593                 <!-- /TMPL_IF-->
594                 Contact note: </label>
595                 <textarea id="contactnote" name="contactnote" cols="40" rows="2"><!-- TMPL_VAR NAME="contactnote" --></textarea>
596         <!-- TMPL_IF NAME="mandatorycontactnote" --><span class="required">Required</span><!-- /TMPL_IF -->
597             </li>
598                         </ol>
599                 </fieldset>
600 <!-- /TMPL_IF -->               
601 <!--TMPL_IF Name="step_2"-->
602                 <fieldset class="rows" id="memberentry_altaddress">       
603                     <legend>Alternate Contact</legend><ol>
604                         <li>
605                             <!-- TMPL_IF NAME="mandatoryaltcontactsurname" -->
606                                 <label for="altcontactsurname" class="required">
607                                 <!-- TMPL_ELSE -->
608                                 <label for="altcontactsurname">
609                                 <!-- /TMPL_IF -->
610                                 Surname:</label>
611                                 <input type="text" name="altcontactsurname" id="altcontactsurname" value="<!-- TMPL_VAR NAME="altcontactsurname" -->" />
612                                 <!-- TMPL_IF NAME="mandatoryaltcontactsurname" --><span class="required">Required</span><!-- /TMPL_IF -->
613                         </li>
614                         <li>
615                             <!-- TMPL_IF NAME="mandatoryaltcontactfirstname" -->
616                                 <label for="altcontactfirstname" class="required">
617                                 <!-- TMPL_ELSE -->
618                                 <label for="altcontactfirstname">
619                                 <!-- /TMPL_IF -->
620                                 First name:</label>
621                                 <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="<!-- TMPL_VAR NAME="altcontactfirstname" -->" />
622                                 <!-- TMPL_IF NAME="mandatoryaltcontactfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
623                         </li>
624                         <li>
625                             <!-- TMPL_IF NAME="mandatoryaltcontactaddress1" -->
626                                 <label for="altcontactaddress1" class="required">
627                                 <!-- TMPL_ELSE -->
628                                 <label for="altcontactaddress1">
629                                 <!-- /TMPL_IF -->
630                                 Address:</label>
631                                 <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="<!-- TMPL_VAR NAME="altcontactaddress1" -->" size="40" />
632                                 <!-- TMPL_IF NAME="mandatoryaltcontactaddress1" --><span class="required">Required</span><!-- /TMPL_IF -->
633                         </li>
634                         <li>
635                             <!-- TMPL_IF NAME="mandatoryaltcontactaddress2" -->
636                                 <label for="altcontactaddress2" class="required">
637                                 <!-- TMPL_ELSE -->
638                                 <label for="altcontactaddress2">
639                                 <!-- /TMPL_IF -->
640                                 Address 2:</label>
641                                 <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="<!-- TMPL_VAR NAME="altcontactaddress2" -->" size="40" />
642                                 <!-- TMPL_IF NAME="mandatoryaltcontactaddress2" --><span class="required">Required</span><!-- /TMPL_IF -->
643                         </li>
644                         <li>
645                             <!-- TMPL_IF NAME="mandatoryaltcontactaddress3" -->
646                                 <label for="altcontactaddress3" class="required">
647                                 <!-- TMPL_ELSE -->
648                                 <label for="altcontactaddress3">
649                                 <!-- /TMPL_IF -->
650                                 City, State:</label>
651                                 <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="<!-- TMPL_VAR NAME="altcontactaddress3" -->" size="40" />
652                                 <!-- TMPL_IF NAME="mandatoryaltcontactaddress3" --><span class="required">Required</span><!-- /TMPL_IF -->
653                         </li>
654                         <li>
655                             <!-- TMPL_IF NAME="mandatoryaltcontactzipcode" -->
656                                 <label for="altcontactzipcode" class="required">
657                                 <!-- TMPL_ELSE -->
658                                 <label for="altcontactzipcode">
659                                 <!-- /TMPL_IF -->
660                                 Zip/Postal code:</label>
661                                 <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="<!-- TMPL_VAR NAME="altcontactzipcode" -->" size="5" />
662                                 <!-- TMPL_IF NAME="mandatoryaltcontactzipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
663                         </li>
664                         <li>
665                             <!-- TMPL_IF NAME="mandatoryaltcontactcountry" -->
666                                 <label for="altcontactcountry" class="required">
667                                 <!-- TMPL_ELSE -->
668                                 <label for="altcontactcountry">
669                                 <!-- /TMPL_IF -->
670                                 Country:</label>
671                                 <input type="text" name="altcontactcountry" id="altcontactcountry" value="<!-- TMPL_VAR NAME="altcontactcountry" -->" size="20" />
672                                 <!-- TMPL_IF NAME="mandatoryaltcontactcountry" --><span class="required">Required</span><!-- /TMPL_IF -->
673                         </li>                   
674                         <li>
675                             <!-- TMPL_IF NAME="mandatoryaltcontactphone" -->
676                                 <label for="altcontactphone" class="required">
677                                 <!-- TMPL_ELSE -->
678                                 <label for="altcontactphone">
679                                 <!-- /TMPL_IF -->
680                                 Phone:</label>
681                                 <input type="text" name="altcontactphone" id="altcontactphone" value="<!-- TMPL_VAR NAME="altcontactphone" -->" />
682                                 <!-- TMPL_IF NAME="mandatoryaltcontactphone" --><span class="required">Required</span><!-- /TMPL_IF -->
683                         </li>
684             </ol>
685         </fieldset>
686
687
688   <!-- TMPL_IF NAME="I" -->
689         <!-- TMPL_IF NAME="memberofinstution" -->
690         <fieldset class="rows" id="memberentry_organisation">
691                 <legend>Organizations</legend><ol>
692                 <li>
693                         <!-- TMPL_IF NAME="mandatoryphone" --> 
694                         <label for="organisations" class="required">
695                         <!--TMPL_ELSE-->
696                         <label for="organisations">
697                         <!-- /TMPL_IF-->
698                         Organization(s): </label>
699                         <!-- TMPL_VAR NAME="CGIorganisations" -->
700           <!-- TMPL_IF NAME="mandatoryphone" --><span class="required">Required</span><!-- /TMPL_IF -->
701                 </li>
702                 </ol>
703         </fieldset>
704         <!-- /TMPL_IF -->
705   <!-- /TMPL_IF -->
706               
707 <!-- /TMPL_IF -->
708 <!--TMPL_IF Name="step_3"-->
709
710   <fieldset class="rows" id="memberentry_library_management">
711     <legend>Library Management</legend><ol>
712    <li> <!-- TMPL_IF NAME="mandatorycardnumber" -->
713       <label for="cardnumber" class="required">
714     <!--TMPL_ELSE -->
715       <label for="cardnumber">
716     <!-- /TMPL_IF--> 
717     Card number: </label>
718     <input type="text" id="cardnumber" name="cardnumber" size="20" value="<!-- TMPL_VAR NAME="cardnumber" -->" />
719           <!-- TMPL_IF NAME="mandatorycardnumber" --><span class="required">Required</span><!-- /TMPL_IF --></li>
720     <li>
721       <!-- TMPL_IF NAME="mandatorybranchcode" -->
722         <label for="branchcode" class="required">
723       <!--TMPL_ELSE-->
724         <label for="branchcode">
725       <!-- /TMPL_IF-->
726       Library: </label>
727       <!-- TMPL_VAR NAME="CGIbranch" -->
728           <!-- TMPL_IF NAME="mandatorybranchcode" --><span class="required">Required</span><!-- /TMPL_IF -->
729     </li>
730     <li>
731     <!-- TMPL_IF NAME="typeloop" -->
732         <label for="categorycode">Category: </label>
733         <select id="categorycode" name="categorycode">
734         <!-- TMPL_LOOP NAME="typeloop" -->
735                 <!-- TMPL_IF EXPR="typename eq 'C'" --><optgroup label="Child"><!-- /TMPL_IF -->
736                 <!-- TMPL_IF EXPR="typename eq 'A'" --><optgroup label="Adult"><!-- /TMPL_IF -->
737                 <!-- TMPL_IF EXPR="typename eq 'S'" --><optgroup label="Staff"><!-- /TMPL_IF -->
738                 <!-- TMPL_IF EXPR="typename eq 'I'" --><optgroup label="Organization"><!-- /TMPL_IF -->
739                 <!-- TMPL_IF EXPR="typename eq 'P'" --><optgroup label="Professional"><!-- /TMPL_IF -->
740                 <!-- TMPL_IF EXPR="typename eq 'X'" --><optgroup label="Statistical"><!-- /TMPL_IF -->
741                 <!-- TMPL_LOOP NAME="categoryloop" -->
742                                 <!-- TMPL_IF NAME="categorycodeselected" -->
743                <option value="<!-- TMPL_VAR NAME="categorycode" -->" selected="selected"><!-- TMPL_VAR NAME="categoryname" --></option>
744                                 <!-- TMPL_ELSE -->
745 <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="categoryname" --></option>
746                                 <!-- /TMPL_IF -->
747                 <!-- /TMPL_LOOP -->
748         </optgroup>
749         <!-- /TMPL_LOOP -->
750                 </select>
751     <!-- TMPL_ELSE -->
752         <span class="problem">There is no category type to add <!--TMPL_IF Name="A"-->an Adult<!--/TMPL_IF--><!--TMPL_IF Name="C"-->a Child<!--/TMPL_IF--><!--TMPL_IF Name="I"-->an Institution<!--/TMPL_IF--><!--TMPL_IF Name="P"-->a professionnal<!--/TMPL_IF--><!--TMPL_IF Name="S"-->a Staff Member<!--/TMPL_IF-->.</span>
753               <a href="/cgi-bin/koha/admin/categorie.pl">Please create one</a>
754     <!-- /TMPL_IF -->
755     </li>
756     <li>
757       <!-- TMPL_IF NAME="mandatorysort1" -->
758         <label for="sort1" class="required">
759       <!-- TMPL_ELSE -->
760         <label for="sort1">
761       <!-- /TMPL_IF-->
762       Sort 1: </label>
763       <!--TMPL_IF NAME="CGIsort1" --> 
764         <!-- TMPL_VAR NAME="CGIsort1" -->
765       <!--TMPL_ELSE-->
766         <input  type="text" id="sort1" name="sort1" size="20"  value="<!-- TMPL_VAR NAME="sort1" -->" />
767           <!-- TMPL_IF NAME="mandatorysort1" --><span class="required">Required</span><!-- /TMPL_IF -->
768       <!-- /TMPL_IF -->   
769     </li>
770     <li>
771     <!-- TMPL_IF NAME="mandatorysort2" -->
772     <label for="sort2" class="required">
773     <!-- TMPL_ELSE -->
774     <label for="sort2">
775     <!-- /TMPL_IF-->
776     Sort 2: </label>
777     <!--TMPL_IF NAME="CGIsort2" --> 
778       <!-- TMPL_VAR NAME="CGIsort2" -->
779     <!--TMPL_ELSE-->
780       <input  type="text" id="sort2" name="sort2" size="20"  value="<!-- TMPL_VAR NAME="sort2" -->" />
781           <!-- TMPL_IF NAME="mandatorysort2" --><span class="required">Required</span><!-- /TMPL_IF -->
782     <!-- /TMPL_IF --> 
783     </li>
784         </ol>
785   </fieldset>
786         <fieldset class="rows" id="memberentry_subscription">
787         <legend>Library set-up</legend><ol>
788                 <li>
789                         <!-- TMPL_IF NAME="mandatorydateenrolled" -->
790                         <label for="dateenrolled" class="required">
791                         <!--TMPL_ELSE-->
792                         <label for="dateenrolled">
793                         <!-- /TMPL_IF-->
794                         Registration date: </label>
795                         <input type="text" id="dateenrolled" name="dateenrolled"  maxlength="10" size="10" <!-- TMPL_IF NAME="metric" -->onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');"<!-- /TMPL_IF--> value="<!-- TMPL_VAR NAME="dateenrolled" -->" />
796             <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="dateenrolled_button" alt="Show Calendar" />
797       <script language="JavaScript" type="text/javascript">
798         Calendar.setup(
799           {
800             inputField : "dateenrolled",
801             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
802             button : "dateenrolled_button"
803           }
804         );
805       </script>
806                 <!-- TMPL_IF NAME="mandatorydateenrolled" --><span class="required">Required</span><!-- /TMPL_IF -->
807                 <!-- TMPL_IF NAME="ERROR_dateenrolled" --><span class="required">(Error)</span><!-- /TMPL_IF -->
808                 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
809                 </li>
810                 <li>
811                         <!-- TMPL_IF NAME="mandatorydateexpiry" -->
812                         <label for="dateexpiry" class="required">
813                         <!--TMPL_ELSE-->
814                         <label for="dateexpiry">
815                         <!-- /TMPL_IF-->
816                         Expiry date (leave blank for auto calc) </label>
817                         <input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" <!-- TMPL_IF NAME="metric" -->onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');"<!-- /TMPL_IF--> value="<!-- TMPL_UNLESS NAME="opadd" --><!-- TMPL_VAR NAME="dateexpiry" --><!-- /TMPL_UNLESS -->" />
818             <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="dateexpiry_button" alt="Show Calendar" />
819       <script language="JavaScript" type="text/javascript">
820         Calendar.setup(
821           {
822             inputField : "dateexpiry",
823             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
824             button : "dateexpiry_button"
825           }
826         );
827       </script>
828                 <!-- TMPL_IF NAME="mandatorydateexpiry" --><span class="required">Required</span><!-- /TMPL_IF -->
829                 <!-- TMPL_IF NAME="ERROR_dateexpiry" --><span class="required">(Error)</span><!-- /TMPL_IF -->
830                 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
831                 </li>
832                 <li>
833                         <!-- TMPL_IF NAME="mandatoryopacnote" -->
834                                 <label for="opacnote" class="required">
835                         <!--TMPL_ELSE-->
836                                 <label for="opacnote">
837                         <!-- /TMPL_IF-->        
838                         OPAC note: </label>
839                         <textarea id="opacnote" name="opacnote" cols="55" rows="5"><!-- TMPL_VAR NAME="opacnote" --></textarea>
840                         <div class="hint">This message appears on this patron's user page in the OPAC</div>
841           <!-- TMPL_IF NAME="mandatoryopacnote" --><span class="required">Required</span><!-- /TMPL_IF -->
842                 </li>
843                 <li>
844                         <!-- TMPL_IF NAME="mandatoryborrowernotes" -->  
845                                 <label for="borrowernotes" class="required">
846                         <!--TMPL_ELSE-->
847                                 <label for="borrowernotes">
848                         <!-- /TMPL_IF-->
849                         Circulation note: </label>
850                         <textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
851                         <div class="hint">This message displays when checking out to this patron</div>
852           <!-- TMPL_IF NAME="mandatoryborrowernotes" --><span class="required">Required</span><!-- /TMPL_IF -->
853                 </li>
854                 </ol>
855         </fieldset>
856         <fieldset class="rows" id="memberentry_userid">
857                 <legend>OPAC login</legend><ol>
858                 <li>
859                         <!-- TMPL_IF NAME="mandatoryuserid" -->
860                         <label for="userid" class="required">
861                         <!--TMPL_ELSE-->
862                         <label for="userid">
863                         <!-- /TMPL_IF-->
864                         OPAC Login: </label>
865
866 <!-- TMPL_IF NAME="NoUpdateLogin" -->
867 <input type="text" id="userid" name="userid" size="20" disabled="disabled" value="<!-- TMPL_VAR NAME="userid" -->" />
868 <!-- TMPL_ELSE -->
869 <input type="text" id="userid" name="userid" size="20" value="<!-- TMPL_VAR NAME="userid" -->" />
870 <!-- /TMPL_IF -->
871
872           <!-- TMPL_IF NAME="mandatoryuserid" --><span class="required">Required</span><!-- /TMPL_IF -->
873                 </li>
874                 <li>
875                         <!-- TMPL_IF NAME="mandatorypassword" -->
876                         <label for="password" class="required">
877                         <!--TMPL_ELSE-->
878                         <label for="password">
879                         <!-- /TMPL_IF-->
880                         Password: </label>
881                         <!--TMPL_IF NAME="opadd"-->
882                         <!-- TMPL_IF NAME="NoUpdateLogin" -->
883                                 <input type="text" id="password" name="password" size="20"  disabled="disabled" value="<!-- TMPL_VAR NAME="password" -->" />
884 <!-- TMPL_ELSE -->
885                                 <input type="text" id="password" name="password" size="20" value="<!-- TMPL_VAR NAME="password" -->" />
886 <!-- /TMPL_IF -->
887                         <!--TMPL_ELSE-->
888                         <!--TMPL_IF NAME="password"-->
889                                 <!-- TMPL_IF NAME="NoUpdateLogin" -->
890                                         <input type="text" id="password" name="password" size="20"  disabled="disabled" value="****" />
891                                 <!-- TMPL_ELSE -->
892                                         <input type="text" id="password" name="password" size="20" value="****" />
893                                 <!-- /TMPL_IF -->
894                         <!--TMPL_ELSE-->
895                                 <!-- TMPL_IF NAME="NoUpdateLogin" -->
896                                         <input type="text" id="password" name="password" size="20"  disabled="disabled" value="" />
897                                 <!-- TMPL_ELSE -->
898                                         <input type="text" id="password" name="password" size="20" value="" />
899                                 <!-- /TMPL_IF -->
900                         <!--/TMPL_IF-->
901                         <!--/TMPL_IF-->
902           <!-- TMPL_IF NAME="mandatorypassword" --><span class="required">Required</span><!-- /TMPL_IF --><!-- TMPL_IF NAME="ERROR_short_password" --><span class="required">Password is too short</span><!-- /TMPL_IF -->
903 <!-- TMPL_IF NAME="minPasswordLength" --><div class="hint">Minimum password length: <!-- TMPL_VAR NAME="minPasswordLength" --></div><!-- /TMPL_IF -->
904                 </li></ol>
905                 </fieldset>
906                 <!--this zones are not necessary in modif mode -->
907                 <!-- TMPL_UNLESS NAME="opadd" -->
908                 <fieldset class="rows">
909                         <legend>Patron Account Flags</legend>
910                         <ol class="radio">
911                         <!-- TMPL_LOOP NAME="flagloop" -->
912                                 <li><label class="radio" for="yes<!-- TMPL_VAR name="name" -->">
913                                 <!-- TMPL_IF EXPR="key eq 'gonenoaddress'" -->Gone no Address:<!-- /TMPL_IF -->
914                                 <!-- TMPL_IF EXPR="key eq 'debarred'" -->Debarred:<!-- /TMPL_IF -->
915                                 <!-- TMPL_IF EXPR="key eq 'lost'" -->Lost Card:<!-- /TMPL_IF -->
916                 </label>
917                                 
918                                 <label for="yes<!-- TMPL_VAR NAME="name" -->">Yes </label>
919                                 <!-- TMPL_IF NAME="yes" -->
920                                 <input type="radio" id="yes<!-- TMPL_VAR NAME="name" -->" name="<!-- TMPL_VAR NAME="name" -->" value="1" checked="checked" />
921                                 <!-- TMPL_ELSE -->
922                                 <input type="radio" id="yes<!-- TMPL_VAR NAME="name" -->" name="<!-- TMPL_VAR NAME="name" -->" value="1" />
923                                 <!-- /TMPL_IF -->
924                                 
925                                 <label for="no<!-- TMPL_VAR NAME="name" -->">No </label>
926                                 <!-- TMPL_IF NAME="no" -->
927                                 <input type="radio" id="no<!-- TMPL_VAR NAME="name" -->" name="<!-- TMPL_VAR NAME="name" -->" value="0" checked="checked"/>
928                                 <!-- TMPL_ELSE -->
929                                 <input type="radio" id="no<!-- TMPL_VAR NAME="name" -->" name="<!-- TMPL_VAR NAME="name" -->" value="0" />
930                                 <!-- /TMPL_IF -->
931
932 </li>
933                         <!-- /TMPL_LOOP -->
934                         </ol>
935                         </fieldset>
936                 <!-- /TMPL_UNLESS -->   
937
938 <!-- /TMPL_IF -->
939
940 <!-- TMPL_IF NAME="step_4" --><!-- TMPL_IF NAME="ExtendedPatronAttributes" --><!-- TMPL_UNLESS NAME="no_patron_attribute_types" -->
941   <fieldset class="rows" id="memberentry_patron_attributes">
942     <input type="hidden" name="setting_extended_patron_attributes" value="1" />
943     <legend>Additional attributes and identifiers</legend>
944     <table>
945         <tr>
946             <th>Type</th>
947             <th colspan="2">Value</th>
948         </tr>
949         <!-- TMPL_LOOP NAME='patron_attributes' -->
950         <tr>
951             <td><!-- TMPL_VAR NAME="code" --> (<!-- TMPL_VAR NAME="description" -->)
952             </td>
953             <td>
954                 <input type="hidden" id="<!-- TMPL_VAR NAME="form_id" -->_code" name="<!-- TMPL_VAR NAME="form_id" -->_code" value="<!-- TMPL_VAR NAME="code" ESCAPE="HTML" -->" />
955                 <!-- TMPL_IF NAME="use_dropdown" -->
956                     <select id="<!-- TMPL_VAR NAME="form_id" -->" name="<!-- TMPL_VAR NAME="form_id" -->">
957                         <option value="" />
958                         <!-- TMPL_LOOP NAME="auth_val_loop" -->
959                             <!-- TMPL_IF NAME="selected" -->
960                                 <option value="<!-- TMPL_VAR NAME="authorised_value" -->" selected="selected">
961                                     <!-- TMPL_VAR NAME="lib" -->
962                                 </option>
963                             <!-- TMPL_ELSE -->
964                                 <option value="<!-- TMPL_VAR NAME="authorised_value" -->" >
965                                     <!-- TMPL_VAR NAME="lib" -->
966                                 </option>
967                             <!-- /TMPL_IF -->
968                         <!-- /TMPL_LOOP -->
969                     </select>
970                 <!-- TMPL_ELSE -->
971                     <input type="text" maxlength="64" value="<!-- TMPL_VAR NAME="value" -->"
972                            id="<!-- TMPL_VAR NAME="form_id" -->" name="<!-- TMPL_VAR NAME="form_id" -->" />
973                 <!-- /TMPL_IF -->
974                 <!-- TMPL_IF NAME="password_allowed" -->
975                     (Password: <input type="password" maxlength="64" value="<!-- TMPL_VAR NAME="password" -->"
976                            id="<!-- TMPL_VAR NAME="form_id" -->_password" name="<!-- TMPL_VAR NAME="form_id" -->_password" />)
977                 <!-- /TMPL_IF -->
978             </td>
979             <td>
980                 <a href="#" onclick="clear_entry(this); return false;">Clear</a>
981                 <!-- TMPL_IF NAME="repeatable" -->
982                 <a href="#" onclick="clone_entry(this); return false;">New</a>
983                 <!-- /TMPL_IF -->
984             </td>
985         </tr>
986         <!-- /TMPL_LOOP -->
987     </table>
988   </fieldset>
989 <!-- /TMPL_IF--><!-- /TMPL_IF --><!-- /TMPL_UNLESS -->
990
991 <!-- TMPL_IF NAME="step_5" --><!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
992   <fieldset class="rows" id="memberentry_messaging_prefs">
993     <!-- TMPL_IF NAME="opadd" -->
994     <!-- handle changing prefs if creating new patron and changing
995          the patron category
996     -->
997     <script language="javascript" type="text/javascript">//<![CDATA[
998        $(document).ready(function(){
999             var message_prefs_dirty = false;
1000             $('#memberentry_messaging_prefs > *').change(function() {
1001                 message_prefs_dirty = true;
1002             });
1003             $('#categorycode').change(function() {
1004                 var categorycode = $(this).val();
1005                 if (message_prefs_dirty) {
1006                     if (!confirm('Change messaging preferences to default for this category?')) {
1007                         return;
1008                     }
1009                 }
1010                 $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode,
1011                     function(data) {
1012                         $.each(data.messaging_preferences, function(i, item) {
1013                             var attrid = item.message_attribute_id;
1014                             var transports = ['email', 'rss', 'sms'];
1015                             $.each(transports, function(j, transport) {
1016                                 if (item['transport-' + transport] != ' ') {
1017                                     $('#' + transport + attrid).attr('checked', item['transport-' + transport]);
1018                                 } else {
1019                                     $('#' + transport + attrid).removeAttr('checked');
1020                                 }
1021                             });
1022                             if (item.digest && item.digest != ' ') {
1023                                 $('#digest' + attrid).attr('checked', item.digest);
1024                             } else {
1025                                 $('#digest' + attrid).removeAttr('checked');
1026                             }
1027                             if (item.takes_days == '1') {
1028                                 $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
1029                             }
1030                         });
1031                         message_prefs_dirty = false;
1032                     }
1033                 );
1034             });
1035         });
1036     //]]>
1037     </script>
1038     <!-- /TMPL_IF -->
1039     <input type="hidden" name="setting_messaging_prefs" value="1" />
1040     <legend>Patron messaging preferences</legend>
1041     <!-- TMPL_INCLUDE NAME="messaging-preference-form.inc" -->
1042     <!-- TMPL_IF NAME="SMSSendDriver" -->
1043         <p><label for="SMSnumber">SMS number:</label> 
1044           <input type="text" id="SMSnumber" name="SMSnumber" value="<!-- TMPL_VAR NAME="SMSnumber"  -->" />
1045         </p>
1046     <!-- /TMPL_IF -->
1047   </fieldset>
1048 <!-- /TMPL_IF --> <!-- /TMPL_IF -->
1049
1050     <fieldset class="action">
1051         <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
1052       <!-- TMPL_IF NAME="opadd" -->
1053        <a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a>
1054            <!-- TMPL_ELSE -->
1055           <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Cancel</a>
1056            <!-- /TMPL_IF -->
1057     </fieldset>
1058 </form>
1059   
1060 </div>
1061 </div>
1062
1063 <!-- TMPL_UNLESS NAME="opadd" --><div class="yui-b">
1064 <!-- TMPL_INCLUDE NAME="members-menu.inc" -->
1065 </div><!-- /TMPL_UNLESS -->
1066 </div>
1067 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->