// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import React from 'react'; import AdminSettings from './admin_settings.jsx'; import SettingsGroup from './settings_group.jsx'; import DropdownSetting from './dropdown_setting.jsx'; import Constants from 'utils/constants.jsx'; import * as Utils from 'utils/utils.jsx'; import {FormattedMessage, FormattedHTMLMessage} from 'react-intl'; export default class PolicySettings extends AdminSettings { constructor(props) { super(props); this.getConfigFromState = this.getConfigFromState.bind(this); this.renderSettings = this.renderSettings.bind(this); } getConfigFromState(config) { config.TeamSettings.RestrictTeamInvite = this.state.restrictTeamInvite; config.TeamSettings.RestrictPublicChannelManagement = this.state.restrictPublicChannelManagement; config.TeamSettings.RestrictPrivateChannelManagement = this.state.restrictPrivateChannelManagement; return config; } getStateFromConfig(config) { return { restrictTeamInvite: config.TeamSettings.RestrictTeamInvite, restrictPublicChannelManagement: config.TeamSettings.RestrictPublicChannelManagement, restrictPrivateChannelManagement: config.TeamSettings.RestrictPrivateChannelManagement }; } renderTitle() { return (

); } renderSettings() { return ( } value={this.state.restrictTeamInvite} onChange={this.handleChange} helpText={ } /> } value={this.state.restrictPublicChannelManagement} onChange={this.handleChange} helpText={ } /> } value={this.state.restrictPrivateChannelManagement} onChange={this.handleChange} helpText={ } /> ); } }