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