Project

General

Profile

« Previous | Next » 

Revision 2858

Added by sgarg about 19 years ago

Added functionality for storing comments and displaying them. Also added functionality for reading the eml document.

View differences:

register-dataset.cgi
1616 1616
    if ($xmldoc eq "") {
1617 1617
        $error ="Error in parsing the eml document";
1618 1618
        push(@errorMessages, $error);
1619
    } elsif ($doc=~ /<error/) {
1620
	if ( $doc=~ /public/){
1621
        	$error ="Error in reading the eml document. Please check if you are logged in.";
1622
        	push(@errorMessages, $error);	
1623
	} else {
1624
        	$error ="Error in reading the eml document. Please check if you have access to read the document";
1625
        	push(@errorMessages, $error);	
1626
	}
1619 1627
    } else {
1620 1628
        $findType = $xmldoc->findnodes('//dataset/identifier');
1621 1629
        if ($findType->size() > 0) {
......
1710 1718
sub modifyData {
1711 1719

  
1712 1720
    my $xmldoc = readDocumentFromMetacat();    	
1713
    getFormValuesFromEml2($xmldoc);
1721
    if (!scalar(@errorMessages)) {
1722
    	getFormValuesFromEml2($xmldoc);
1723
    }
1714 1724

  
1715 1725
    if (scalar(@errorMessages)) {
1716 1726
        # if any errors, print them in the response template 
......
3318 3328
	my $templateVars = { 'stage' => $FORM::stage };
3319 3329
	$$templateVars{'recipient'} = $recipient;
3320 3330
	$$templateVars{'sender'} = $sender;
3321
	$$templateVars{'docid'} = $FORM::docid;
3331
	my ($x, $y, $z) = split(/\./, $FORM::docid);
3332
        my $docidWithoutRev = $x.$y;
3333
	$$templateVars{'docid'} = $docidWithoutRev;
3322 3334
	$$templateVars{'comment'} = $FORM::review;
3323 3335
	$$templateVars{'contactName'} = $contactName;
3324 3336
	$$templateVars{'dpTitle'} = $title;

Also available in: Unified diff