Project

General

Profile

« Previous | Next » 

Revision 9780

Added by Chris Jones over 8 years ago

Merge changes from the 2.6.0 release.

View differences:

docs/user/metacat/source/index.rst
13 13

  
14 14
    License: GPL
15 15
    
16
    Release Date: March, 2016
16
    Release Date: May, 2016
17 17

  
18 18
Metacat is a repository for data and metadata (documentation about data) that helps 
19 19
scientists find, understand and effectively use data sets they manage or that 
20 20

  
lib/style/common/templates/metacatui/confirmData.tmpl
15 15
			
16 16
			<div class="row-fluid">
17 17

  
18
<table class="intro">
19
<tr><td align="left">
20
<a name="BasicInformation"></a>
21
<h4>Basic Information</h4>
22
<p><span class="text-info">First Name:</span>        [%providerGivenName%]
23
</p>
24
<p><span class="text-info">Last Name:</span>         [%providerSurName%]
25
</p>
26
<p><span class="text-info">Data Set Title:</span>     [%title%]
27
</p>
18
				<a name="BasicInformation"></a>
19
				<h4>Basic Information</h4>
20
				<table class="table table-bordered table-striped table-condensed">
21
					<tr><td>Title</td><td><strong>[%- title -%]</strong></td></tr>
28 22

  
23
					[% IF cfg == 'nceas' %]
24
						[% FOREACH group = wg %]
25
							<tr><td>NCEAS Project</td><td>[%- group -%]</td></tr>
26
						[% END %]
29 27

  
30

  
31
[% IF cfg == 'nceas' %]
32
    [% FOREACH group = wg %]
33
      <p><span class="text-info">NCEAS Project:</span>  [%group%] </p>
34
    [% END %]
35
    
36
[% ELSE %]
37
    [% IF cfg == 'esa' %]
38
      <p><span class="text-info">Organization Name:</span>  [%site%]</p>
39
    [% ELSE %]
40
      <p><span class="text-info">[% config.site | ucfirst %] Name:</span>  [%site%]</p>
41
    [% END %]
42
[% END %]
43
<p><span class="text-info">Grant Number:</span>  [%funding%]</p>
44

  
45
<hr class="rule" />
46
<a name="DataSetOriginator"></a>
47
<h4>Principal Data Set Owner</h4>
48

  
49
<p><span class="text-info">First Name:</span>        [%origNamefirst0%]
50
</p>
51

  
52
<p><span class="text-info">Last Name:</span>         [%origNamelast0%]
53
</p>
54

  
55
<p><span class="text-info">Organization Name:</span> [%origNameOrg%]
56
</p>
57

  
58
<p><span class="text-info">E-Mail:</span>            [%origEmail%]
59
</p>
60

  
61
<p><span class="text-info">Phone:</span>             [%origPhone%]
62
</p>
63

  
64
<p><span class="text-info">FAX:</span>               [%origFAX%]
65
</p>
66

  
67
<p><span class="text-info">Street Information:</span> 
68
                                                    [%origDelivery%]
69
</p>
70

  
71
<p><span class="text-info">City:</span>              [%origCity%]
72
</p>
73

  
74
<p><span class="text-info">State:</span>             [%origState%]
75
</p>
76

  
77
<p><span class="text-info">Other State/Province:</span>       [%origStateOther%]
78
</p>
79

  
80
<p><span class="text-info">Postal Code:</span>               [%origZIP%]
81
</p>
82

  
83
<p><span class="text-info">Country:</span>               [%origCountry%]
84
</p>
85

  
86
<hr class="rule" />
87
<a name="AdditionalOriginators"></a>
88
<h4>Associated Parties</h4> 
89

  
90
    [% numAO = 0 %]
91
    [% IF aoCount > 0 %]
92
        [% numAO = aoCount %]
93
    [% END %]
94

  
95
</td>
96
</tr>
97
</table>
98

  
99
<table cellspacing="0" border="0" width="760">
100
    <tr> 
101
      <td width="21%" valign="TOP"> 
102
        <span class="text-info">First Name</span>
103
      </td>
104
      <td width="21%" valign="TOP"> 
105
        <span class="text-info">Last Name</span>
106
      </td>
107
      <td width="58%" valign="TOP"> 
108
        <span class="text-info">Role</span>
109
      </td>
110
    </tr>
111
    [% cnt = 1 %]
112
    [% WHILE cnt <= numAO %]
113
     [% SET origNamefirst = "origNamefirst${cnt}" %]
114
     [% SET origNamelast = "origNamelast${cnt}" %]
115
     [% SET origRole = "origRole${cnt}" %]
116
     <tr> 
117
      <td width="21%" valign="TOP"> 
118
        [% $origNamefirst %]
119
      </td>
120
      <td width="21%" valign="TOP"> 
121
        [% $origNamelast %]
122
      </td>
123
      <td width="58%" valign="TOP"> 
124
	[% $origRole %]
125
      </td>
126
     </tr>
127
     [% cnt = cnt + 1 %]
128
     [% END %]    
129
</table>
130

  
131
<hr class="rule" />
132
<a name="DataSetAbstract"></a>
133
<h4>Data Set Abstract</h4>
134
<p>
135
[%abstract%]
136
</p>
137
 [% IF modules.keyword == 'true' %]
138
<hr class="rule" />
139
<a name="KeywordInformation"></a>
140
<h4>Keyword Information</h4> 
141

  
142
    [% numKey = 0 %]
143
    [% IF keyCount > 1 %]
144
        [% numKey = keyCount %]
145
    [% END %]
146

  
147
<table cellspacing="0" border="0" width="760">
148
    <tr> 
149
      <td width="21%" align="left" valign="TOP"> 
150
        <span class="text-info">Keyword</span>
151
      </td>
152
      <td width="21%" align="left" valign="TOP"> 
153
        <span class="text-info">Keyword Type</span>
154
      </td>
155
      <td width="58%" align="left" valign="TOP"> 
156
        <span class="text-info">Keyword Thesaurus</span>
157
      </td>
158
    </tr>
159
    [% cnt = 1 %]
160
    [% WHILE cnt <= numKey %]
161
     [% SET key = "keyword${cnt}" %]
162
     [% SET keyType = "kwType${cnt}" %]
163
     [% SET keyTh = "kwTh${cnt}" %]
164
     <tr> 
165
      <td width="21%" align="left" valign="TOP"> 
166
        [% $key %]
167
      </td>
168
      <td width="21%" align="left" valign="TOP"> 
169
        [% $keyType %]
170
      </td>
171
      <td width="58%" align="left" valign="TOP"> 
172
	[% $keyTh %]
173
      </td>
174
     </tr>
175
     [% cnt = cnt + 1 %]
176
     [% END %]
177
</table>
178
[% END %]
179
  
180
[% IF modules.temporal == 'true' %]
181
<hr class="rule" />
182
<a name="TemporalCoverageOfData"></a>
183
<h4>Temporal Coverage of Data</h4> 
184

  
185
<p><span class="text-info">Start Date:</span> [%beginningYear%] [%beginningMonth%] [%beginningDay%]
186
</p>
187

  
188
<p><span class="text-info">Stop Date:</span>    [%endingYear%] [%endingMonth%] [%endingDay%]
189
</p>
190
[% END %]
191

  
192
[% IF modules.spatial == 'true' %]
193
<hr class="rule" />
194
<a name="SpatialCoverageOfData"></a>
195
<h4>Spatial Coverage of Data</h4> 
196

  
197

  
198
<table cellspacing="0" border="0" width="760">
199
    <tr>
200
      <td valign="TOP" colspan="4"> 
201
        <p><span class="text-info">Geographic Description:</span> [%geogdesc%]</p>
202
      </td>
203
    </tr>
204
    <tr> 
205
      <td valign="TOP" colspan="4"> 
206
        <p><span class="text-info">Coordinates (in Degrees, Minutes and Seconds):</span></p>
207
      </td>
208
    </tr>
209
    
210
    <tr> 
211
      <td valign="TOP" colspan="4"> 
212
        <p><span class="text-info">The first lat/long pair:</span></p>
213
      </td>
214
    </tr>
215
    <tr> 
216
      <td width="18%" valign="TOP"> 
