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