Project

General

Profile

« Previous | Next » 

Revision 2033

Added by sgarg almost 21 years ago

Fix for bug 1325. new javascript function added.

View differences:

lib/style/common/templates/entryForm.tmpl
88 88
	newField.appendChild(option1);
89 89
	var option2=document.createElement("option");
90 90
	var text2=document.createTextNode("theme");
91
	option1.appendChild(text2);
91
	option2.appendChild(text2);
92 92
	newField.appendChild(option2);
93 93
	var option3=document.createElement("option");
94 94
	var text3=document.createTextNode("place");
95
	option1.appendChild(text3);
95
	option3.appendChild(text3);
96 96
	newField.appendChild(option3)
97 97
	var option4=document.createElement("option");
98 98
	var text4=document.createTextNode("stratum");
99
	option1.appendChild(text4);
99
	option4.appendChild(text4);
100 100
	newField.appendChild(option4);
101 101
	var option5=document.createElement("option");
102 102
	var text5=document.createTextNode("temporal");
103
	option1.appendChild(text5);
103
	option5.appendChild(text5);
104 104
	newField.appendChild(option5);
105 105
	var option6=document.createElement("option");
106 106
	var text6=document.createTextNode("taxonomic");
107
	option1.appendChild(text6);
107
	option6.appendChild(text6);
108 108
	newField.appendChild(option6);
109 109

  
110 110
	return newField;
......
126 126
    }
127 127

  
128 128

  
129
    function copyContact(){
130
        var checkBox = document.getElementById("copyCheckBox");
131
        if(checkBox.checked == true)
132
	{
133
	   var cnf=document.getElementById("contactNameFirst");
134
	   var onf=document.getElementById("origNameFirst");
135
	   cnf.value = onf.value;
136

  
137
	   var cnl=document.getElementById("contactNameLast");
138
	   var onl=document.getElementById("origNameLast");
139
	   cnl.value = onl.value;
140

  
141
	   var cno=document.getElementById("contactNameOrg");
142
	   var ono=document.getElementById("origNameOrg");
143
	   cno.value = ono.value;
144

  
145
	   var ce=document.getElementById("contactEmail");
146
	   var oe=document.getElementById("origEmail");
147
	   ce.value = oe.value;
148

  
149
	   var cp=document.getElementById("contactPhone");
150
	   var op=document.getElementById("origPhone");
151
	   cp.value = op.value;
152

  
153
	   var cf=document.getElementById("contactFAX");
154
	   var of=document.getElementById("origFAX");
155
	   cf.value = of.value;
156

  
157
	   var cd=document.getElementById("contactDelivery");
158
	   var od=document.getElementById("origDelivery");
159
	   cd.value = od.value;
160

  
161
	   var cc=document.getElementById("contactCity");
162
	   var oc=document.getElementById("origCity");
163
	   cc.value = oc.value;
164

  
165
	   var cs=document.getElementById("contactState");
166
	   var os=document.getElementById("origState");
167

  
168
	   var cso=document.getElementById("contactStateOther");
169
	   var oso=document.getElementById("origStateOther");
170
	   cso.value = oso.value;
171

  
172
	   var cz=document.getElementById("contactZip");
173
	   var oz=document.getElementById("origZip");
174
	   cz.value = oz.value;
175

  
176
	   var cC=document.getElementById("contactCountry");
177
	   var oC=document.getElementById("origCountry");
178
	   cC.value = oC.value;
179

  
180
	} else {
181
	   var cnf=document.getElementById("contactNameFirst");
182
	   cnf.value = "";
183

  
184
	   var cnl=document.getElementById("contactNameLast");
185
	   cnl.value = "";
186

  
187
	   var cno=document.getElementById("contactNameOrg");
188
	   cno.value = "";
189

  
190
	   var ce=document.getElementById("contactEmail");
191
	   ce.value = "";
192

  
193
	   var cp=document.getElementById("contactPhone");
194
	   cp.value = "";
195

  
196
	   var cf=document.getElementById("contactFAX");
197
	   cf.value = "";
198

  
199
	   var cd=document.getElementById("contactDelivery");
200
	   cd.value = "";
201

  
202
	   var cc=document.getElementById("contactCity");
203
	   cc.value = "";
204

  
205
	   var cso=document.getElementById("contactStateOther");
206
	   cso.value = "";
207

  
208
	   var cz=document.getElementById("contactZip");
209
	   cz.value = "";
210

  
211
	   var cC=document.getElementById("contactCountry");
212
	   cC.value = "";
213
	}
214
    }
