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