=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js 2014-06-30 05:56:38 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js 2014-07-04 10:10:13 +0000 @@ -35,24 +35,26 @@ //if no program, display attributesInNoProgram $scope.processTeiAttributes = function(){ - if($scope.selectedProgram && $scope.selectedEnrollment){ - //show attribute for selected program and enrollment - AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){ - $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, true); - }); - } - if($scope.selectedProgram && !$scope.selectedEnrollment){ - //show attributes for selected program - AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){ - $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, false); - }); - } - if(!$scope.selectedProgram && !$scope.selectedEnrollment){ - //show attributes in no program - AttributesFactory.getWithoutProgram().then(function(atts){ - $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, false); - }); - } + if($scope.selectedTei.attributes){ + if($scope.selectedProgram && $scope.selectedEnrollment){ + //show attribute for selected program and enrollment + AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){ + $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, true); + }); + } + if($scope.selectedProgram && !$scope.selectedEnrollment){ + //show attributes for selected program + AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){ + $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, false); + }); + } + if(!$scope.selectedProgram && !$scope.selectedEnrollment){ + //show attributes in no program + AttributesFactory.getWithoutProgram().then(function(atts){ + $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, false); + }); + } + } }; $scope.showRequiredAttributes = function(requiredAttributes, teiAttributes, fromEnrollment){ === removed file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-and-enrollment.html' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-and-enrollment.html 2014-07-03 11:30:22 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-and-enrollment.html 1970-01-01 00:00:00 +0000 @@ -1,102 +0,0 @@ -
+ {{gridColumn.name}} + | ++ {{teiForRelationship[gridColumn.id]}} + | +
{{'org_unit'| translate}} | +
+ + + + + |
+
{{'enrollment_date'| translate}} | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ {{attribute.name}} + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ {{gridColumn.name}} + | +
---|
+ {{trackedEntity[gridColumn.id]}} + | +
{{'org_unit'| translate}} | -
- - - - + |
+ + + + |