215

  
129 216
  </script>
130 217

  
131 218
[% IF cfg == 'nrs' %]
......
258 345
    <tr> 
259 346
      <td valign="TOP" colspan="3"> 
260 347
        <p>
261
          <input type="TEXT" name="origNamefirst0" size="40" value="[%origNamefirst0%]">
348
          <input type="TEXT" name="origNamefirst0" size="40" id="origNameFirst" value="[%origNamefirst0%]">
262 349
          <span class="required">*</span><span class="label">First Name</span></p>
263 350
        <p>
264
          <input type="TEXT" name="origNamelast0" size="40" value="[%origNamelast0%]">
351
          <input type="TEXT" name="origNamelast0" size="40" id="origNameLast" value="[%origNamelast0%]">
265 352
          <span class="required">*</span><span class="label">Last Name</span></p>
266 353
        <p><font size="-1"> 
267
          <input type="TEXT" name="origNameOrg" size="60" value="[%origNameOrg%]">
354
          <input type="TEXT" name="origNameOrg" size="60" id="origNameOrg" value="[%origNameOrg%]">
268 355
          <b>Organization Name</b></font></p>
269 356
        <p><font size="-1"> 
270
          <input type="TEXT" name="origEmail" value="[%origEmail%]">
357
          <input type="TEXT" name="origEmail" id="origEmail" value="[%origEmail%]">
271 358
          <b>E-Mail</b></font></p>
272 359
        <p><font size="-1"> 
273
          <input type="TEXT" name="origPhone" value="[%origPhone%]">
360
          <input type="TEXT" name="origPhone" id="origPhone" value="[%origPhone%]">
274 361
          <b>Phone</b></font></p>
275 362
        <p><font size="-1"> 
276
          <input type="TEXT" name="origFAX" value="[%origFAX%]">
363
          <input type="TEXT" name="origFAX" id="origFAX" value="[%origFAX%]">
277 364
          <b>FAX</b></font></p>
278 365
        <p><font size="-1"><b>Street information (number, street, unit, etc., 
279 366
          comma-separated)</b></font></p>
280 367
        <p><font size="-1"> 
281
          <textarea rows="5" cols="60" name="origDelivery">[%origDelivery%]</textarea>
368
          <textarea rows="5" cols="60" id="origDelivery" name="origDelivery">[%origDelivery%]</textarea>
282 369
          </font></p>
283 370
        <p><font size="-1"> 
284
          <input type="TEXT" name="origCity" value="[%origCity%]" size="50">
371
          <input type="TEXT" name="origCity" id="origCity" value="[%origCity%]" size="50">
285 372
          <b>City</b></font></p>
286 373
        <p> <font size="-1">
287
          <select name="origState">
374
          <select name="origState" id="origState">
288 375
	    [% IF form == 're_entry' %]
289 376
                <option selected>[%origState%]</option>
290 377
	    [% ELSE %]
......
299 386
            <option>Colorado</option>
300 387
            <option>Connecticut</option>
301 388
            <option>Delaware</option>
302
            <option>District of Columbia</option>
389
            <option>District of Columbia</option>gh
303 390
            <option>Federated States of Micronesia</option>
304 391
            <option>Florida</option>
305 392
            <option>Georgia</option>
......
352 439
          </select>
353 440
          <b>State</b></font>
354 441
          <font size="-1"> 
355
          <input type="TEXT" name="origStateOther" value="[%origStateOther%]">
442
          <input type="TEXT" name="origStateOther" id="origStateOther" value="[%origStateOther%]">
356 443
          <b>Other State or Province</b></font>
357 444
          </p>
358 445
        <p><font size="-1"><b> 
359
          <input type="TEXT" name="origZIP" value="[%origZIP%]" size="10">
446
          <input type="TEXT" name="origZIP" id="origZip" value="[%origZIP%]" size="10">
360 447
          <b>ZIP</b></b></font></p>
361 448
        <p><font size="-1"> 
362
          <input type="TEXT" name="origCountry" value="[%origCountry%]">
449
          <input type="TEXT" name="origCountry" id="origCountry" value="[%origCountry%]">
363 450
          <b>Country</b></font></p>
364 451
    </tr>
365 452
  </table>
......
1038 1125
  <table border="0" cellspacing="0" cellpadding="9" width="760" bgcolor="#c6d6e7">
1039 1126
    <tr> 
1040 1127
      <td valign="TOP" colspan="3">
