summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/email_settings.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-04-25 12:39:08 -0400
committerCorey Hulen <corey@hulen.com>2017-04-25 09:39:08 -0700
commit7fc663ca75e966847243a845cff31c07737c4492 (patch)
treef70c33a2bebae66c7eb0f608d509cf0cf4857177 /webapp/components/admin_console/email_settings.jsx
parent8d1a132eda861f3e491a406233b726ff953cdffd (diff)
downloadchat-7fc663ca75e966847243a845cff31c07737c4492.tar.gz
chat-7fc663ca75e966847243a845cff31c07737c4492.tar.bz2
chat-7fc663ca75e966847243a845cff31c07737c4492.zip
PLT-6283 Hide Preview Mode error bar after enabling email notifications (#6180)
Diffstat (limited to 'webapp/components/admin_console/email_settings.jsx')
-rw-r--r--webapp/components/admin_console/email_settings.jsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/webapp/components/admin_console/email_settings.jsx b/webapp/components/admin_console/email_settings.jsx
index 959bbec7f..ddfe3c38f 100644
--- a/webapp/components/admin_console/email_settings.jsx
+++ b/webapp/components/admin_console/email_settings.jsx
@@ -3,6 +3,9 @@
import React from 'react';
+import ErrorStore from 'stores/error_store.jsx';
+
+import {ErrorBarTypes} from 'utils/constants.jsx';
import * as Utils from 'utils/utils.jsx';
import AdminSettings from './admin_settings.jsx';
@@ -19,6 +22,8 @@ export default class EmailSettings extends AdminSettings {
this.getConfigFromState = this.getConfigFromState.bind(this);
+ this.handleSaved = this.handleSaved.bind(this);
+
this.renderSettings = this.renderSettings.bind(this);
}
@@ -39,6 +44,12 @@ export default class EmailSettings extends AdminSettings {
return config;
}
+ handleSaved(newConfig) {
+ if (newConfig.EmailSettings.SendEmailNotifications) {
+ ErrorStore.clearError(ErrorBarTypes.PREVIEW_MODE);
+ }
+ }
+
getStateFromConfig(config) {
return {
sendEmailNotifications: config.EmailSettings.SendEmailNotifications,