From da7832ed8a26ec180787614d84f227bf45e305af Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Thu, 4 Feb 2016 09:20:04 -0500
Subject: Disable remove license button until LDAP is disabled

---
 web/react/components/admin_console/license_settings.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'web/react/components/admin_console/license_settings.jsx')

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);
-- 
cgit v1.2.3-1-g7c22

