← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21350: registration validation warnings shown next to tracked entity attribute field

 

------------------------------------------------------------
revno: 21350
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-12-06 23:59:21 +0200
message:
  registration validation warnings shown next to tracked entity attribute field
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.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-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2015-12-03 22:41:49 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2015-12-06 21:59:21 +0000
@@ -299,7 +299,9 @@
                 } else if (effect.action === "SHOWWARNING") {
                     if (effect.trackedEntityAttribute) {
                         if(effect.ineffect) {
-                            $scope.warningMessages.push(effect.content + (effect.data ? effect.data : ""));
+                            var message = effect.content + (angular.isDefined(effect.data) ? effect.data : "");
+                            $scope.warningMessages.push(message);
+                            $scope.warningMessages[effect.trackedEntityAttribute.id] = message;
                         }
                     }
                     else {