FIX: respect mailing list confirmation dialog response

This commit is contained in:
Arpit Jalan 2016-05-24 19:33:59 +05:30
parent addd58d961
commit 0646034397
1 changed files with 3 additions and 4 deletions

View File

@ -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);
} }
}); });
}); });