Project

General

Profile

« Previous | Next » 

Revision 7927

View differences:

lib/style/common/templates/metacatui/entryForm.tmpl
1292 1292
						</div>
1293 1293
						
1294 1294
						
1295
						<!-- TEMPLATE -->
1295
					[% IF modules.upload == 'true' %]	
1296
						
1297
						<!-- DATA UPLOAD -->
1296 1298
						<div class="accordion-heading">
1297
							<a class="accordion-toggle" data-toggle="collapse" data-target="#collapseTemplate" href="#none">
1298
								Template  
1299
							<a class="accordion-toggle" data-toggle="collapse" data-target="#collapseUploadData" href="#none">
1300
								Upload Data  
1299 1301
							</a>
1300
							<a href="[% cgiPrefix %]/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#BasicInformation"><i class="icon-question-sign"></i></a>
1302
							<a href="[% cgiPrefix %]/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#XXX"><i class="icon-question-sign"></i></a>
1301 1303
						</div>
1302
						<div id="collapseTemplate" class="accordion-body collapse in">
1304
						<div id="collapseUploadData" class="accordion-body collapse in">
1303 1305
							<div class="accordion-inner">
1304 1306
								<!--  the INPUT -->
1305 1307
								<div class="control-group">
1306
									<label class="control-label" for="template">*template</label>
1308
									<label class="control-label" for="fileUpload"></label>
1307 1309
									<div class="controls">
1308
										<input type="text" name="template" value="[%template%]">
1310
										<table class="tables" cellpadding="5" cellspacing="0" id="uploadTable">
1311
										  <tr class="sectbody">
1312
										    <td class="rightCol"><span class="label">Upload Data File:</span></td>
1313
										    <td colspan="5">
1314
										        <input type="file" id="file_element" name="file_1" class="longwidth">
1315
										
1316
										        [% IF form == 're_entry' && upCount %]
1317
										           [% cnt = 0 %]
1318
										           [% WHILE cnt < upCount %]
1319
										                [% SET fileSum = "upload_${cnt}" %]
1320
										                [% SET fileName = "uploadname_${cnt}" %]
1321
										                [% SET fileType = "uploadtype_${cnt}" %] 
1322
										                [% SET filePerm = "uploadperm_${cnt}" %]
1323
										                [% IF fileSum %]
1324
										                    <input type="hidden" name="[%fileSum%]" value="[% $fileSum %]"> 
1325
										                    <input type="hidden" name="[%fileName%]" value="[% $fileName %]"> 
1326
										                    <input type="hidden" name="[%fileType%]" value="[% $fileType %]"> 
1327
										                [% END %]
1328
										                [% cnt = cnt + 1 %]
1329
										            [% END %]
1330
										        <input type="hidden" id="upCount" name="upCount" value="[%upCount%]">
1331
										        [% END %]
1332
										
1333
										        <input type="hidden" id="fileCount" name="fileCount" value="[%fileCount%]"></td>
1334
										  </tr>
1335
										  <tr class="sectbody">
1336
										    <td class="rightCol" valign="top"><span class="label">Attached Files:</span></td>
1337
										    <td colspan="5" class="regtext">
1338
										    [% IF !upCount %]
1339
										        <div id="file_comment">
1340
										            (<i>None currently attached</i>)
1341
										        </div>
1342
										    [% END %]
1343
										    <div id="files_list">[% IF form == 're_entry' && upCount %]
1344
										    [% cnt = 0 %]
1345
										
1346
										    [% WHILE cnt < upCount %]
1347
										        [% SET fileName = "uploadname_${cnt}" %]
1348
										        [% SET filePerm = "uploadperm_${cnt}" %]
1349
										        [% IF $filePerm == 'public' %]
1350
										          [% SET perm_a = "checked" %]
1351
										          [% SET perm_b = "" %]
1352
										        [% ELSE %]
1353
										          [% SET perm_a = "" %]
1354
										          [% SET perm_b = "checked" %]
1355
										        [% END %]
1356
										        [% IF fileName %]<div>
1357
										          [% $fileName %]
1358
										          <input type="radio" name="[% filePerm %]" value="public" [% perm_a %]> Public
1359
										          <input type="radio" name="[% filePerm %]" value="private" [% perm_b %]> Private
1360
										
1361
										          <input type="button" value="Delete" onclick="deleteFile(event, [%fileName%]);"/></div>[% END %]
1362
										
1363
										        [% cnt = cnt + 1 %]
1364
										    [% END %]
1365
										    [% END %]</div></td>
1366
										  </tr>
1367
										  </table>
1368
										  
1369
										  <script language="JavaScript" type="text/JavaScript">
1370
										    var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 10);
1371
										    multi_selector.addElement( document.getElementById( 'file_element' ) );
1372
										  </script>
1373
										
1374
										
1309 1375
									</div>