217
        <p><span class="text-info"> Latitude</span></p>
218
      </td>
219
      <td width="20%" valign="TOP"> 
220
        <p><span class="text-info"> North/South</span></p>
221
      </td>
222
      <td width="20%" valign="TOP"> 
223
        <p><span class="text-info"> Longitude</span></p>
224
      </td>
225
      <td width="42%" valign="TOP"> 
226
        <p><span class="text-info"> West/East</span></p>
227
      </td>
228
    </tr>
229
    <tr> 
230
      <td width="18%" valign="TOP"> 
231
        <p><font size="-1">
232
	[%latDeg1%] [%latMin1%]' [%latSec1%]&quot; 
233
        </font></p>
234
      </td>
235
      <td width="20%" valign="TOP"> 
236
        <p> <font size="-1">
237
          [%hemisphLat1%]
238
	</font></p>
239
      </td>
240
      <td width="20%" valign="TOP"> 
241
        <p><font size="-1"> 
242
	  [%longDeg1%] [%longMin1%]' [%longSec1%]&quot; 
243
        </font></p>
244
      </td>
245
      <td width="42%" valign="TOP"> 
246
        <p> <font size="-1">
247
          [%hemisphLong1%]
248
        </font></p>
249
      </td>
250
    </tr>
251
    [% IF latDeg2 %]
252
    <tr> 
253
      <td valign="TOP" colspan="4"> 
254
        <p><span class="text-info">The second lat/long pair:</span></p>
255
      </td>
256
    </tr>
257
    <tr> 
258
      <td width="18%" valign="TOP"> 
259
        <p><span class="text-info">Latitude</span></p>
260
      </td>
261
      <td width="20%" valign="TOP"> 
262
        <p><sapn class="text-info"> North/South</span></p>
263
      </td>
264
      <td width="20%" valign="TOP"> 
265
        <p><span class="text-info">Longitude</span></p>
266
      </td>
267
      <td width="42%" valign="TOP"> 
268
        <p><sapn class="text-info">West/East</span></p>
269
      </td>
270
    </tr>
271
    <tr>
272
      <td width="18%" valign="TOP"> 
273
        <p><font size="-1">
274
	[%latDeg2%] [%latMin2%]' [%latSec2%]&quot;
275
        </font></p>
276
      </td>
277
      <td width="20%" valign="TOP"> 
278
        <p> <font size="-1">
279
          [%hemisphLat2%]
280
	</font></p>
281
      </td>
282
      <td width="20%" valign="TOP"> 
283
        <p><font size="-1"> 
284
	  [%longDeg2%] [%longMin2%]' [%longSec2%]&quot; 
285
        </font></p>
286
      </td>
287
      <td width="42%" valign="TOP">
288
        <p> <font size="-1">
289
          [%hemisphLong2%]
290
        </font></p>
291
      </td>
292
    </tr>
293
    [% END %]
294
  </table>
295
[% END %]
296

  
297
[% IF modules.taxonomic == 'true' %]
298
    [% numTaxa = 0 %]
299
    [% IF taxaCount > 0 %]
300
        [% numTaxa = taxaCount %]
301
    [% END %]
302
    <hr class="rule" />
303
    <a name="Taxonomic Coverage"></a>
304
    <h4>Taxonomic Coverage of Data</h4>
305
    [% cnt = 1 %]
306
    [% WHILE cnt <= numTaxa %]
307
        [% SET trn = "taxonRankName${cnt}" %]
308
        [% SET trv = "taxonRankValue${cnt}" %]
309
        <p><span class="text-info">Taxon:</span>  [% $trn %]: [% $trv %]</p>
310
        [% cnt = cnt + 1 %]
311
     [% END %]
312
     <p><span class="text-info">Taxonomic Reference:</span>  [% taxaAuth %]</p>
313
[% END %]
314

  
315
[% IF modules.method == 'true' %]
316
    <hr class="rule" />
317
    <a name="Methods"></a>
318
    <h4>Data Collection Methods</h4>
319
    <p><span class="text-info">Method Title:</span> [%methodTitle%]</p>
320
    [% FOREACH para = methodPara %]
321
        <p><span class="text-info">Paragraph:</span> [%para%] </p>
322
    [% END %]
323
    <p><span class="text-info">Extent of Study Description:</span> [%studyExtentDescription%]</p>
324
    <p><span class="text-info">Sampling Description:</span> [%samplingDescription%]</p>
325
[% END %]
326

  
327
[% IF modules.upload == 'true' && upCount %]
328
   <hr class="rule" />
329
	 <a name="Upload Data"></a>
330
	  <h4>Upload Data</h4>
331
    
332
    [% cnt = 0 %]
333
    [% WHILE cnt < upCount %]
334
        [% SET fileName = "uploadname_${cnt}" %]
335
        [% SET filePerm = "uploadperm_${cnt}" %]
336
        [% cnt = cnt + 1 %]
337

  
338
        <p>
339
					<span class="text-info">File #[% cnt %]:</span> [% $fileName %], [% $filePerm %] access
340
					[% dCount = 0 %]
341
					[% IF delCount > 0 %]
342
						 [% dCount = delCount %]
28
					[% ELSE %]
29
						[% IF cfg == 'esa' %]
30
							<tr><td>Organization Name</td><td>[%- site -%]</td></tr>
31
							
32
						[% ELSE %]
33
							<tr><td>[%- config.site | ucfirst -%] Name</td><td>[%- site -%]</td></tr>
34
							
35
						[% END %]
343 36
					[% END %]
344
					[% cntd = 0 %]
345
					[% WHILE cntd < dCount %]
346
							[% SET delfile = "deletefile_${cntd}" %]
347
							[% IF $delfile == fileName %]
348
								<span class="redbold">to be removed</b>	
37
					<tr><td>Award Number</td><td>[%- funding -%]</td></tr>
38
				</table>
39
				
40
				<a name="DataSetOriginator"></a>
41
				<h4>People and Organizations</h4>
42
				[% cnt = 0 %]
43
				<table class="table table-bordered table-striped table-condensed">
44
				[% WHILE cnt <= partyCount %]
45
					[% SET partyId         = "partyId${cnt}" %]
46
					[% SET partyFirstName  = "partyFirstName${cnt}" %]
47
					[% SET partyLastName   = "partyLastName${cnt}" %]
48
					[% SET partyRole       = "partyRole${cnt}" %]
49
					[% SET partyPositionName = "partyPositionName${cnt}" %]
50
					[% SET partyOrgName    = "partyOrgName${cnt}" %]
51
					[% SET partyEmail      = "partyEmail${cnt}" %]
52
					[% SET partyURL        = "partyURL${cnt}" %]
53
					[% SET partyPhone      = "partyPhone${cnt}" %]
54
					[% SET partyFAX        = "partyFAX${cnt}" %]
55
					[% SET partyDelivery   = "partyDelivery${cnt}" %]
56
					[% SET partyCity       = "partyCity${cnt}" %]
57
					[% SET partyState      = "partyState${cnt}" %]
58
					[% SET partyStateOther = "partyStateOthe${cnt}" %] 
59
					[% SET partyZIP        = "partyZIP${cnt}" %]
60
					[% SET partyCountry    = "partyCountry${cnt}" %]
61
					[% SET roles = {
62
						principalInvestigator              => 'Principal Investigator',
63
						coPrincipalInvestigator            => 'Co-Principal Investigator',
64
						collaboratingPrincipalInvestigator => 'Collaborating-Principal Investigator',
65
						creator                            => 'Creator (Author/Owner/Originator)',
66
						contact                            => 'Contact',
67
						metadataProvider                   => 'Metadata Provider',
68
						custodianSteward                   => 'Custodian/Steward',
69
						publisher                          => 'Publisher',
70
						user                               => 'User'} %]
71
	
72
					[% IF $partyRole != '' %]
73
						
74
							[% IF $partyFirstName != '' %]
75
							<tr><td>First Name</td><td><strong>[%- $partyFirstName -%]<strong></td></tr>
349 76
							[% END %]
350
							[% cntd = cntd + 1 %]
351
  				[% END %]   
352
				</p>
353
    [% END %]
354
[% END %]
355
<hr class="rule" />
356
<a name="DataSetContactAddress"></a>
357
<h4>Data Set Contact</h4> 
77
							
