Skip to content

A platform for community discussion. Free, open, simple.

Feature: Add warning banner in email settings when mailing list mode enabled

Jeff Wongebd966fbdb9c
diff --git a/app/assets/javascripts/discourse/templates/preferences/emails.hbs b/app/assets/javascripts/discourse/templates/preferences/emails.hbs
index b73cffa4d86..d877bf7f826 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}}
+ <div class="warning-wrap">
+ {{#if model.user_option.mailing_list_mode}}
+ <div class="warning">{{i18n 'user.mailing_list_mode.warning'}}</div>
+ {{/if}}
+ </div>
+{{/unless}}
<div class="control-group pref-email-settings">
<label class="control-label">{{i18n 'user.email_settings'}}</label>
<div class='controls controls-dropdown'>
diff --git a/app/assets/stylesheets/common/base/user.scss b/app/assets/stylesheets/common/base/user.scss
index 749dbab90ad..b5543ccec6d 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 75606667ae4..15c0898f5d5 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."