FIX: proper redirection when deleting a user
This commit is contained in:
parent
b65ac132b7
commit
8edf2afb83
|
@ -331,7 +331,11 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
data: formData
|
||||
}).then(function(data) {
|
||||
if (data.deleted) {
|
||||
if (/^\/admin\/users\/list\//.test(location)) {
|
||||
document.location = location;
|
||||
} else {
|
||||
document.location = "/admin/users/list/active";
|
||||
}
|
||||
} else {
|
||||
bootbox.alert(I18n.t("admin.user.delete_failed"));
|
||||
if (data.user) {
|
||||
|
|
Loading…
Reference in New Issue