[user mgnt] fix delete user feedback on failure

* fixes #18099
This commit is contained in:
Morris Jobke 2015-08-07 11:07:29 +02:00
parent 43888bb9bf
commit 637edfde24
1 changed files with 9 additions and 9 deletions

View File

@ -194,16 +194,16 @@ DeleteHandler.prototype.deleteEntry = function(keepNotification) {
// FIXME: do not use synchronous ajax calls as they block the browser !
async: false,
success: function (result) {
if (result.status === 'success') {
// Remove undo option, & remove user from table
//TODO: following line
dh.removeCallback(dh.oidToDelete);
dh.canceled = true;
} else {
OC.dialogs.alert(result.data.message, t('settings', 'Unable to delete {objName}', {objName: dh.oidToDelete}));
},
error: function (jqXHR) {
OC.dialogs.alert(jqXHR.responseJSON.data.message, t('settings', 'Unable to delete {objName}', {objName: dh.oidToDelete}));
dh.undoCallback(dh.oidToDelete);
}
}
});
};