← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4484: Data entry, saving complete registration even if validation fails, this makes more sense since va...

 

------------------------------------------------------------
revno: 4484
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-08-30 23:19:19 +0200
message:
  Data entry, saving complete registration even if validation fails, this makes more sense since validation are not hard rules
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.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-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm	2011-08-28 17:53:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm	2011-08-30 21:19:19 +0000
@@ -1,5 +1,5 @@
 CACHE MANIFEST
-# 2.4-SNAPSHOT Version 16
+# 2.4-SNAPSHOT Version 19
 NETWORK:
 *
 CACHE:

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-29 19:29:19 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-30 21:19:19 +0000
@@ -825,26 +825,22 @@
 {
     var params = storageManager.getCurrentCompleteDataSetParams();
 
-    if ( json.response == 'success' )
-    {
-        storageManager.saveCompleteDataSet( params );
-
-        $.ajax( {
-        	url: 'registerCompleteDataSet.action', 
-        	data: params, 
-        	cache: false,
-        	success: function()
-	        {
-	            storageManager.clearCompleteDataSet( params );
-	        }
-        } );
-    }
-    else
-    {
-        disableUndoButton();
-
-        validate();
-    }
+	storageManager.saveCompleteDataSet( params );
+
+    $.ajax( {
+    	url: 'registerCompleteDataSet.action', 
+    	data: params, 
+    	cache: false,
+    	success: function()
+        {
+            storageManager.clearCompleteDataSet( params );
+            
+            if ( json.response == 'input' )
+            {
+                validate();
+            }
+        }
+    } );
 }
 
 function undoCompleteDataSet()

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2011-08-23 13:51:02 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2011-08-30 21:19:19 +0000
@@ -80,6 +80,6 @@
 <hr style="clear:both">
 <input type="button" id="completeButton" name="completeButton" value="$i18n.getString( 'complete' )" onclick="validateCompleteDataSet()" style="width:120px">
 <input type="button" id="undoButton" name="undoButton" value="$i18n.getString( 'incomplete' )" onclick="undoCompleteDataSet()" style="width:120px">
-<input type="button" value="$i18n.getString( 'run_validation' )" onclick="javascript:validate()" style="width:120px">
+<input type="button" value="$i18n.getString( 'run_validation' )" onclick="validate()" style="width:120px">
 
 </div>