78
							[% IF $partyLastName != '' %]
79
							<tr><td>Last Name</td><td><strong>[%- $partyLastName -%]</strong></td></tr>
80
							[% END %]
81
							
82
							[% IF $partyOrgName != '' %]
83
							<tr><td>Organization Name</td><td>[%- $partyOrgName -%]</td></tr>
84
							[% END %]
85
							
86
							[% IF $partyPositionName != '' %]
87
							<tr><td>Position Name</td><td>[%- $partyPositionName -%]</td></tr>
88
							[% END %]
89
							
90
							[% IF $partyRole != '' %]
91
						  [%- pRole = $partyRole -%]
92
							<tr><td>Role</td><td>[%- roles.$pRole -%]</td></tr>
93
							[% END %]
94
							
95
							[% IF $partyEmail != '' %]
96
							<tr><td>Email</td><td>[%- $partyEmail -%]</td></tr>
97
							[% END %]
98
							
99
							[% IF $partyURL != '' %]
100
							<tr><td>Online Link</td><td>[%- $partyURL -%]</td></tr>
101
							[% END %]
102
							
103
							[% IF $partyPhone != '' %]
104
							<tr><td>Phone</td><td>[%- $partyPhone -%]</td></tr>
105
							[% END %]
106
							
107
							[% IF $partyFAX != '' %]
108
							<tr><td>FAX</td><td>[%- $partyFAX -%]</td></tr>
109
							[% END %]
110
							
111
							[% IF $partyDelivery != '' %]
112
							<tr><td>Address</td><td>[%- $partyDelivery -%]</td></tr>
113
							[% END %]
114
							
115
							[% IF $partyCity != '' %]
116
							<tr><td>City</td><td>[%- $partyCity -%]</td></tr>
117
							[% END %]
118
							
119
							[% IF $partyState != '' %]
120
							<tr><td>State</td><td>[%- $partyState -%]</td></tr>
121
							[% END %]
122
							
123
							[% IF $partyStateOther != '' %]
124
							<tr><td>Other Province</td><td>[%- $partyStateOther -%]</td></tr>
125
							[% END %]
126
							
127
							[% IF $partyZIP != '' %]
128
							<tr><td>Postal Code</td><td>[%- $partyZIP -%]</td></tr>
129
							[% END %]
130
							
131
							[% IF $partyCountry != '' %]
132
							<tr><td>Country</td><td>[%- $partyCountry -%]</td></tr>
133
							[% END %]
134
							<tr><td colspan="2">&nbsp;</td></tr>
135
			    [% END %]
136
					[% cnt = cnt + 1 %]
137
				[% END %]
138
				</table>
358 139

  
359 140
<p><span class="text-info">First Name:</span>        [%origNamefirstContact%]
360 141
</p>
......
641 422
						<input type="hidden" name="username" value="" /> 
642 423
						<input type="hidden" name="cfg" value="[%cfg%]" /> 
643 424
					
644
						<div>
645
							<div class="row-fluid">
646
								<div class="span2 text-left">Username</div>
647
								<div class="span4 text-left"><input name="uid" type="text" value="" /></div>
648
							</div>
649
							<div class="row-fluid">
650
								<div class="span2 text-left">Organization</div>
651
								<div class="span4 text-left"><select name="organization">
652
										<option value="">&#8212; choose one &#8212;</option>
653
										<option value="NCEAS">NCEAS</option>
654
										<option value="LTER">LTER</option>
655
										<option value="KU">KU</option>
656
										<option value="OBFS">OBFS</option>
657
										<option value="OSUSB">OSUSB</option>
658
										<option value="PARC">PARC</option>
659
										<option value="PISCO">PISCO</option>
660
										<option value="SAEON">SAEON</option>
661
										<option value="SANParks">SANParks</option>
662
										<option value="SDSC">SDSC</option>
663
										<option value="UCNRS">UCNRS</option>
664
										<option value="unaffiliated">unaffiliated</option>
665
								</select></div>
666
							</div>
667
							<div class="row-fluid">
668
								<div class="span2 text-left">Password</div>
669
								<div class="span4 text-left"><input name="password" type="password" maxlength="50"
670
									value="" /></div>
671
							</div>
672
							<div class="row-fluid">
673
								<div class="offset2 span4 text-left">
674
									<input type="submit" class="btn" name="loginAction" value="Login" />
675
								</div>
676
							</div>
677
						</div>
425
					
426
					<table class="table table-bordered table-striped teble-condensed">
427
					    <tr>
428
					      <td colspan="4">Geographic Description: [%- geogdesc -%]</td>
429
					    </tr>
430
					    <tr> 
431
					      <td colspan="4">First lat/long pair:</td>
432
					    </tr>
433
					    <tr> 
434
					      <td>Latitude</td>
435
					      <td>North/South</td>
436
					      <td>Longitude</td>
437
					      <td>West/East</td>
438
					    </tr>
439
					    <tr> 
440
					      <td>[%latDeg1%] [%latMin1%]' [%latSec1%]&quot;</td>
441
					      <td>[%hemisphLat1%]</td>
442
					      <td>[%longDeg1%] [%longMin1%]' [%longSec1%]&quot;</td>
443
					      <td>[%hemisphLong1%]</td>
444
					    </tr>
445
					    [% IF latDeg2 %]
446
					    	<tr> 
447
					    	  <td colspan="4">The second lat/long pair:</td>
448
					    	</tr>
449
					    	<tr> 
450
					    	  <td>Latitude</td>
451
					    	  <td>North/South</td>
452
					    	  <td>Longitude</td>
453
					    	  <td>West/East</td>
454
					    	</tr>
455
					    	<tr>
456
					    	  <td>[%latDeg2%] [%latMin2%]' [%latSec2%]&quot;</td>
457
					    	  <td>[%hemisphLat2%]</td>
458
					    	  <td>[%longDeg2%] [%longMin2%]' [%longSec2%]&quot;</td>
459
					    	  <td>[%hemisphLong2%]</td>
460
					    	</tr>
461
					    [% END %]
462
					 </table>
463
				[% END %]
464
      	
465
				[% IF modules.taxonomic == 'true' %]
466
				    [% numTaxa = 0 %]
467
				    [% IF taxaCount > 0 %]
468
				        [% numTaxa = taxaCount %]
469
				    [% END %]
470
				    <a name="Taxonomic Coverage"></a>
471
				    <h4>Taxonomic Coverage of Data</h4>
472
				    [% cnt = 1 %]
473
						<table class="table table-bordered table-striped teble-condensed">
474
				    	[% WHILE cnt <= numTaxa %]
475
				    		[% SET trn = "taxonRankName${cnt}" %]
476
				    		[% SET trv = "taxonRankValue${cnt}" %]
477
								<tr><td>Taxon:</td><td>[%- $trn -%]</td><td>[% $trv %]</td></tr>
478
				    		[% cnt = cnt + 1 %]
479
				    	[% END %]
480
						</table>
481
						[% IF taxaAuth %]
482
				    	<p>Taxonomic Reference: [%- taxaAuth -%]</p>
483
						[% END %]
484
				[% END %]
485
      	
486
				[% IF modules.method == 'true' %]
487
					<a name="Methods"></a>
488
					<h4>Data Collection Methods</h4>
489
					<h5>Method Title: [%- methodTitle -%]</h5>
490
					[% FOREACH para = methodPara %]
491
					    <p>[%- para -%]</p>
492
					[% END %]
493
					<h5>Extent of Study Description:</h5>
494
					<p>[%- studyExtentDescription -%]</p>
495
					<h5>Sampling Description:</h5>
496
					<p>[%- samplingDescription -%]</p>
497
				[% END %]
498
      	
499
				[% IF modules.upload == 'true' && upCount %]
500
					 <a name="Upload Data"></a>
501
					  <h4>Upload Data</h4>
502
				    
503
				    [% cnt = 0 %]
504
						<table class="table table-bordered table-striped table-condensed">
505
				    	[% WHILE cnt < upCount %]
506
				    	    [% SET fileName = "uploadname_${cnt}" %]
507
				    	    [% SET filePerm = "uploadperm_${cnt}" %]
508
				    	    [% cnt = cnt + 1 %]
