// 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 {FormattedHTMLMessage, FormattedMessage} from 'react-intl'; import SettingsGroup from './settings_group.jsx'; import TextSetting from './text_setting.jsx'; export default class GitLabSettings extends AdminSettings { constructor(props) { super(props); this.getConfigFromState = this.getConfigFromState.bind(this); this.renderSettings = this.renderSettings.bind(this); this.state = Object.assign(this.state, { enable: props.config.GitLabSettings.Enable, id: props.config.GitLabSettings.Id, secret: props.config.GitLabSettings.Secret, userApiEndpoint: props.config.GitLabSettings.UserApiEndpoint, authEndpoint: props.config.GitLabSettings.AuthEndpoint, tokenEndpoint: props.config.GitLabSettings.TokenEndpoint }); } getConfigFromState(config) { config.GitLabSettings.Enable = this.state.enable; config.GitLabSettings.Id = this.state.id; config.GitLabSettings.Secret = this.state.secret; config.GitLabSettings.UserApiEndpoint = this.state.userApiEndpoint; config.GitLabSettings.AuthEndpoint = this.state.authEndpoint; config.GitLabSettings.TokenEndpoint = this.state.tokenEndpoint; return config; } renderTitle() { return (