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