From 7110aa42d9b0110de6375681aa83edb06dad2645 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 28 Sep 2015 11:10:18 -0700 Subject: Fixing gitlab settings in admin console --- .../components/admin_console/gitlab_settings.jsx | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'web/react/components/admin_console') diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index 1e10c5592..eaea15b8f 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -12,7 +12,7 @@ export default class GitLabSettings extends React.Component { this.handleSubmit = this.handleSubmit.bind(this); this.state = { - Allow: this.props.config.GitLabSettings.Allow, + Enable: this.props.config.GitLabSettings.Enable, saveNeeded: false, serverError: null }; @@ -21,12 +21,12 @@ export default class GitLabSettings extends React.Component { handleChange(action) { var s = {saveNeeded: true, serverError: this.state.serverError}; - if (action === 'AllowTrue') { - s.Allow = true; + if (action === 'EnableTrue') { + s.Enable = true; } - if (action === 'AllowFalse') { - s.Allow = false; + if (action === 'EnableFalse') { + s.Enable = false; } this.setState(s); @@ -37,7 +37,7 @@ export default class GitLabSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.GitLabSettings.Allow = React.findDOMNode(this.refs.Allow).checked; + config.GitLabSettings.Enable = React.findDOMNode(this.refs.Enable).checked; config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); @@ -88,7 +88,7 @@ export default class GitLabSettings extends React.Component {
@@ -96,21 +96,21 @@ export default class GitLabSettings extends React.Component { @@ -134,7 +134,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"' defaultValue={this.props.config.GitLabSettings.Secret} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Obtain this value via the instructions above for logging into GitLab.'}

@@ -156,7 +156,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"' defaultValue={this.props.config.GitLabSettings.Id} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Obtain this value via the instructions above for logging into GitLab'}

@@ -178,7 +178,7 @@ export default class GitLabSettings extends React.Component { placeholder='Not currently used by GitLab. Please leave blank' defaultValue={this.props.config.GitLabSettings.Scope} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'This field is not yet used by GitLab OAuth. Other OAuth providers may use this field to specify the scope of account data from OAuth provider that is sent to Mattermost.'}

@@ -200,7 +200,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.AuthEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Enter /oauth/authorize (example http://localhost:3000/oauth/authorize).'}

@@ -222,7 +222,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.TokenEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Enter /oauth/token.'}

@@ -244,7 +244,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.UserApiEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Enter /api/v3/user.'}

-- cgit v1.2.3-1-g7c22