← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2652: fixed : An Indicator can be created without selecting Denominator

 

------------------------------------------------------------
revno: 2652
committer: Tri <Tri@Tri-Laptop>
branch nick: dhis2
timestamp: Thu 2011-01-20 10:49:10 +0700
message:
  fixed : An Indicator can be created without selecting Denominator
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm


--
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/addIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm	2010-12-16 04:38:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm	2011-01-20 03:49:10 +0000
@@ -4,10 +4,6 @@
 			function( form )
 			{ 
 				form.submit()
-			}, function(){
-				setFieldValue( 'denominator', "1" );
-				setFieldValue( 'denominatorDescription', "" );
-				setRadioValue( 'denominatorAggregationOperator', "sum" );
 			}
 		);	
 		checkValueIsExist( "name", "validateIndicator.action" );
@@ -27,8 +23,8 @@
 	<input type="hidden" id="numeratorDescription" name="numeratorDescription"/>
 	<input type="hidden" id="numeratorAggregationOperator" name="numeratorAggregationOperator"/>
 	
-	<input type="hidden" id="denominatorDescription" name="denominatorDescription"/>
-	<input type="hidden" id="denominatorAggregationOperator" name="denominatorAggregationOperator"/>
+	<input type="hidden" id="denominatorDescription" name="denominatorDescription" value=""/>
+	<input type="hidden" id="denominatorAggregationOperator" name="denominatorAggregationOperator" value="sum"/>
 </div>
 
 <table>
@@ -90,7 +86,7 @@
 		<td></td>
 		<td>
 			<input type="button" id="denominatorButton" name="denominatorButton" value="$i18n.getString( 'edit_denominator' )" onclick="indicatorDenominatorForm()" style="width:20em"/>
-			<input type="hidden" id="denominator" name="denominator" class="{validate:{required:true}}"/>
+			<input type="hidden" id="denominator" name="denominator" class="{validate:{required:true}}" value="1"/>
 		</td>
 	</tr>
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm	2010-12-17 02:19:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm	2011-01-20 03:49:10 +0000
@@ -1,13 +1,8 @@
 <script>
 	jQuery(document).ready(	function(){
 		validation( 'updateIndicatorForm', 
-			function( form ){ form.submit()} , 
-			function()
-			{
-				setFieldValue( 'denominator', "1" );
-				setFieldValue( 'denominatorDescription', "" );
-				setRadioValue( 'denominatorAggregationOperator', "sum" );
-			});	
+			function( form ){ form.submit()}
+		);	
 		checkValueIsExist( "name", "validateIndicator.action", {id:getFieldValue('id')});
 		checkValueIsExist( "shortName", "validateIndicator.action" , {id:getFieldValue('id')});
 		checkValueIsExist( "alternativeName", "validateIndicator.action" , {id:getFieldValue('id')});