=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2015-09-24 14:38:58 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2015-10-06 10:52:09 +0000 @@ -92,7 +92,7 @@ ng-blur="teiValueUpdated(selectedTei, attribute.id)" style="width:75%;" ng-required="attribute.mandatory || attribute.unique"/> - + === 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-10-05 13:56:43 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js 2015-10-06 10:52:09 +0000 @@ -343,9 +343,8 @@ return status; }; - $scope.getTrackerAssociate = function(selectedAttribute){ - - + $scope.getTrackerAssociate = function(selectedAttribute, existingAssociateUid){ + var modalInstance = $modal.open({ templateUrl: 'components/teiadd/tei-add.html', controller: 'TEIAddController', @@ -366,6 +365,9 @@ selectedAttribute: function(){ return selectedAttribute; }, + existingAssociateUid: function(){ + return existingAssociateUid; + }, selectedProgram: function(){ return $scope.selectedProgram; }, === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js 2015-09-23 14:06:13 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js 2015-10-06 10:52:09 +0000 @@ -62,6 +62,9 @@ selectedAttribute: function(){ return null; }, + existingAssociateUid: function(){ + return null; + }, addingRelationship: function(){ return true; }, === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-controller.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-controller.js 2015-10-05 13:56:43 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-controller.js 2015-10-06 10:52:09 +0000 @@ -23,11 +23,11 @@ relatedProgramRelationship, selections, selectedAttribute, + existingAssociateUid, addingRelationship, selectedTei){ $scope.maxOptionSize = 30; - $scope.attributesById = CurrentSelection.getAttributesById(); if(!$scope.attributesById){ $scope.attributesById = []; @@ -115,6 +115,15 @@ $scope.selectedProgram = response.selectedProgram; }); + if(existingAssociateUid){ + TEIService.get(existingAssociateUid, $scope.optionSets, $scope.attributesById).then(function(data){ + $scope.selectedTeiForDisplay = data; + }); + } + else{ + $scope.selectedTeiForDisplay = null; + } + CurrentSelection.setRelationshipOwner({}); //$scope.selectedTei = {}; } === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add.html 2015-10-05 13:56:43 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add.html 2015-10-06 10:52:09 +0000 @@ -13,12 +13,18 @@ -
-
-
+