=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2012-02-06 03:59:06 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2012-02-08 12:47:59 +0000 @@ -100,7 +100,7 @@ - @@ -167,9 +167,39 @@ + + +
+ $i18n.getString( "program_stage" ) + + + + + + + + + + + +
+ +
+ +
+ +
+ + - + $i18n.getString( 'less' ) $i18n.getString( 'less_or_equal' ) $i18n.getString( 'greater' ) @@ -196,7 +226,7 @@ - +
$i18n.getString( "condition" ) @@ -204,7 +234,7 @@ - +
$i18n.getString( "description" )
@@ -213,7 +243,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2012-01-11 07:42:49 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2012-02-08 12:47:59 +0000 @@ -80,6 +80,44 @@ } } + +function getProgramStagesForFormula() +{ + clearListById( 'programStageFormula' ); + + var program = document.getElementById( 'programFormula' ); + var programId = program.options[ program.selectedIndex ].value; + if( programId == '0' ){ + return; + } + + $.post( 'getProgramStages.action', { programId:programId }, getProgramStagesFomulaCompleted ); +} + +function getProgramStagesFomulaCompleted( programstageElement ) +{ + var programstage = document.getElementById( 'programStageFormula' ); + var programstageList = $(programstageElement).find( 'programstage' ); + + $( programstageList ).each( function( i, item ) + { + var id = $( item ).find("id").text(); + var name = $( item ).find("name").text(); + + var option = document.createElement("option"); + option.value = "[PS:" + id + "]"; + option.text = name; + option.title = name; + + programstage.add(option, null); + }); + + if( programstage.options.length > 0 ) + { + programstage.options[0].selected = true; + } +} + //------------------------------------------------------------------------------ // Get DataElements of Program-Stage //------------------------------------------------------------------------------ @@ -124,7 +162,6 @@ getConditionDescription(); } - function insertOperator( value ) { insertTextCommon('aggregationCondition', ' ' + value + ' ' ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2012-02-06 03:59:06 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2012-02-08 12:47:59 +0000 @@ -68,7 +68,7 @@ - + @@ -102,7 +102,7 @@ @@ -129,7 +129,7 @@
$i18n.getString( "condition_detail" )$i18n.getString( "condition_detail" )
-
- @@ -162,9 +162,39 @@
+ + +
+ $i18n.getString( "program_stage" ) + + + + + + + + + + + +
+ +
+ +
+ +
+ + - + $i18n.getString( 'less' ) $i18n.getString( 'less_or_equal' ) $i18n.getString( 'greater' ) @@ -190,7 +220,7 @@ - +
$i18n.getString( "condition" ) @@ -199,7 +229,7 @@ - +
$i18n.getString( "description" )
$!description