=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2015-01-13 17:31:37 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2015-01-15 15:29:08 +0000 @@ -115,7 +115,7 @@ missing_translation_using_default=No translation file is found for the selected locale. Using default translation (English). value_must_be=Value must be number=Number -value_must_be_Number=Value must be number +value_must_be_number=Value must be number value_must_be_posInt=Value must be positive integer value_must_be_negInt=Value must be negative integer value_must_be_zeroPositiveInt=Value must be zero or positive integer === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-01-14 14:06:51 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-01-15 15:29:08 +0000 @@ -57,17 +57,17 @@ //watch for selection of org unit from tree $scope.$watch('selectedOrgUnit', function() { $scope.dhis2Events = []; + $scope.currentEvent = {}; + if( angular.isObject($scope.selectedOrgUnit)){ - - if(!$scope.optionSets){ + if($scope.optionSets.length < 1){ $scope.optionSets = []; OptionSetService.getAll().then(function(optionSets){ angular.forEach(optionSets, function(optionSet){ $scope.optionSets[optionSet.id] = optionSet; }); }); - } - + } $scope.loadPrograms(); } }); @@ -648,8 +648,8 @@ if( newValue != oldValue ){ if($scope.prStDes[dataElement].dataElement.type === 'string'){ - if($scope.prStDes[dataElement].dataElement.optionSet){ - newValue = OptionSetService.getCode($scope.optionSets[$scope.prStDes[dataElement].dataElement.optionSet.id].options, newValue);//$scope.optionCodesByName[ '"' + newValue + '"']; + if($scope.prStDes[dataElement].dataElement.optionSet){ + newValue = OptionSetService.getCode($scope.optionSets[$scope.prStDes[dataElement].dataElement.optionSet.id].options, newValue); } } if($scope.prStDes[dataElement].dataElement.type === 'date'){