// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import React from 'react'; import * as Utils from 'utils/utils.jsx'; import AdminSettings from './admin_settings.jsx'; import BooleanSetting from './boolean_setting.jsx'; import BrandImageSetting from './brand_image_setting.jsx'; import {FormattedMessage} from 'react-intl'; import SettingsGroup from './settings_group.jsx'; import TextSetting from './text_setting.jsx'; import Constants from 'utils/constants.jsx'; export default class CustomBrandSettings extends AdminSettings { constructor(props) { super(props); this.getConfigFromState = this.getConfigFromState.bind(this); this.renderSettings = this.renderSettings.bind(this); } getConfigFromState(config) { config.TeamSettings.SiteName = this.state.siteName; if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true') { config.TeamSettings.EnableCustomBrand = this.state.enableCustomBrand; config.TeamSettings.CustomBrandText = this.state.customBrandText; config.TeamSettings.customDescriptionText = this.state.customDescriptionText; } return config; } getStateFromConfig(config) { return { siteName: config.TeamSettings.SiteName, enableCustomBrand: config.TeamSettings.EnableCustomBrand, customBrandText: config.TeamSettings.CustomBrandText, customDescriptionText: config.TeamSettings.CustomDescriptionText }; } renderTitle() { return (