← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13992: Fixed bug - Don't save data attribute values in Enroll form ( Dashboard )

 

------------------------------------------------------------
revno: 13992
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-02-12 12:10:39 +0700
message:
  Fixed bug - Don't save data attribute values in Enroll form ( Dashboard )
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.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/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2014-02-12 05:10:39 +0000
@@ -1328,7 +1328,7 @@
 // Identifiers && Attributes for selected program
 // ----------------------------------------------------------------
 
-function validateIdentifier(  entityInstanceId, programId, paramsDiv)
+function validateIdentifier( entityInstanceId, programId, paramsDiv )
 {
 	var params  = getParamsForDiv(paramsDiv);
     params += "&entityInstanceId=" + entityInstanceId;
@@ -1340,7 +1340,7 @@
 		data: params,
 		success: function(json) {
             if( json.response == 'success' ) {
-                saveIdentifierAndAttribute(params);
+                saveIdentifierAndAttribute( entityInstanceId, programId, paramsDiv );
             }
             else {
                 showErrorMessage(json.message);
@@ -1349,8 +1349,12 @@
     });
 }
 
-function saveIdentifierAndAttribute(params)
+function saveIdentifierAndAttribute( entityInstanceId, programId, paramsDiv )
 {
+	var params  = getParamsForDiv(paramsDiv);
+    params += "&entityInstanceId=" + entityInstanceId;
+    params +="&programId=" + programId;
+
 	$.ajax({
 			type: "POST",
 			url: 'saveAttribute.action',