509
				    		<tr>
510
									<td>File #[% cnt %]:</td>
511
									<td>[% $fileName %]</td>
512
									<td>[% $filePerm %] access</td>
513
									<td>
514
										[% dCount = 0 %]
515
										[% IF delCount > 0 %]
516
											 [% dCount = delCount %]
517
										[% END %]
518
										[% cntd = 0 %]
519
										[% WHILE cntd < dCount %]
520
												[% SET delfile = "deletefile_${cntd}" %]
521
												[% IF $delfile == fileName %]
522
													to be removed
523
												[% END %]
524
												[% cntd = cntd + 1 %]
525
				  					[% END %]   
526
									</td>
527
								</tr>
528
				    	[% END %]						
529
						</table>
530
				[% END %]
531
      	
532
				<a name="DistributionIinformation"></a>
533
				<h4>Distribution Information</h4> 
534
				
535
				<a name="Site-specificCode"></a>
536
				[% IF identifierCount > 0 %]
537
					<h5>Data Set Identifiers:</h5>
538
					
539
					[% numIdentifier = 0 %]
540
					[% numIdentifier = identifierCount %]
541
					[% cnt = 1 %]
542
					<table class="table table-bordered table-striped table-condensed">
543
						[% WHILE cnt <= numIdentifier %]
544
							[% SET id = "identifierValue${cnt}" %]
545
							<tr><td>Identifier:</td><td>[% $id %]</td></tr>
546
							[% cnt = cnt + 1 %]
547
						[% END %]						
548
					</table>
549
				[% END %]
550
				
551
				</p>
552
				
553
				<p>Data Medium: [%dataMedium%]</p>
554
				<p>Other Data Medium: [%- dataMediumOther -%]</p>
555
				
556
				<p>Usage Constraints: [%- useConstraints -%]</p>
557
				<p>Other Usage Constraints: [%- useConstraintsOther -%]</p>
558
				<p>URL: [%url%]</p>
559
				<p>Additional Information: [%addComments%]</p>
560
				<p>
561
				  All data and metadata are released under either the 
562
				  <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC-0 Public Domain Dedication</a>
563
				  or the 
564
				  <a href="http://creativecommons.org/licenses/by/4.0/">
565
				    Creative Commons Attribution 4.0 International License
566
				  </a>. 
567
				  As a repository dedicated to helping researchers increase collaboration 
568
				  and the pace of science, this repository needs certain rights to copy, store, 
569
				  and redistribute data. By uploading data, metadata, and any other content to 
570
				  this repository, you warrant that you own any rights to the content and are 
571
				  authorized to do so under copyright or any other right that might pertain 
572
				  to the content. 
573
				  <a href="http://www.bitlaw.com/copyright/database.html">
574
				    Data and facts themselves are not covered under copyright
575
				  </a> 
576
				  in the US and most countries, since facts in and of themselves are not 
577
				  eligible for copyright. That said, some associated metadata and some 
578
				  particular compilations of data could potentially be covered by copyright 
579
				  in some jurisdictions. By uploading content, you grant this repository and 
580
				  UCSB all rights needed to copy, store, redistribute, and share data, metadata, 
581
				  and any other content. By marking content as publicly available, you grant this 
582
				  repository, UCSB, and any other users the right to copy the content and redistribute 
583
				  it to the public without restriction under the terms of the 
584
				  <a href="http://creativecommons.org/licenses/by/4.0/">
585
				    Creative Commons Attribution 4.0 International License
586
				  </a> 
587
				  or the 
588
				  <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC-0 Public Domain Dedication</a>, 
589
				  depending on which you choose at the time of upload.
590
				</p>
591
				<form id="confirmForm" action="[% cgiPrefix %]/register-dataset.cgi" method="post">
592
				  <input type="hidden" name="cfg" value="[% cfg %]" />
593
				  <input type="hidden" name="docid" value="[% docid %]" />
594
				  <input type="hidden" name="stage" value="confirmed" />
595
				  <input type="hidden" name="providerGivenName" value="[%providerGivenName%]" />
596
				  <input type="hidden" name="providerSurName" value="[%providerSurName%]"/>
597
				  <input type="hidden" name="site" value="[%site%]"/>
598
				  [% IF cfg == 'nceas' %]
599
				      [% FOREACH group = wg %]
600
				          <input type="hidden" name="wg" value="[%group%]" />
601
				      [% END %]
602
				  [% END %]
603
				
604
				  [% cnt = 1 %]
605
				  [% WHILE cnt <= numIdentifier %]
606
				      [% SET id = "identifierValue${cnt}" %]
607
				      <input type="hidden" name="[% id %]" value="[% $id %]" />
608
				      <input type="hidden" name="identifier" value="[% $id %]" />
609
				      [% cnt = cnt + 1 %]
610
				  [% END %]  
611
				  <input type="hidden" name="identifierCount" value="[% identifierCount %]" />
612
				
613
				  <input type="hidden" name="funding" value="[%funding%]" /> 
614
				  <input type="hidden" name="title" value="[%title%]" />
615
				  <input type="hidden" name="useOrigAddress" value="[%useOrigAddress%]" />
616
				  <input type="hidden" name="partyCount" value="[% partyCount %]" />
617
				
618
				
619
				  [% cnt = 0 %]
620
				  [% WHILE cnt <= partyCount %]
621
						[% SET partyId         = "partyId${cnt}" %]
622
						[% SET partyFirstName  = "partyFirstName${cnt}" %]
623
						[% SET partyLastName   = "partyLastName${cnt}" %]
624
						[% SET partyRole       = "partyRole${cnt}" %]
625
						[% SET partyOrgName    = "partyOrgName${cnt}" %]
626
						[% SET partyPositionName = "partyPositionName${cnt}" %]
627
						[% SET partyEmail      = "partyEmail${cnt}" %]
628
						[% SET partyURL        = "partyURL${cnt}" %]
629
						[% SET partyPhone      = "partyPhone${cnt}" %]
630
						[% SET partyFAX        = "partyFAX${cnt}" %]
631
						[% SET partyDelivery   = "partyDelivery${cnt}" %]
632
						[% SET partyCity       = "partyCity${cnt}" %]
633
						[% SET partyState      = "partyState${cnt}" %]
634
						[% SET partyStateOther = "partyStateOther${cnt}" %] 
635
						[% SET partyZIP        = "partyZIP${cnt}" %]
636
						[% SET partyCountry    = "partyCountry${cnt}" %]
678 637
						
679
					</form>
680
				</div>
638
						<input type="hidden" name="[% partyId         %]" value="[% $partyId         %]" /> 	
639
						<input type="hidden" name="[% partyFirstName  %]" value="[% $partyFirstName  %]" /> 	
640
						<input type="hidden" name="[% partyLastName  	%]" value="[% $partyLastName   %]" />	
641
						<input type="hidden" name="[% partyRole     	%]" value="[% $partyRole       %]" />	
642
						<input type="hidden" name="[% partyOrgName   	%]" value="[% $partyOrgName    %]" />	
643
						<input type="hidden" name="[% partyPositionName %]" value="[% $partyPositionName %]" />	
644
						<input type="hidden" name="[% partyEmail     	%]" value="[% $partyEmail      %]" />	
645
						<input type="hidden" name="[% partyURL      	%]" value="[% $partyURL        %]" />	
646
						<input type="hidden" name="[% partyPhone     	%]" value="[% $partyPhone      %]" />	
647
						<input type="hidden" name="[% partyFAX       	%]" value="[% $partyFAX        %]" />	
648
						<input type="hidden" name="[% partyDelivery  	%]" value="[% $partyDelivery   %]" />	
649
						<input type="hidden" name="[% partyCity      	%]" value="[% $partyCity       %]" />	
650
						<input type="hidden" name="[% partyState     	%]" value="[% $partyState      %]" />	
651
						<input type="hidden" name="[% partyStateOther	%]" value="[% $partyStateOther %]" />	
652
						<input type="hidden" name="[% partyZIP       	%]" value="[% $partyZIP        %]" />	
653
						<input type="hidden" name="[% partyCountry   	%]" value="[% $partyCountry    %]" />			
681 654
				
682
				<div class="span6 pagination-left">
