summaryrefslogtreecommitdiffstats
path: root/web/react/components/admin_console
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-04 09:20:04 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-04 13:32:33 -0500
commitda7832ed8a26ec180787614d84f227bf45e305af (patch)
tree6633d0c471288e48a727d083c6cd492fe2b9114b /web/react/components/admin_console
parentb3b71c292db2dcbdcfe03db1c24fa3f57f45794e (diff)
downloadchat-da7832ed8a26ec180787614d84f227bf45e305af.tar.gz
chat-da7832ed8a26ec180787614d84f227bf45e305af.tar.bz2
chat-da7832ed8a26ec180787614d84f227bf45e305af.zip
Disable remove license button until LDAP is disabled
Diffstat (limited to 'web/react/components/admin_console')
-rw-r--r--web/react/components/admin_console/admin_controller.jsx2
-rw-r--r--web/react/components/admin_console/license_settings.jsx4
2 files changed, 4 insertions, 2 deletions
diff --git a/web/react/components/admin_console/admin_controller.jsx b/web/react/components/admin_console/admin_controller.jsx
index 360ae3ef3..695e2083a 100644
--- a/web/react/components/admin_console/admin_controller.jsx
+++ b/web/react/components/admin_console/admin_controller.jsx
@@ -160,7 +160,7 @@ export default class AdminController extends React.Component {
} else if (this.state.selected === 'ldap_settings') {
tab = <LdapSettingsTab config={this.state.config} />;
} else if (this.state.selected === 'license') {
- tab = <LicenseSettingsTab />;
+ tab = <LicenseSettingsTab config={this.state.config} />;
} else if (this.state.selected === 'team_users') {
if (this.state.teams) {
tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />;
diff --git a/web/react/components/admin_console/license_settings.jsx b/web/react/components/admin_console/license_settings.jsx
index 1ea176ed0..3332f37ef 100644
--- a/web/react/components/admin_console/license_settings.jsx
+++ b/web/react/components/admin_console/license_settings.jsx
@@ -136,6 +136,7 @@ class LicenseSettings extends React.Component {
licenseKey = (
<div className='col-sm-8'>
<button
+ disabled={this.props.config.LdapSettings.Enable}
className='btn btn-danger'
onClick={this.handleRemove}
id='remove-button'
@@ -266,7 +267,8 @@ class LicenseSettings extends React.Component {
}
LicenseSettings.propTypes = {
- intl: intlShape.isRequired
+ intl: intlShape.isRequired,
+ config: React.PropTypes.object
};
export default injectIntl(LicenseSettings);