1310 1376
								</div>
1311 1377
								
1312 1378
						    </div>
1313 1379
						</div>
1314
   
1315
  [% IF modules.upload == 'true' %]
1316

  
1317
  <!-- Associated Data -->
1318
  <table class="tables" cellpadding="5" cellspacing="0">
1319
  <tr class="sectheader">
1320
    <td colspan="5" align="left">
1321
      <span class="label">UPLOAD DATA</span>
1322
      <a href="[% cgiPrefix %]/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#XXX" target="guide" class="smalltext">(What's this?)</a>
1323
    </td>
1324
    <td class="rightCol"><span><a onClick="uploadBit=swap(event, 'uploadTable', uploadBit)" style="cursor:pointer">Hide</a></span></td>
1325
  </tr>
1326
   </table>
1327
  <table class="tables" cellpadding="5" cellspacing="0" id="uploadTable">
1328
  <tr class="sectbody">
1329
    <td class="rightCol"><span class="label">Upload Data File:</span></td>
1330
    <td colspan="5">
1331
        <input type="file" id="file_element" name="file_1" class="longwidth">
1332

  
1333
        [% IF form == 're_entry' && upCount %]
1334
           [% cnt = 0 %]
1335
           [% WHILE cnt < upCount %]
1336
                [% SET fileSum = "upload_${cnt}" %]
1337
                [% SET fileName = "uploadname_${cnt}" %]
1338
                [% SET fileType = "uploadtype_${cnt}" %] 
1339
                [% SET filePerm = "uploadperm_${cnt}" %]
1340
                [% IF fileSum %]
1341
                    <input type="hidden" name="[%fileSum%]" value="[% $fileSum %]"> 
1342
                    <input type="hidden" name="[%fileName%]" value="[% $fileName %]"> 
1343
                    <input type="hidden" name="[%fileType%]" value="[% $fileType %]"> 
1344
                [% END %]
1345
                [% cnt = cnt + 1 %]
1346
            [% END %]
1347
        <input type="hidden" id="upCount" name="upCount" value="[%upCount%]">
1348
        [% END %]
1349

  
1350
        <input type="hidden" id="fileCount" name="fileCount" value="[%fileCount%]"></td>
1351
  </tr>
1352
  <tr class="sectbody">
1353
    <td class="rightCol" valign="top"><span class="label">Attached Files:</span></td>
1354
    <td colspan="5" class="regtext">
1355
    [% IF !upCount %]
1356
        <div id="file_comment">
1357
            (<i>None currently attached</i>)
1358
        </div>
1359
    [% END %]
1360
    <div id="files_list">[% IF form == 're_entry' && upCount %]
1361
    [% cnt = 0 %]
1362

  
1363
    [% WHILE cnt < upCount %]
1364
        [% SET fileName = "uploadname_${cnt}" %]
1365
        [% SET filePerm = "uploadperm_${cnt}" %]
1366
        [% IF $filePerm == 'public' %]
1367
          [% SET perm_a = "checked" %]
1368
          [% SET perm_b = "" %]
1369
        [% ELSE %]
1370
          [% SET perm_a = "" %]
1371
          [% SET perm_b = "checked" %]
1372
        [% END %]
1373
        [% IF fileName %]<div>
1374
          [% $fileName %]
1375
          <input type="radio" name="[% filePerm %]" value="public" [% perm_a %]> Public
1376
          <input type="radio" name="[% filePerm %]" value="private" [% perm_b %]> Private
1377

  
1378
          <input type="button" value="Delete" onclick="deleteFile(event, [%fileName%]);"/></div>[% END %]
1379

  
1380
        [% cnt = cnt + 1 %]
1381
    [% END %]
1382
    [% END %]</div></td>
1383
  </tr>
1384
  </table>
1385
  
1386
  <script language="JavaScript" type="text/JavaScript">
1387
    var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 10);
1388
    multi_selector.addElement( document.getElementById( 'file_element' ) );
1389
  </script>
1390
  [% END %]
1391
   <table class="tables" cellpadding="5" cellspacing="0">    
1392
   <tr class="sectheader"><td colspan="6" align="left"></td></tr>
1393
   <tr class="sectheader"><td colspan="6" align="center" class="borderbottom"><input type="SUBMIT" onClick="sortInputTags()" value="Submit Data Set Description" name="SUBMIT">
1380
						
1381
					[% END %]
1382
						  
1394 1383
              
1395
    </table>
1396
    <p></p>
1397
    
1398 1384
    					</div>
1399 1385
					</div> <!-- end the accordinan -->
1386
					
1387
	<input type="SUBMIT" onClick="sortInputTags()" value="Submit Data Set Description" name="SUBMIT">
1388
						
1400 1389
   
1401 1390
</form>
1402 1391
			</div> <!-- end the row -->

Also available in: Unified diff