// Copyright (c) 2015-present 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);
}
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;
}
getStateFromConfig(config) {
return {
termsOfServiceLink: config.SupportSettings.TermsOfServiceLink,
privacyPolicyLink: config.SupportSettings.PrivacyPolicyLink,
aboutLink: config.SupportSettings.AboutLink,
helpLink: config.SupportSettings.HelpLink,
reportAProblemLink: config.SupportSettings.ReportAProblemLink,
supportEmail: config.SupportSettings.SupportEmail
};
}
renderTitle() {
return (
);
}
renderSettings() {
return (
}
helpText={
}
value={this.state.termsOfServiceLink}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.privacyPolicyLink}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.aboutLink}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.helpLink}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.reportAProblemLink}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.supportEmail}
onChange={this.handleChange}
/>
);
}
}