From ebd966fbdb9cb56e1e8e1c8a6991a11fefb18a23 Mon Sep 17 00:00:00 2001 From: Jeff Wong Date: Wed, 23 May 2018 18:51:08 -0700 Subject: [PATCH] Feature: Add warning banner in email settings when mailing list mode enabled --- .../javascripts/discourse/templates/preferences/emails.hbs | 7 +++++++ app/assets/stylesheets/common/base/user.scss | 5 +++++ config/locales/client.en.yml | 1 + 3 files changed, 13 insertions(+) diff --git a/app/assets/javascripts/discourse/templates/preferences/emails.hbs b/app/assets/javascripts/discourse/templates/preferences/emails.hbs index b73cffa4d8..d877bf7f82 100644 --- a/app/assets/javascripts/discourse/templates/preferences/emails.hbs +++ b/app/assets/javascripts/discourse/templates/preferences/emails.hbs @@ -1,3 +1,10 @@ +{{#unless siteSettings.disable_mailing_list_mode}} +
+ {{#if model.user_option.mailing_list_mode}} +
{{i18n 'user.mailing_list_mode.warning'}}
+ {{/if}} +
+{{/unless}}
diff --git a/app/assets/stylesheets/common/base/user.scss b/app/assets/stylesheets/common/base/user.scss index 749dbab90a..b5543ccec6 100644 --- a/app/assets/stylesheets/common/base/user.scss +++ b/app/assets/stylesheets/common/base/user.scss @@ -541,6 +541,11 @@ width: 520px; } + .warning-wrap { + height: 30px; + margin-bottom: 10px; + } + .category-notifications .category-controls, .tag-notifications .tag-controls { margin-top: 24px; diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 75606667ae..15c0898f5d 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -659,6 +659,7 @@ en: individual_no_echo: "Send an email for every new post except my own" many_per_day: "Send me an email for every new post (about {{dailyEmailEstimate}} per day)" few_per_day: "Send me an email for every new post (about 2 per day)" + warning: "Mailing list mode enabled. Email notification settings are overridden." tag_settings: "Tags" watched_tags: "Watched" watched_tags_instructions: "You will automatically watch all topics with these tags. You will be notified of all new posts and topics, and a count of new posts will also appear next to the topic."