=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java 2011-10-12 21:08:12 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java 2011-11-01 15:01:22 +0000 @@ -105,6 +105,11 @@ private Integer dataSetId; + public void setDataSetId( String dataSetId ) + { + this.dataSetId = Integer.parseInt( dataSetId ); + } + public void setDataSetId( Integer dataSetId ) { this.dataSetId = dataSetId; @@ -115,6 +120,13 @@ return dataSetId; } + private DataSet dataSet; + + public DataSet getDataSet() + { + return dataSet; + } + private Map periodCompletedMap = new HashMap(); public Map getPeriodCompletedMap() @@ -129,6 +141,30 @@ return periods; } + private Boolean complete = false; + + public void setComplete( Boolean complete ) + { + this.complete = complete; + } + + public Boolean getComplete() + { + return complete; + } + + private Boolean validated; + + public void setValidated( Boolean validated ) + { + this.validated = validated; + } + + public Boolean getValidated() + { + return validated; + } + // ------------------------------------------------------------------------- // Action Implementation // ------------------------------------------------------------------------- @@ -140,7 +176,7 @@ { OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId ); - DataSet dataSet = dataSetService.getDataSet( dataSetId ); + dataSet = dataSetService.getDataSet( dataSetId ); CalendarPeriodType periodType = (CalendarPeriodType) dataSet.getPeriodType(); periods = periodType.generateLast5Years( new Date() ); FilterUtils.filter( periods, new PastAndCurrentPeriodFilter() ); === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2011-10-27 17:40:17 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2011-11-01 15:01:22 +0000 @@ -423,6 +423,8 @@ return ERROR; } + validated = true; + return SUCCESS; } } === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2011-10-24 11:36:21 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2011-11-01 15:01:22 +0000 @@ -18,16 +18,19 @@ - + - + - + @@ -81,13 +84,15 @@ - + - + === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2011-10-14 10:44:57 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2011-11-01 15:01:22 +0000 @@ -35,7 +35,7 @@ - /mobile/selectPeriod.action + /mobile/selectPeriod.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId}&validated=${validated}&complete=${complete} /dhis-web-light/main.vm /dhis-web-light/dataEntry.vm F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm 2011-10-14 13:06:43 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm 2011-11-01 15:01:22 +0000 @@ -1,6 +1,19 @@

$i18n.getString( "available_periods" )

+#if( $validated ) +
+

Successfully Saved

+

+ #if( $complete ) + Marked DataSet $dataSet.name as complete
+ #else + Saved data set $dataSet.name
+ #end +

+
+#end +

    #foreach( $period in $periods )