← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10123: Display warning messsage when to click Aggregate and Save button in Manual Person Aggregate

 

------------------------------------------------------------
revno: 10123
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-11 09:53:17 +0700
message:
  Display warning messsage when to click Aggregate and Save button in Manual Person Aggregate 
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-03-10 15:03:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-03-11 02:53:17 +0000
@@ -595,4 +595,5 @@
 visits_overdue_percent = Visits overdue (%)
 program_stages = Program stages
 aggregate_and_save = Aggregate and Save
-preview = Preview
\ No newline at end of file
+preview = Preview
+confirm_data_values_aggregated_saved_into_database_directly = Are you sure you want to save data values aggregated into database directly ?
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm	2013-03-10 15:03:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm	2013-03-11 02:53:17 +0000
@@ -1,6 +1,7 @@
 <script type="text/javascript">
 	var i18n_greater_then_from_date = '$encoder.jsEscape( $i18n.getString( "greater_then_from_date" ) , "'" )';
 	var i18n_please_select = '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )';
+	var i18n_confirm_data_values_aggregated_saved_into_database_directly = '$encoder.jsEscape( $i18n.getString( "confirm_data_values_aggregated_saved_into_database_directly" ) , "'" )';
 	var isSubmit = true;
 </script>
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js	2013-03-10 15:03:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js	2013-03-11 02:53:17 +0000
@@ -38,6 +38,22 @@
 
 function caseAggregationResult()
 {
+	var autoSave = getFieldValue('autoSave');
+	if(autoSave=='true')
+	{
+		if( confirm(i18n_confirm_data_values_aggregated_saved_into_database_directly) )
+		{
+			runAggregate(autoSave);
+		}
+	}
+	else
+	{
+		runAggregate(autoSave);
+	}
+}
+
+function runAggregate(autoSave)
+{
 	hideById('caseAggregationForm');
 	showLoader();