diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-08-07 11:07:29 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-08-07 11:07:29 +0200 |
commit | 637edfde24eefd9e9723ce3d438a7d627059681c (patch) | |
tree | b1e6fc1835be24bcd34245f9beef1a29ab17f2db /settings/js/users | |
parent | 43888bb9bf46928acfe79084377b96133609ef6c (diff) | |
download | nextcloud-server-637edfde24eefd9e9723ce3d438a7d627059681c.tar.gz nextcloud-server-637edfde24eefd9e9723ce3d438a7d627059681c.zip |
[user mgnt] fix delete user feedback on failure
* fixes #18099
Diffstat (limited to 'settings/js/users')
-rw-r--r-- | settings/js/users/deleteHandler.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/settings/js/users/deleteHandler.js b/settings/js/users/deleteHandler.js index fcad39dd4cc..de87f901372 100644 --- a/settings/js/users/deleteHandler.js +++ b/settings/js/users/deleteHandler.js @@ -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})); - dh.undoCallback(dh.oidToDelete); - } + // Remove undo option, & remove user from table + + //TODO: following line + dh.removeCallback(dh.oidToDelete); + dh.canceled = true; + }, + error: function (jqXHR) { + OC.dialogs.alert(jqXHR.responseJSON.data.message, t('settings', 'Unable to delete {objName}', {objName: dh.oidToDelete})); + dh.undoCallback(dh.oidToDelete); + } }); }; |