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
|
data: formData
|
||||||
}).then(function(data) {
|
}).then(function(data) {
|
||||||
if (data.deleted) {
|
if (data.deleted) {
|
||||||
|
if (/^\/admin\/users\/list\//.test(location)) {
|
||||||
document.location = location;
|
document.location = location;
|
||||||
|
} else {
|
||||||
|
document.location = "/admin/users/list/active";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
bootbox.alert(I18n.t("admin.user.delete_failed"));
|
bootbox.alert(I18n.t("admin.user.delete_failed"));
|
||||||
if (data.user) {
|
if (data.user) {
|
||||||
|
|
Loading…
Reference in New Issue