655
						<input type="hidden" name="partyFirstName" value="[% $partyFirstName %]" /> 	
656
						<input type="hidden" name="partyLastName" value="[% $partyLastName %]" />	
657
						<input type="hidden" name="partyRole" value="[% $partyRole %]" />	
658
						<input type="hidden" name="partyOrgName" value="[% $partyOrgName %]" />	
659
						<input type="hidden" name="partyPositionName" value="[% $partyPositionName %]" />	
660
						<input type="hidden" name="partyEmail" value="[% $partyEmail %]" />	
661
						<input type="hidden" name="partyURL" value="[% $partyURL %]" />	
662
						<input type="hidden" name="partyPhone" value="[% $partyPhone %]" />	
663
						<input type="hidden" name="partyFAX" value="[% $partyFAX %]" />	
664
						<input type="hidden" name="partyDelivery" value="[% $partyDelivery %]" />	
665
						<input type="hidden" name="partyCity" value="[% $partyCity %]" />	
666
						<input type="hidden" name="partyState" value="[% $partyState %]" />	
667
						<input type="hidden" name="partyStateOther" value="[% $partyStateOther %]" />	
668
						<input type="hidden" name="partyZIP" value="[% $partyZIP %]" />	
669
						<input type="hidden" name="partyCountry" value="[% $partyCountry %]" />			
670
				
671
				  	[% cnt = cnt + 1 %]
672
				  [% END %]
683 673
					
684
					<div class="row-fluid">
685
						<div class="span6 text-left">
686
							<p>Don't have an account yet? Forgot your password?</p>
687
						</div>
688
						<div class="span6 text-left">
689
							<a href="[%userManagementUrl%]">
690
								<i class="icon-user"></i>
691
								Click here
692
							</a>
693
						</div>
694
					</div>
695
					
696
					
697
				</div>
674
				  <input type="hidden" name="abstract" value="[%abstract%]" />
675
				  <input type="hidden" name="keyCount" value="[%keyCount%]" />
676
				  [% cnt = 1 %]
677
				  [% WHILE cnt <= numKey %]
678
				      [% SET kyd = "keyword${cnt}" %]
679
				      [% SET keyType = "kwType${cnt}" %]
680
				      [% SET keyTh = "kwTh${cnt}" %]
681
				      <input type="hidden" name="[% kyd %]" value="[% $kyd %]" />
682
				      <input type="hidden" name="[% keyType %]" value="[% $keyType %]" />
683
				      <input type="hidden" name="[% keyTh %]" value="[% $keyTh %]" />
684
				      [% cnt = cnt + 1 %]
685
				  [% END %]
686
				  <input type="hidden" name="addComments" value="[%addComments%]" />
687
				  <input type="hidden" name="useConstraints" value="[%useConstraints%]" />
688
				  <input type="hidden" name="useConstraintsOther" value="[%useConstraintsOther%]" />
689
				  <input type="hidden" name="url" value="[%url%]" />
690
				  <input type="hidden" name="dataMedium" value="[%dataMedium%]" />
691
				  <input type="hidden" name="dataMediumOther" value="[%dataMediumOther%]" />
692
				  <input type="hidden" name="beginningYear" value="[%beginningYear%]" />
693
				  <input type="hidden" name="beginningMonth" value="[%beginningMonth%]" />
694
				  <input type="hidden" name="beginningDay" value="[%beginningDay%]" />
695
				  <input type="hidden" name="endingYear" value="[%endingYear%]" />
696
				  <input type="hidden" name="endingMonth" value="[%endingMonth%]" />
697
				  <input type="hidden" name="endingDay" value="[%endingDay%]" />
698
				  <input type="hidden" name="geogdesc" value="[%geogdesc%]" />
699
				  <input type="hidden" name="useSiteCoord" value="[%useSiteCoord%]" />
700
				  <input type="hidden" name="latDeg1" value="[% latDeg1 %]" />
701
				  <input type="hidden" name="latMin1" value="[%latMin1%]" />
702
				  <input type="hidden" name="latSec1" value="[%latSec1%]" />
703
				  <input type="hidden" name="hemisphLat1" value="[%hemisphLat1%]" />	
704
				  <input type="hidden" name="longDeg1" value="[% longDeg1 %]" />
705
				  <input type="hidden" name="longMin1" value="[%longMin1%]" />
706
				  <input type="hidden" name="longSec1" value="[%longSec1%]" />
707
				  <input type="hidden" name="hemisphLong1" value="[%hemisphLong1%]" />
708
				  <input type="hidden" name="latDeg2" value="[%latDeg2%]" />
709
				  <input type="hidden" name="latMin2" value="[%latMin2%]" />
710
				  <input type="hidden" name="latSec2" value="[%latSec2%]" />
711
				  <input type="hidden" name="hemisphLat2" value="[%hemisphLat2%]" />	
712
				  <input type="hidden" name="longDeg2" value="[%longDeg2%]" />
713
				  <input type="hidden" name="longMin2" value="[%longMin2%]" />
714
				  <input type="hidden" name="longSec2" value="[%longSec2%]" />
715
				  <input type="hidden" name="hemisphLong2" value="[%hemisphLong2%]" />
716
				  <input type="hidden" name="taxaCount" value="[%taxaCount%]" />
717
				  <input type="hidden" name="userLoggedIn" value="[%userLoggedIn%]" />
718
				  [% cnt = 1 %]
719
				  [% WHILE cnt <= numTaxa %]
720
				      [% SET trn = "taxonRankName${cnt}" %]
721
				      [% SET trv = "taxonRankValue${cnt}" %]
722
				      <input type="hidden" name="[% trn %]" value="[% $trn %]" />
723
				      <input type="hidden" name="[% trv %]" value="[% $trv %]" />
724
				      [% cnt = cnt + 1 %]
725
				  [% END %]
726
				  <input type="hidden" name="taxaAuth" value="[%taxaAuth%]" />
698 727
				
728
				  <input type="hidden" name="methodTitle" value="[%methodTitle%]" />
729
				  [% FOREACH para = methodPara %]
730
				      <input type="hidden" name="methodPara" value="[%para%]" />
731
				  [% END %]
732
				  <input type="hidden" name="studyExtentDescription" value="[%studyExtentDescription%]" />
733
				  <input type="hidden" name="samplingDescription" value="[%samplingDescription%]" />
734
				  <input type="hidden" name="upCount" value="[%upCount%]" />
735
				  <input type="hidden" name="delCount" value="[% delCount %]" />
736
				  [% dCount = 0 %]
737
				  [% IF delCount > 0 %]
738
				     [% dCount = delCount %]
739
				  [% END %]
740
				  [% cnt = 0 %]
741
				  [% WHILE cnt < dCount %]
742
				 		  [% SET delfile = "deletefile_${cnt}" %]
743
				      		<input type="hidden" name="[% delfile %]" value="[% $delfile %]" />
744
							<input type="hidden" name="deletefile" value="[% $delfile %]" />
745
							[% cnt = cnt + 1 %]
746
					[% END %]		
747
				
748
				  [% fCount = 0 %]
749
				  [% IF upCount > 0 %]
750
				      [% fCount = upCount %]
751
				  [% END %]
752
				
753
				  [% cnt = 0 %]
754
				  [% WHILE cnt < fCount %]
755
				      [% SET fileSum = "upload_${cnt}" %]
756
				      [% SET fileName = "uploadname_${cnt}" %]
757
				      [% SET fileType = "uploadtype_${cnt}" %] 
758
				      [% SET filePerm = "uploadperm_${cnt}" %]
759
				
760
				      [% IF fileSum %]
761
				        <input type="hidden" name="[% fileSum %]" value="[% $fileSum %]" />
762
				        <input type="hidden" name="[% fileName %]" value="[% $fileName %]" />
763
				        <input type="hidden" name="[% fileType %]" value="[% $fileType %]" />
764
				        <input type="hidden" name="[% filePerm %]" value="[% $filePerm %]" />
765
				      [% END %]
766
				      [% cnt = cnt + 1 %]
767
				  [% END %]
768
				  
769
				  	<!-- form submission -->
770
					<a name="buttons"></a>
771
					<p><strong>Is the information above correct?</strong></p> 
