FIX: respect mailing list confirmation dialog response
This commit is contained in:
parent
addd58d961
commit
0646034397
|
@ -134,13 +134,12 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
||||||
Em.run.next(()=>{
|
Em.run.next(()=>{
|
||||||
const postsPerDay = this.get('model.mailing_list_posts_per_day');
|
const postsPerDay = this.get('model.mailing_list_posts_per_day');
|
||||||
if (!postsPerDay || postsPerDay < 2) {
|
if (!postsPerDay || postsPerDay < 2) {
|
||||||
this.set('model.user_option.mailing_list_mode', true);
|
return true;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bootbox.confirm(I18n.t("user.enable_mailing_list", {count: postsPerDay}), I18n.t("no_value"), I18n.t("yes_value"), (success) => {
|
bootbox.confirm(I18n.t("user.enable_mailing_list", {count: postsPerDay}), I18n.t("no_value"), I18n.t("yes_value"), (success) => {
|
||||||
if (success) {
|
if (!success) {
|
||||||
this.set('model.user_option.mailing_list_mode', true);
|
this.set('model.user_option.mailing_list_mode', false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue