Project

General

Profile

« Previous | Next » 

Revision 1983

Added by Matt Jones about 21 years ago

Added geographic description to the fields of data collected, as it is
a required field and was being improperly defaulted to an empty string in the
XML document. This is a new field for all registries.

View differences:

lib/style/common/templates/entryForm.tmpl
1029 1029
	</font></b></font> 
1030 1030
  <table cellspacing="0" border="0" cellpadding="9" width="760"
1031 1031
bgcolor="#c6d6e7">
1032
    <tr>
1033
    <td valign="top" colspan="4">
1034
    <span class="required">*</span><span class="label">Geographic Description</span><br>
1035
    <textarea rows="3" columns="80" name="geogdesc">[% geogdesc %]</textarea>
1036
    </td>
1037
    </tr>
1032 1038
    <tr> 
1033 1039
      <td valign="TOP" colspan="4"> 
1034 1040
        <p><font size="-1"><b>Coordinates (in Degrees, Minutes and Seconds; at 
lib/style/common/templates/confirmData.tmpl
385 385

  
386 386

  
387 387
<table cellspacing="0" border="0" cellpadding="9" width="760">
388
    <tr>
389
      <td valign="TOP" colspan="4"> 
390
        <p><span class="label">Geographic Description:</span> [%geogdesc%]</p>
391
      </td>
392
    </tr>
388 393
    <tr> 
389 394
      <td valign="TOP" colspan="4"> 
390 395
        <p><font size="-1"><b>Coordinates (in Degrees, Minutes and Seconds):</b></font></p>
......
673 678
  <input type="hidden" name="endingYear" value="[%endingYear%]">
674 679
  <input type="hidden" name="endingMonth" value="[%endingMonth%]">
675 680
  <input type="hidden" name="endingDay" value="[%endingDay%]">
681
  <input type="hidden" name="geogdesc" value="[%geogdesc%]">
676 682
  <input type="hidden" name="useSiteCoord" value="[%useSiteCoord%]">
677 683
  <input type="hidden" name="latDeg1" value="[% latDeg1 %]">
678 684
  <input type="hidden" name="latMin1" value="[%latMin1%]">
src/perl/register-dataset.cgi
167 167
$$templateVars{'orgurl'} = $orgurl;
168 168
$$templateVars{'orgfilter'} = $orgfilter;
169 169

  
170

  
170
debug("Registry: Initialized");
171 171
# Process the form based on stage parameter. 
172 172
if ($FORM::stage =~ "guide") {
173 173
    # Send back the information on how to fill the form
......
222 222
}elsif ($FORM::stage !~ "confirmed") {
223 223
    # None of the stages have been reached and data is not being confirmed. 
224 224
    # Hence, send back entry form for entry of data.  
225
    debug("Registry: Sending form");
225 226
    my @sortedSites;
226 227
    foreach my $site (sort @sitelist) {
227 228
        push(@sortedSites, $site);
......
236 237
    $$templateVars{'siteList'} = \@sortedSites;
237 238
    $$templateVars{'section'} = "Entry Form";
238 239
    $$templateVars{'docid'} = "";
240
    debug("Registry: Sending form: ready to process template");
239 241
    $template->process( $entryFormTemplate, $templateVars);
242
    debug("Registry: Sending form: template processed");
240 243
    exit(0);
241 244
}
242 245

  
......
598 601
        unless hasContent($FORM::abstract);
599 602
    push(@invalidParams, "Beginning year of data set is missing.")
600 603
        unless hasContent($FORM::beginningYear);
604
    push(@invalidParams, "Geographic description is missing.")
605
        unless (hasContent($FORM::geogdesc));
601 606

  
602 607
    # If the "use site" coord. box is checked and if the site is in 
603 608
    # the longitude hash ...  && ($siteLatDMS{$FORM::site})
......
1069 1074
    $doc .= "</temporalCoverage>\n";
1070 1075
    
1071 1076
    $doc .= "<geographicCoverage>\n";
1072
    $doc .= "<geographicDescription></geographicDescription>\n";
1077
    $doc .= "<geographicDescription>$FORM::geogdesc</geographicDescription>\n";
1073 1078
    $doc .= "<boundingCoordinates>\n";
1074 1079

  
1075 1080
    # if the second latitude is missing, then set the second lat/long pair 
......
1747 1752
                errMoreThanOne("geographicCoverage");
1748 1753
            } else {
1749 1754
                foreach $tempNode ($tempResult->get_nodelist) {
1750
                    my $coord;
1751
                    $coord = findValue($tempNode, "boundingCoordinates/westBoundingCoordinate");
1755
                    my $geogdesc = findValue($tempNode, "geographicDescription");
1756
                    debug("Registry: geogdesc from xml is: $geogdesc");
1757
                    $$templateVars{'geogdesc'} = $geogdesc;
1758
                    my $coord = findValue($tempNode, "boundingCoordinates/westBoundingCoordinate");
1752 1759
                    if ($coord > 0) {
1753 1760
                        #print "+";
1754 1761
                        $$templateVars{'hemisphLong1'} = "E";
......
2249 2256
    $$templateVars{'endingYear'} = $FORM::endingYear;
2250 2257
    $$templateVars{'endingMonth'} = $FORM::endingMonth;
2251 2258
    $$templateVars{'endingDay'} = $FORM::endingDay;
2259
    $$templateVars{'geogdesc'} = $FORM::geogdesc;
2252 2260
    $$templateVars{'useSiteCoord'} = $FORM::useSiteCoord;
2253 2261
    $$templateVars{'latDeg1'} = $FORM::latDeg1;
2254 2262
    $$templateVars{'latMin1'} = $FORM::latMin1;
......
2415 2423
    $$templateVars{'endingYear'} = $FORM::endingYear;
2416 2424
    $$templateVars{'endingMonth'} = $FORM::endingMonth;
2417 2425
    $$templateVars{'endingDay'} = $FORM::endingDay;
2426
    $$templateVars{'geogdesc'} = $FORM::geogdesc;
2418 2427
    if($FORM::useSiteCoord ne ""){
2419 2428
    $$templateVars{'useSiteCoord'} = "CHECKED";
2420 2429
    }else{

Also available in: Unified diff