dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40546
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20580: tracker-capture: when no program is selected, tracker associate is registered using attributes-in...
------------------------------------------------------------
revno: 20580
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-08 10:03:23 +0200
message:
tracker-capture: when no program is selected, tracker associate is registered using attributes-in-no-program
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-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/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-07 15:13:26 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-controller.js 2015-10-08 08:03:23 +0000
@@ -573,23 +573,22 @@
$scope.customForm = null;
$scope.customFormExists = false;
- if(angular.isObject($scope.selectedProgramForRelative)){
- AttributesFactory.getByProgram($scope.selectedProgramForRelative).then(function(atts){
- $scope.attributes = atts;
- if($scope.selectedProgramForRelative && $scope.selectedProgramForRelative.id && $scope.selectedProgramForRelative.dataEntryForm && $scope.selectedProgramForRelative.dataEntryForm.htmlCode){
- $scope.customFormExists = true;
- $scope.trackedEntityForm = $scope.selectedProgramForRelative.dataEntryForm;
- $scope.trackedEntityForm.attributes = $scope.attributes;
- $scope.trackedEntityForm.selectIncidentDatesInFuture = $scope.selectedProgramForRelative.selectIncidentDatesInFuture;
- $scope.trackedEntityForm.selectEnrollmentDatesInFuture = $scope.selectedProgramForRelative.selectEnrollmentDatesInFuture;
- $scope.trackedEntityForm.displayIncidentDate = $scope.selectedProgramForRelative.displayIncidentDate;
- $scope.customForm = CustomFormService.getForTrackedEntity($scope.trackedEntityForm, 'RELATIONSHIP');
- }
+ AttributesFactory.getByProgram($scope.selectedProgramForRelative).then(function(atts){
+ $scope.attributes = atts;
+ if($scope.selectedProgramForRelative && $scope.selectedProgramForRelative.id && $scope.selectedProgramForRelative.dataEntryForm && $scope.selectedProgramForRelative.dataEntryForm.htmlCode){
+ $scope.customFormExists = true;
+ $scope.trackedEntityForm = $scope.selectedProgramForRelative.dataEntryForm;
+ $scope.trackedEntityForm.attributes = $scope.attributes;
+ $scope.trackedEntityForm.selectIncidentDatesInFuture = $scope.selectedProgramForRelative.selectIncidentDatesInFuture;
+ $scope.trackedEntityForm.selectEnrollmentDatesInFuture = $scope.selectedProgramForRelative.selectEnrollmentDatesInFuture;
+ $scope.trackedEntityForm.displayIncidentDate = $scope.selectedProgramForRelative.displayIncidentDate;
+ $scope.customForm = CustomFormService.getForTrackedEntity($scope.trackedEntityForm, 'RELATIONSHIP');
+ }
- assignInheritance();
- getRules();
- });
- }
+ assignInheritance();
+ getRules();
+ });
+
});
$scope.trackedEntities = {available: []};