add confirm dialog when deleting other accounts with same IP address
This commit is contained in:
parent
ced35cb3bb
commit
acb8030d12
|
@ -43,17 +43,20 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
deleteAllOtherAccounts: function() {
|
deleteAllOtherAccounts: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.setProperties({ other_accounts: null, otherAccountsLoading: true });
|
bootbox.confirm(I18n.t("ip_lookup.confirm_delete_other_accounts"), I18n.t("no_value"), I18n.t("yes_value"), function (confirmed) {
|
||||||
|
if (confirmed) {
|
||||||
Discourse.ajax("/admin/users/delete-others-with-same-ip.json", {
|
self.setProperties({ other_accounts: null, otherAccountsLoading: true });
|
||||||
type: "DELETE",
|
Discourse.ajax("/admin/users/delete-others-with-same-ip.json", {
|
||||||
data: {
|
type: "DELETE",
|
||||||
"ip": this.get("ip"),
|
data: {
|
||||||
"exclude": this.get("user_id"),
|
"ip": self.get("ip"),
|
||||||
"order": "trust_level DESC"
|
"exclude": self.get("user_id"),
|
||||||
|
"order": "trust_level DESC"
|
||||||
|
}
|
||||||
|
}).then(function() {
|
||||||
|
self.send("lookup");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).then(function() {
|
|
||||||
self.send("lookup");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,6 +285,7 @@ en:
|
||||||
read_time: "read time"
|
read_time: "read time"
|
||||||
topics_entered: "topics entered"
|
topics_entered: "topics entered"
|
||||||
post_count: "# posts"
|
post_count: "# posts"
|
||||||
|
confirm_delete_other_accounts: "Are you sure you want to delete these accounts?"
|
||||||
|
|
||||||
user:
|
user:
|
||||||
said: "{{username}}:"
|
said: "{{username}}:"
|
||||||
|
|
Loading…
Reference in New Issue