← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1713: Validate duplication of indicator name when added.

 

------------------------------------------------------------
revno: 1713
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-03-30 18:00:42 +0700
message:
  Validate duplication of indicator name when added.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js	2010-02-15 12:29:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js	2010-03-30 11:00:42 +0000
@@ -74,16 +74,18 @@
     var request = new Request();
     request.setResponseTypeXML( 'message' );
     request.setCallbackSuccess( addValidationCompleted );
-    request.send( 'validateIndicator.action?name=' + getFieldValue( 'name' ) +
-    	'&shortName=' + getFieldValue( 'shortName' ) +
-    	'&alternativeName=' + getFieldValue( 'alternativeName' ) +
-        '&indicatorTypeId=' + getListValue( 'indicatorTypeId' ) +
-        '&numerator=' + getFieldValue( 'numerator' ) +
-        '&numeratorDescription=' + getFieldValue( 'numeratorDescription' ) +
-        '&numeratorAggregationOperator=' + getFieldValue( 'numeratorAggregationOperator' ) +
-        '&denominator=' + getFieldValue( 'denominator' ) +
-        '&denominatorDescription=' + getFieldValue( 'denominatorDescription' ) +
-        '&denominatorAggregationOperator=' + getFieldValue( 'denominatorAggregationOperator' ) );
+	var params = 'name=' + getFieldValue( 'name' );
+		params += '&shortName=' + getFieldValue( 'shortName' );
+		params += '&alternativeName=' + getFieldValue( 'alternativeName' );
+		params += '&indicatorTypeId=' + getListValue( 'indicatorTypeId' );
+		params += '&numerator=' + getFieldValue( 'numerator' );
+		params += '&numeratorDescription=' + getFieldValue( 'numeratorDescription' );
+		params += '&numeratorAggregationOperator=' + getFieldValue( 'numeratorAggregationOperator' );
+		params += '&denominator=' + getFieldValue( 'denominator' );
+		params += '&denominatorDescription=' + getFieldValue( 'denominatorDescription' );
+		params += '&denominatorAggregationOperator=' + getFieldValue( 'denominatorAggregationOperator' ) ;
+	request.sendAsPost(params);
+    request.send( 'validateIndicator.action');
 
     return false;
 }