// Copyright (c) 2016 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 DropdownSetting from './dropdown_setting.jsx'; import {FormattedMessage} from 'react-intl'; import SettingsGroup from './settings_group.jsx'; export default class CustomEmojiSettings extends AdminSettings { constructor(props) { super(props); this.getConfigFromState = this.getConfigFromState.bind(this); this.renderSettings = this.renderSettings.bind(this); this.state = Object.assign(this.state, { enableCustomEmoji: props.config.ServiceSettings.EnableCustomEmoji, restrictCustomEmojiCreation: props.config.ServiceSettings.RestrictCustomEmojiCreation }); } getConfigFromState(config) { config.ServiceSettings.EnableCustomEmoji = this.state.enableCustomEmoji; if (global.window.mm_license.IsLicensed === 'true') { config.ServiceSettings.RestrictCustomEmojiCreation = this.state.restrictCustomEmojiCreation; } return config; } renderTitle() { return (