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