diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-25 12:39:08 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-04-25 09:39:08 -0700 |
commit | 7fc663ca75e966847243a845cff31c07737c4492 (patch) | |
tree | f70c33a2bebae66c7eb0f608d509cf0cf4857177 /webapp/components/admin_console/email_settings.jsx | |
parent | 8d1a132eda861f3e491a406233b726ff953cdffd (diff) | |
download | chat-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.jsx | 11 |
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, |