UX: add confirm dialog when rolling up IP ban entries
This commit is contained in:
parent
d3d517108d
commit
2c38f969cc
|
@ -18,9 +18,13 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
|
||||||
|
|
||||||
rollUp: function() {
|
rollUp: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.set("loading", true)
|
return bootbox.confirm(I18n.t("admin.logs.screened_ips.roll_up_confirm"), I18n.t("no_value"), I18n.t("yes_value"), function (confirmed) {
|
||||||
return Discourse.ScreenedIpAddress.rollUp().then(function() {
|
if (confirmed) {
|
||||||
self.send("show");
|
self.set("loading", true)
|
||||||
|
return Discourse.ScreenedIpAddress.rollUp().then(function() {
|
||||||
|
self.send("show");
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1862,6 +1862,7 @@ en:
|
||||||
title: "Screened IPs"
|
title: "Screened IPs"
|
||||||
description: 'IP addresses that are being watched. Use "Allow" to whitelist IP addresses.'
|
description: 'IP addresses that are being watched. Use "Allow" to whitelist IP addresses.'
|
||||||
delete_confirm: "Are you sure you want to remove the rule for %{ip_address}?"
|
delete_confirm: "Are you sure you want to remove the rule for %{ip_address}?"
|
||||||
|
roll_up_confirm: "Are you sure you want to roll up ban entries?"
|
||||||
actions:
|
actions:
|
||||||
block: "Block"
|
block: "Block"
|
||||||
do_nothing: "Allow"
|
do_nothing: "Allow"
|
||||||
|
|
Loading…
Reference in New Issue