// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import React from 'react'; import AdminSettings from './admin_settings.jsx'; import {FormattedMessage} from 'react-intl'; import SettingsGroup from './settings_group.jsx'; import TextSetting from './text_setting.jsx'; export default class LegalAndSupportSettings extends AdminSettings { constructor(props) { super(props); this.getConfigFromState = this.getConfigFromState.bind(this); this.renderSettings = this.renderSettings.bind(this); this.state = Object.assign(this.state, { termsOfServiceLink: props.config.SupportSettings.TermsOfServiceLink, privacyPolicyLink: props.config.SupportSettings.PrivacyPolicyLink, aboutLink: props.config.SupportSettings.AboutLink, helpLink: props.config.SupportSettings.HelpLink, reportAProblemLink: props.config.SupportSettings.ReportAProblemLink, supportEmail: props.config.SupportSettings.SupportEmail }); } getConfigFromState(config) { config.SupportSettings.TermsOfServiceLink = this.state.termsOfServiceLink; config.SupportSettings.PrivacyPolicyLink = this.state.privacyPolicyLink; config.SupportSettings.AboutLink = this.state.aboutLink; config.SupportSettings.HelpLink = this.state.helpLink; config.SupportSettings.ReportAProblemLink = this.state.reportAProblemLink; config.SupportSettings.SupportEmail = this.state.supportEmail; return config; } renderTitle() { return (