772
					<input id="dataCorrect" type="button" class="btn" value="     Yes, submit    " name="dataCorrect" />
773
					<input id="dataWrongButton" type="button" class="btn" value="No, go back to editing" />
774
					<input id="dataWrong" name="dataWrong" type="hidden" class="btn" value="TBD" />
775
				
776
				</form>
699 777
			</div>
700

  
701
[% END %]
702

  
703
			</div>
704

  
705 778
		</div>
706 779
	</article>
707 780
	
708 781

  
lib/style/common/templates/metacatui/entryForm.js
148 148
}
149 149

  
150 150
function sortInputTags() {
151
    sortTagWithAttributeName("aoFirstName", "addAssociatedParty");
152
    sortTagWithAttributeName("aoLastName", "addAssociatedParty");
153
    sortTagWithAttributeName("aoRole", "addAssociatedParty", "select");
154
    
155 151
    sortTagWithAttributeName("taxonName", "addTaxon");
156 152
    sortTagWithAttributeName("taxonRank", "addTaxon");
157 153
    
......
291 287
}
292 288

  
293 289
function delRow(evt) {
294
    evt = (evt) ? evt : ((window.event) ? window.event : null);
290
		evt = (evt) ? evt : ((window.event) ? window.event : null);
295 291
    if (evt) {
296 292
        // equalize W3C/IE models to get event target reference
297 293
        var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
298 294
        if (elem) {
299 295
            try {
300
                var table = elem.parentNode.parentNode.parentNode.parentNode;
301
                var row = elem.parentNode.parentNode.parentNode;
302

  
303
                table.removeChild(row);
296
							var table = elem.parentNode.parentNode.parentNode.parentNode.parentNode;
297
							var rowParent = elem.parentNode.parentNode.parentNode.parentNode;
298
							var row = elem.parentNode.parentNode.parentNode;
299
							rowParent.removeChild(row);
300
							var identifier = table.getAttribute("id");
301
							if ( identifier == "partyTable") {
302
								// Update the total party count 
303
								var countElem = document.getElementById("partyCount");
304
								var count = countElem.value;
305
								if ( count > 0 ) {
306
									count--;
307
									countElem.value = count;
308
								}									
309
							}
304 310
            }
305 311
            catch(e) {
306 312
                var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
......
312 318
}
313 319

  
314 320
function moveUpRow(evt) {
315
    evt = (evt) ? evt : ((window.event) ? window.event : null);
316
    if (evt) {
317
        // equalize W3C/IE models to get event target reference
318
        var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
319
        if (elem) {
320
            try {
321
                var table = elem.parentNode.parentNode.parentNode.parentNode;
322
                var row = elem.parentNode.parentNode.parentNode;
323
                
324
                var bro = row.previousSibling;
325
                if (bro != null && bro.previousSibling.nodeName =="TR") {
326
                    clone = row.cloneNode(true);
327
                    table.insertBefore(clone, bro);
328
                    table.removeChild(row);
329
                }
330
            }
331
            catch(e) {
332
                var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
333
                alert("Error:\n" + msg);
334
                return;
335
            }
336
        }
337
    }
321
	evt = (evt) ? evt : ((window.event) ? window.event : null);
322
	if (evt) {
323
		// equalize W3C/IE models to get event target reference
324
		var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
325
		if (elem) {
326
		    try {
327
						var table = elem.parentNode.parentNode.parentNode.parentNode;
328
						var row = elem.parentNode.parentNode.parentNode;
329
						
330
						var bro = row.previousElementSibling;
331
						if ( bro != null ) {
332
							if ( bro.nodeName == "TR" ) {
333
							clone = row.cloneNode(true);
334
							table.insertBefore(clone, bro);
335
							table.removeChild(row);
336
							}
337
						}
338
			}
339
			catch(e) {
340
				var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
341
				alert("Error:\n" + msg);
342
				return;
343
			}
344
		}
345
	}
338 346
}
339 347

  
340 348
function moveDownRow(evt, lastTR) {
341
    evt = (evt) ? evt : ((window.event) ? window.event : null);
342
    if (evt) {
343
        // equalize W3C/IE models to get event target reference
344
        var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
345
        if (elem) {
346
            try {
347
                var table = elem.parentNode.parentNode.parentNode.parentNode;
348
                var row = elem.parentNode.parentNode.parentNode;
349
                
350
                var _test = row.nextSibling;
351
                if (_test.getAttribute("id") == lastTR) {
352
                    return;
353
                }
354
                var bro = row.nextSibling.nextSibling;
355
                if (bro != null && bro.nodeName =="TR") {
356
                    clone = row.cloneNode(true);
357
                    table.insertBefore(clone, bro);
358
                    table.removeChild(row);
359
                }
360
            }
361
            catch(e) {
362
                var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
363
                alert("Error:\n" + msg);
364
                return;
365
            }
366
        }
367
    }
349
	evt = (evt) ? evt : ((window.event) ? window.event : null);
350
	if (evt) {
351
		// equalize W3C/IE models to get event target reference
352
		var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
353
		if (elem) {
354
			try {
355
				var table = elem.parentNode.parentNode.parentNode.parentNode;
356
				var row = elem.parentNode.parentNode.parentNode;
357
				
358
				var _test = row.nextElementSibling;
359
				if (_test.getAttribute("id") == lastTR) {
360
					return;
361
				}
362
				var bro = row.nextElementSibling.nextElementSibling;
363
				if ( bro != null ) {
364
					if ( bro.nodeName == "TR" ) {
365
					clone = row.cloneNode(true);
366
					table.insertBefore(clone, bro);
367
					table.removeChild(row);
368
						
369
					}
370
				}
371
			}
372
			catch(e) {
373
				var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
374
				alert("Error:\n" + msg);
375
				return;
376
			}
377
		}
378
	}
368 379
}
369 380

  
370 381
function addAssociatedParty() {
371
    var AOLN   = document.getElementById("AONameLast");
372
    var AOFN   = document.getElementById("AONameFirst");
373
    var AORole = document.getElementById("AORole");
382
	var partyFirstName  = document.getElementById("assocPartyFirstName");
383
	var partyLastName   = document.getElementById("assocPartyLastName");
384
	var partyRole       = document.getElementById("assocPartyRole");
385
	var partyOrgName    = document.getElementById("assocPartyOrgName");
386
	var partyPositionName = document.getElementById("assocPartyPositionName");
387
	var partyEmail      = document.getElementById("assocPartyEmail");
388
	var partyURL        = document.getElementById("assocPartyURL");
389
	var partyPhone      = document.getElementById("assocPartyPhone");
390
	var partyFAX        = document.getElementById("assocPartyFAX");
391
	var partyDelivery   = document.getElementById("assocPartyDelivery");
392
	var partyCity       = document.getElementById("assocPartyCity");
393
	var partyState      = document.getElementById("assocPartyState");
394
	var partyStateOther = document.getElementById("assocPartyStateOther");
395
	var partyZip        = document.getElementById("assocPartyZip");
396
	var partyCountry    = document.getElementById("assocPartyCountry");
374 397

  
375
    if (AOLN.value != "") {
376
        var aoCount = incrementCount("aoCount");
377
        
378
        try {
379
            var aoRow = createAORow(aoCount, AOLN.value, AOFN.value, AORole.options[AORole.selectedIndex].text);
380
        } catch(e) {
381
            var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
382
            alert("Error:\n" + msg);
383
            return;
384
        }
398
	if (partyLastName.value != "" || partyOrgName.value != "" || partyPositionName.value != "") {
399
	    var partyCount = incrementCount("partyCount");
385 400

  
386
        var aoRowMarker = document.getElementById("addaorow");
387
        var parent = aoRowMarker.parentNode;
388
        
389
        var aoHR = document.getElementById("aoHRRow");
390
        if (aoHR == null) {
391
            var aoHRRow = createHRRow();
392
            aoHRRow.setAttribute("id", "aoHRRow");
393
            parent.insertBefore(aoHRRow, aoRowMarker);
394
        }
395
        
396
        parent.insertBefore(aoRow, aoRowMarker);
397
    
398
        AOFN.value = "";
399
        AOLN.value = "";
400
        AORole.selectedIndex = 0;
401
    } else {
402
        alert("Enter the last name of the associated party");
403
    }
401
			try {
402
				var partyRow = createPartyRow(
403
					partyCount, 
404
					partyLastName.value, 
405
					partyFirstName.value, 
406
					partyRole.options[partyRole.selectedIndex],
407
					partyOrgName.value,   
408
					partyPositionName.value,   
409
					partyEmail.value,     
410
					partyURL.value,     
411
					partyPhone.value,     
412
					partyFAX.value,       
413
					partyDelivery.value,  
414
					partyCity.value,      
415
					partyState.options[partyState.selectedIndex],     
416
					partyStateOther.value,
417
					partyZip.value,       
418
					partyCountry.value);
419
			
420
			} catch(e) {
421
				var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
422
				alert("Error:\n" + msg);
423
				return;
424
				
425
			}
426
			
427
			var partyRowMarker = document.getElementById("partyRowMarker");
428
			var parent = partyRowMarker.parentNode;
429
			
430
			parent.insertBefore(partyRow, partyRowMarker);
431
			
432
			/* Clear the form */
433
			partyFirstName.value = "";
434
			partyLastName.value = "";
435
			partyRole.selectedIndex = 0;
436
			partyOrgName.value = "";
437
			partyPositionName.value = "";
438
			partyEmail.value = "";     
439
			partyURL.value = "";     
440
			partyPhone.value = "";     
441
			partyFAX.value = "";       
442
			partyDelivery.value = "";  
443
			partyCity.value = "";      
444
			partyState.selectedIndex = 0;  
445
			partyStateOther.value = "";
446
			partyZip.value = "";       
447
			partyCountry.value = "";
448

  
449
			/* Clear the selected row id */
450
			var selectedRowInput = document.getElementById("selectedRow");
451
			if ( selectedRowInput != null ) {
452
				selectedRowInput.parentElement.removeChild(selectedRowInput);
453
				
454
			}
455

  
456
      /* Hide the update party button if it is showing */
457
			hideUpdatePartyButton();
458
							
459
	} else {
460
		alert("Please enter a person's last name, an organization name, or a position name at a minimum.");
461
		
462
	}
404 463
}
405 464

  
406
function createAORow(aoCount, AOLN, AOFN, AORole){    
407
    var TR = document.createElement("tr");
408
    TR.className='sectbody';
409
    var labelTD = createTD("5","left", "pointer");
410
    
411
    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
412
        labelTD.attachEvent("onclick", new Function("aoEditRow(event, 0, \"" + AOFN  + "\",\""
413
                         + AOLN  + "\",\"" + AORole + "\")"));
414
    } else {
415
        labelTD.setAttribute("onClick","aoEditRow(event, 0, \"" + AOFN  + "\",\""
416
                         + AOLN  + "\",\"" + AORole + "\")");
417
    }
465
function createPartyRow(partyCount, partyLastName, partyFirstName, partyRole, 
466
	partyOrgName, partyPositionName, partyEmail, partyURL, partyPhone, partyFAX, 
467
	partyDelivery, partyCity, partyState, partyStateOther, partyZip, partyCountry) {    
468
    var partyRow = document.createElement("tr");
469
		var idStr = Math.round(Math.random() * 10000000000000000).toString();
470
		partyRow.setAttribute("id", idStr);
471
		
472
		var upCol = document.createElement("td");
473
		upCol.setAttribute("style", "text-align: center");
474
		upCol.appendChild(createIconLink("icon-arrow-up", "Move Up","moveUpRow(event)","pointer"));
418 475

  
419
    var text   = AOFN + " " + AOLN + " (Role: " + AORole + ")";
420
    var label = document.createTextNode(text);
476
		var downCol = document.createElement("td");
477
		downCol.setAttribute("style", "text-align: center");
478
		downCol.appendChild(createIconLink("icon-arrow-down", "Move Down", "moveDownRow(event, \"partyRowMarker\")", "pointer"));
421 479

  
422
    labelTD.appendChild(label);
423
    labelTD.appendChild(createHiddenInput("aoFirstName", AOFN));
424
    labelTD.appendChild(createHiddenInput("aoLastName", AOLN));
425
    labelTD.appendChild(createHiddenInput("aoRole", AORole));
426
    
427
    var imgTD = createTD("","right");
428
    imgTD.className = 'rightCol';
429
        
430
    imgTD.appendChild(createIconLink("icon-arrow-up",
431
                                      "Move Up","moveUpRow(event)","pointer"));
432
    imgTD.appendChild(document.createTextNode(" "));
433
    imgTD.appendChild(createIconLink("icon-arrow-down",
434
                                      "Move Down", "moveDownRow(event, \"addaorow\")",
435
                                      "pointer"));
436
    imgTD.appendChild(document.createTextNode(" "));
437
    imgTD.appendChild(createIconLink("icon-remove-sign",
438
                                      "Delete", "delRow(event)",
439
                                      "pointer"));
480
		var editCol = document.createElement("td");
481
		editCol.setAttribute("style", "text-align: center");
482
    editCol.appendChild(createIconLink("icon-pencil", "Edit", "editParty(event)", "pointer"));
440 483

  
441
    TR.appendChild(imgTD);
442
    TR.appendChild(labelTD);
443
    
444
    return TR;
484
		var delCol = document.createElement("td");
485
		delCol.setAttribute("style", "text-align: center");
486
    delCol.appendChild(createIconLink("icon-remove-sign", "Delete", "delRow(event)", "pointer"));
487

  
488
		var partyFirstNameCol = document.createElement("td");
489
		var partyFirstNameText = document.createTextNode(partyFirstName);
490
		partyFirstNameCol.appendChild(partyFirstNameText);
491
		
492
		var partyLastNameCol = document.createElement("td");
493
		var partyLastNameText = document.createTextNode(partyLastName);
494
		partyLastNameCol.appendChild(partyLastNameText);
495

  
496
		var partyOrgNameCol = document.createElement("td");
497
		partyOrgNameCol.setAttribute("colspan", "2");
498
		var partyOrgNameText = document.createTextNode(partyOrgName);
499
		partyOrgNameCol.appendChild(partyOrgNameText);
500

  
501
		var partyPositionNameCol = document.createElement("td");
502
		partyPositionNameCol.setAttribute("colspan", "2");
503
		var partyPositionNameText = document.createTextNode(partyPositionName);
504
		partyPositionNameCol.appendChild(partyPositionNameText);
505

  
506
		var partyRoleCol = document.createElement("td");
507
		var partyRoleText = document.createTextNode(partyRole.text);
508
		partyRoleCol.appendChild(partyRoleText);
509

  
510
    partyRow.appendChild(createHiddenInput("partyId", idStr));
511
    partyRow.appendChild(createHiddenInput("partyFirstName", partyFirstName));
512
    partyRow.appendChild(createHiddenInput("partyLastName", partyLastName));
513
    partyRow.appendChild(createHiddenInput("partyRole", partyRole.value));
514
    partyRow.appendChild(createHiddenInput("partyOrgName", partyOrgName));
515
    partyRow.appendChild(createHiddenInput("partyPositionName", partyPositionName));
516
    partyRow.appendChild(createHiddenInput("partyEmail", partyEmail));
517
    partyRow.appendChild(createHiddenInput("partyURL", partyURL));
518
    partyRow.appendChild(createHiddenInput("partyPhone", partyPhone));
519
    partyRow.appendChild(createHiddenInput("partyFAX", partyFAX));
520
    partyRow.appendChild(createHiddenInput("partyDelivery", partyDelivery));
521
    partyRow.appendChild(createHiddenInput("partyCity", partyCity));
522
    partyRow.appendChild(createHiddenInput("partyState", partyState.value));
523
    partyRow.appendChild(createHiddenInput("partyStateOther", partyStateOther));
524
    partyRow.appendChild(createHiddenInput("partyZIP", partyZip));
525
    partyRow.appendChild(createHiddenInput("partyCountry", partyCountry));
526

  
527
		// Preferentially show the person, but default to the organization
528
		if ( partyLastName != "" ) {
529
	    partyRow.appendChild(partyFirstNameCol);
530
	    partyRow.appendChild(partyLastNameCol);
531
			
532
		} else if ( partyOrgName != ""){
533
	    partyRow.appendChild(partyOrgNameCol);
534
			
535
		} else {
536
	    partyRow.appendChild(partyPositionNameCol);
537
			
538
		}
539
    partyRow.appendChild(partyRoleCol);
540

  
541
    partyRow.appendChild(upCol);
542
    partyRow.appendChild(downCol);
543
    partyRow.appendChild(editCol);
544
    partyRow.appendChild(delCol);
545
		    
546
    return partyRow;
547

  
445 548
}
446 549

  
447
function aoEditRow(evt, num,  AOFN ,  AOLN ,  AORole) {
448
    evt = (evt) ? evt : ((window.event) ? window.event : null);
449
    if (evt) {
450
        // equalize W3C/IE models to get event target reference
451
        var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
452
        if (elem && elem.nodeName == "TD") {
453
            try {
454
                var table = elem.parentNode;
455
                if (num == 0) {
456
                    table.removeChild(elem);
457
                    var TD = createTD("5","left", "pointer");
458
                    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
459
                        TD.attachEvent("onclick", new Function("aoEditRow(event, 1, \"" + AOFN  + "\",\""
460
                                                    + AOLN  + "\",\"" + AORole + "\")"));
461
                    } else {
462
                        TD.setAttribute("onClick","aoEditRow(event, 1, \"" + AOFN  + "\",\""
463
                                             + AOLN  + "\",\"" + AORole + "\")");
464
                    }                   
465
                    TD.appendChild(createTextField("aoFirstName", 15, AOFN));
466
                    TD.appendChild(document.createTextNode(" "));
467
                    TD.appendChild(createTextField("aoLastName", 15, AOLN));
468
                    TD.appendChild(document.createTextNode(" Role: "));
469
                    TD.appendChild(createAORoleTypeSelect("aoRole", AORole));
470
                    table.appendChild(TD);
471
                } else {
472
                    var child = elem.childNodes;
473
                    AOFN = child.item(0).value;
474
                    AOLN = child.item(2).value;
475
                    var _AORole = child.item(4);
476
                    AORole = _AORole.options[_AORole.selectedIndex].text;
477
                    table.removeChild(elem);
550
function editParty(evt) {
551
	var targetRow = evt.target.parentElement.parentElement.parentElement;
552
	var partyTable = targetRow.parentNode.parentNode;
553
	// Maintain a single selected row when editing
554
	var previousSelectedRow = document.getElementById("selectedRow");
555
	if ( previousSelectedRow != null ) {
556
		previousSelectedRow.parentNode.removeChild(previousSelectedRow);
557
		
558
	}
559
	
560
	var selectedRow = document.createElement("input");
561
	selectedRow.setAttribute("type", "hidden");
562
	selectedRow.setAttribute("id", "selectedRow");
563
	selectedRow.setAttribute("value", targetRow.getAttribute("id"));
564
	partyTable.appendChild(selectedRow);
565
	
566
  var pFirstName = targetRow.firstElementChild.nextElementSibling;    
567
	document.getElementById("assocPartyFirstName").value = pFirstName.value;
568
	
569
  var pLastName = pFirstName.nextElementSibling;  
570
	document.getElementById("assocPartyLastName").value = pLastName.value;
571
	
572
  var pRole = pLastName.nextElementSibling;
573
	var partyRole = document.getElementById("assocPartyRole");
574
	partyRole.options.value = pRole.value;
575
	partyRole.value = pRole.value;
576
	for (var i = 0; i < partyRole.options.length; i++) {
577
		if ( partyRole.options[i].value == pRole.value ) {
578
			partyRole.selectedIndex = i;
579
			partyRole.options[i].selected = true;
580
			break;
581
		}
582
	}
583
  
584
	var pOrgName = pRole.nextElementSibling;       
585
	document.getElementById("assocPartyOrgName").value = pOrgName.value;
586
	
587
  var pPositionName = pOrgName.nextElementSibling;    
588
	document.getElementById("assocPartyPositionName").value = pPositionName.value;
589
	
590
  var pEmail = pPositionName.nextElementSibling;    
591
	document.getElementById("assocPartyEmail").value = pEmail.value;
592
	
593
  var pURL = pEmail.nextElementSibling;    
594
	document.getElementById("assocPartyURL").value = pURL.value;
595
	
596
  var pPhone = pURL.nextElementSibling;      
597
	document.getElementById("assocPartyPhone").value = pPhone.value;
598
	
599
  var pFAX = pPhone.nextElementSibling;      
600
	document.getElementById("assocPartyFAX").value = pFAX.value;
601
	
602
  var pDelivery = pFAX.nextElementSibling;        
603
	document.getElementById("assocPartyDelivery").value = pDelivery.value;
604
	
605
  var pCity = pDelivery.nextElementSibling;   
606
	document.getElementById("assocPartyCity").value = pCity.value;
607
	
608
  var pState = pCity.nextElementSibling;       
609
	var partyState = document.getElementById("assocPartyState");
610
	partyState.value = pState.value;
611
	for (var i = 0; i < partyState.options.length; i++) {
612
		if ( partyState.options[i].value == pState.value ) {
613
			partyState.selectedIndex = i;
614
			partyState.options[i].selected = true;
615
			break;
616
		}
617
	}
618
	
619
  var pStateOther = pState.nextElementSibling;      
620
	document.getElementById("assocPartyStateOther").value = pStateOther.value;
621
	
622
  var pZip = pStateOther.nextElementSibling; 
623
	document.getElementById("assocPartyZip").value = pZip.value;
624
	
625
  var pCountry = pZip.nextElementSibling;        
626
	document.getElementById("assocPartyCountry").value = pCountry.value;
478 627

  
479
                    var TD = createTD("5","left", "pointer");
480
                    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
481
                        TD.attachEvent("onclick", new Function("aoEditRow(event, 0, \"" + AOFN  + "\",\""
482
                                                    + AOLN  + "\",\"" + AORole + "\")"));
483
                    } else {
484
                        TD.setAttribute("onClick","aoEditRow(event, 0, \"" + AOFN  + "\",\""
485
                                             + AOLN  + "\",\"" + AORole + "\")");
486
                    }
487
                    var text   = AOFN + " " + AOLN + " (Role: " + AORole + ")";
488
                    var label = document.createTextNode(text);
489
                    TD.appendChild(label);
490
                    TD.appendChild(createHiddenInput("aoFirstName", AOFN));
491
                    TD.appendChild(createHiddenInput("aoLastName", AOLN));
492
                    TD.appendChild(createHiddenInput("aoRole", AORole));
493
                    table.appendChild(TD);
494
                }
495
            } catch(e) {
496
                var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
497
                alert("Error:\n" + msg);
498
                return;
499
            }
500
        }
501
    }
628
  var updateButton = document.getElementById("updatePartyButton");
629
	updateButton.innerHTML = "";
630
	var text = document.createElement("span");
631
	var updatedText = document.createTextNode("Update Person or Organization");
632
	text.appendChild(updatedText);
633
	updateButton.appendChild(text);
634
	updateButton.setAttribute("style", "visibility: visible");
635
				
502 636
}
503 637

  
504
function createAORoleTypeSelect(name, value) {
638
var timer;
639
function updateAssociatedParty() {
640
	var selectedRowId = document.getElementById("selectedRow").value;
641
	var selectedRow = document.getElementById(selectedRowId);
642
	
643
  var pFirstName = selectedRow.firstElementChild.nextElementSibling;    
644
	pFirstName.value = document.getElementById("assocPartyFirstName").value;
645
	
646
  var pLastName = pFirstName.nextElementSibling;  
647
	pLastName.value = document.getElementById("assocPartyLastName").value;
648
	
649
  var pRole = pLastName.nextElementSibling;   
650
	pRole.value = document.getElementById("assocPartyRole").value;
651
	
652
  var pOrgName = pRole.nextElementSibling;       
653
	pOrgName.value = document.getElementById("assocPartyOrgName").value;
654
	
655
  var pPositionName = pOrgName.nextElementSibling;       
656
	pPositionName.value = document.getElementById("assocPartyPositionName").value;
657
	
658
  var pEmail = pPositionName.nextElementSibling;    
659
	pEmail.value = document.getElementById("assocPartyEmail").value;
660
	
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff