=== 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 2016-01-19 09:31:27 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2016-01-25 10:14:50 +0000 @@ -163,4 +163,5 @@ audit_type=Audit Type audit_modified=Modified By audit_history_unavailable=There are no previous values stored, so audit history is not available for -audit_history=Audit History \ No newline at end of file +audit_history=Audit History +delete_error_audit=The event could not be deleted because it contains an auditlog. \ No newline at end of file === 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 2016-01-20 22:27:09 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2016-01-25 10:14:50 +0000 @@ -895,7 +895,7 @@ ModalService.showModal({}, modalOptions).then(function(result){ DHIS2EventFactory.delete(dhis2Event).then(function(data){ - + $scope.currentFileNames = []; delete $scope.fileNames[$scope.currentEvent.event]; var continueLoop = true, index = -1; @@ -909,6 +909,16 @@ $scope.dhis2Events.splice(index,1); $scope.currentEvent = {}; $scope.fileNames['SINGLE_EVENT'] = []; + }, function(error){ + + //temporarily error message because of new audit functionality + var dialogOptions = { + headerText: 'error', + bodyText: 'delete_error_audit' + }; + DialogService.showDialog({}, dialogOptions); + + return $q.reject(error); }); }); };