diff --git a/app/assets/javascripts/discourse/components/global-notice.js.es6 b/app/assets/javascripts/discourse/components/global-notice.js.es6 index bde5b4aaa5e..553b13699f9 100644 --- a/app/assets/javascripts/discourse/components/global-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/global-notice.js.es6 @@ -7,11 +7,11 @@ export default Ember.Component.extend(StringBuffer, { var notices = []; if (this.site.get("isReadOnly")) { - notices.push(I18n.t("read_only_mode.enabled")); + notices.push([I18n.t("read_only_mode.enabled"), 'alert-read-only']); } if (this.siteSettings.disable_emails) { - notices.push(I18n.t("emails_are_disabled")); + notices.push([I18n.t("emails_are_disabled"), 'alert-emails-disabled']); } if (Discourse.User.currentProp('admin') && this.siteSettings.show_create_topics_notice) { @@ -24,17 +24,17 @@ export default Ember.Component.extend(StringBuffer, { } }); if (topic_count < 5 || post_count < this.siteSettings.tl1_requires_read_posts) { - notices.push(I18n.t("too_few_topics_notice", {posts: this.siteSettings.tl1_requires_read_posts})); + notices.push([I18n.t("too_few_topics_notice", {posts: this.siteSettings.tl1_requires_read_posts}), 'alert-too-few-topics']); } } if (!_.isEmpty(this.siteSettings.global_notice)) { - notices.push(this.siteSettings.global_notice); + notices.push([this.siteSettings.global_notice, 'alert-global-notice']); } if (notices.length > 0) { - buffer.push(_.map(notices, function(text) { - return "
" + text + "
"; + buffer.push(_.map(notices, function(arr) { + return "
" + arr[0] + "
"; }).join("")); } }