dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42730
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21810: Added error message to be displayed while attempting to deleteevents with audit history
------------------------------------------------------------
revno: 21810
committer: jijukjose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-25 11:14:50 +0100
message:
Added error message to be displayed while attempting to deleteevents with audit history
modified:
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/scripts/controllers.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-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);
});
});
};