Project

General

Profile

« Previous | Next » 

Revision 1983

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:

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