1041
        <input type="CHECKBOX" name="useOrigAddress" [%useOrigAddress%]>
1128
        <input type="CHECKBOX" name="useOrigAddress" onClick="copyContact()" id="copyCheckBox" [%useOrigAddress%]>
1042 1129
        Use the same name and address as the PRINCIPAL DATA SET OWNER above (If you check this box, 
1043 1130
        you don't need to fill in the address fields below).</td>
1044 1131
    </tr>
1045 1132
    <tr> 
1046 1133
      <td valign="TOP" colspan="8"> 
1047 1134
        <p>
1048
          <input type="TEXT" name="origNamefirstContact" value="[%origNamefirstContact%]" size="40">
1135
          <input type="TEXT" name="origNamefirstContact" id="contactNameFirst" value="[%origNamefirstContact%]" size="40">
1049 1136
          <b><font color="#ff0000">*</font>First Name</b></p>
1050 1137
        <p>
1051
          <input type="TEXT" name="origNamelastContact" value="[%origNamelastContact%]" size="40">
1138
          <input type="TEXT" name="origNamelastContact" id="contactNameLast" value="[%origNamelastContact%]" size="40">
1052 1139
          <b><font color="#ff0000">*</font>Last Name</b></p>
1053 1140
        <p>
1054
          <input type="TEXT" name="origNameOrgContact" value="[%origNameOrgContact%]" size="60">
1141
          <input type="TEXT" name="origNameOrgContact" id="contactNameOrg" value="[%origNameOrgContact%]" size="60">
1055 1142
          <b>Organization Name</b></p>
1056 1143
        <p>
1057
          <input type="TEXT" name="origEmailContact" value="[%origEmailContact%]">
1144
          <input type="TEXT" name="origEmailContact" id="contactEmail" value="[%origEmailContact%]">
1058 1145
          <b>E-Mail</b></p>
1059 1146
        <p>
1060
          <input type="TEXT" name="origPhoneContact" value="[%origPhoneContact%]">
1147
          <input type="TEXT" name="origPhoneContact" id="contactPhone" value="[%origPhoneContact%]">
1061 1148
          <b>Phone</b></p>
1062 1149
        <p>
1063
          <input type="TEXT" name="origFAXContact" value="[%origFAXContact%]">
1150
          <input type="TEXT" name="origFAXContact" id="contactFAX" value="[%origFAXContact%]">
1064 1151
          <b>FAX</b></p>
1065 1152
        <p><b>Street information (number, street, unit, etc., 
1066 1153
          comma-separated)</b></p>
1067 1154
        <p>
1068
          <textarea rows="5" cols="60" name="origDeliveryContact">[%origDeliveryContact%]</textarea></p>
1155
          <textarea rows="5" cols="60" name="origDeliveryContact" id="contactDelivery">[%origDeliveryContact%]</textarea></p>
1069 1156
        <p>
1070
          <input type="TEXT" name="origCityContact" value="[%origCityContact%]" size="50">
1157
          <input type="TEXT" name="origCityContact" id="contactCity" value="[%origCityContact%]" size="50">
1071 1158
          <b>City</b></p>
1072 1159
        <p> 
1073
          <select name="origStateContact">
1160
          <select id="contactState" name="origStateContact">
1074 1161
	    [% IF form == 're_entry' %]	
1075 1162
            	<option>[%origStateContact%]</option>
1076 1163
	    [% ELSE %]
......
1137 1224
            <option>Wyoming</option>
1138 1225
          </select>
1139 1226
          <b>State</font></b>&nbsp;&nbsp;&nbsp;
1140
          <input type="TEXT" name="origStateOtherContact" value="[%origStateOtherContact%]">
1227
          <input type="TEXT" name="origStateOtherContact" id="contactStateOther" value="[%origStateOtherContact%]">
1141 1228
          <b>Other State or Province</b>
1142 1229
          </p>
1143 1230
        <p>
1144
          <input type="TEXT" name="origZIPContact" size="10" value="[%origZIPContact%]">
1231
          <input type="TEXT" name="origZIPContact" size="10" id="contactZip" value="[%origZIPContact%]">
1145 1232
          <b>ZIP</b></p>
1146 1233
        <p>
1147
          <input type="TEXT" name="origCountryContact" value="[%origCountryContact%]">
1234
          <input type="TEXT" name="origCountryContact" id="contactCountry" value="[%origCountryContact%]">
1148 1235
          <b>Country</b></p>
1149 1236
      </td>
1150 1237
    </tr>

Also available in: Unified diff