From 9de236ca9c67749c81ac7edf33924b36447064df Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Tue, 29 Mar 2016 10:15:03 -0400
Subject: Removed incoming and outgoing webhooks from user settings

---
 .../user_settings/user_settings_integrations.jsx   | 88 +---------------------
 1 file changed, 1 insertion(+), 87 deletions(-)

(limited to 'webapp/components/user_settings/user_settings_integrations.jsx')

diff --git a/webapp/components/user_settings/user_settings_integrations.jsx b/webapp/components/user_settings/user_settings_integrations.jsx
index 9061e34df..37081b863 100644
--- a/webapp/components/user_settings/user_settings_integrations.jsx
+++ b/webapp/components/user_settings/user_settings_integrations.jsx
@@ -4,29 +4,11 @@
 import $ from 'jquery';
 import SettingItemMin from '../setting_item_min.jsx';
 import SettingItemMax from '../setting_item_max.jsx';
-import ManageIncomingHooks from './manage_incoming_hooks.jsx';
-import ManageOutgoingHooks from './manage_outgoing_hooks.jsx';
 import ManageCommandHooks from './manage_command_hooks.jsx';
 
 import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
 
 const holders = defineMessages({
-    inName: {
-        id: 'user.settings.integrations.incomingWebhooks',
-        defaultMessage: 'Incoming Webhooks'
-    },
-    inDesc: {
-        id: 'user.settings.integrations.incomingWebhooksDescription',
-        defaultMessage: 'Manage your incoming webhooks'
-    },
-    outName: {
-        id: 'user.settings.integrations.outWebhooks',
-        defaultMessage: 'Outgoing Webhooks'
-    },
-    outDesc: {
-        id: 'user.settings.integrations.outWebhooksDescription',
-        defaultMessage: 'Manage your outgoing webhooks'
-    },
     cmdName: {
         id: 'user.settings.integrations.commands',
         defaultMessage: 'Slash Commands'
@@ -52,74 +34,10 @@ class UserSettingsIntegrationsTab extends React.Component {
         this.props.updateSection(section);
     }
     render() {
-        let incomingHooksSection;
-        let outgoingHooksSection;
         let commandHooksSection;
         var inputs = [];
         const {formatMessage} = this.props.intl;
 
-        if (global.window.mm_config.EnableIncomingWebhooks === 'true') {
-            if (this.props.activeSection === 'incoming-hooks') {
-                inputs.push(
-                    <ManageIncomingHooks key='incoming-hook-ui'/>
-                );
-
-                incomingHooksSection = (
-                    <SettingItemMax
-                        title={formatMessage(holders.inName)}
-                        width='medium'
-                        inputs={inputs}
-                        updateSection={(e) => {
-                            this.updateSection('');
-                            e.preventDefault();
-                        }}
-                    />
-                );
-            } else {
-                incomingHooksSection = (
-                    <SettingItemMin
-                        title={formatMessage(holders.inName)}
-                        width='medium'
-                        describe={formatMessage(holders.inDesc)}
-                        updateSection={() => {
-                            this.updateSection('incoming-hooks');
-                        }}
-                    />
-                );
-            }
-        }
-
-        if (global.window.mm_config.EnableOutgoingWebhooks === 'true') {
-            if (this.props.activeSection === 'outgoing-hooks') {
-                inputs.push(
-                    <ManageOutgoingHooks key='outgoing-hook-ui'/>
-                );
-
-                outgoingHooksSection = (
-                    <SettingItemMax
-                        title={formatMessage(holders.outName)}
-                        width='medium'
-                        inputs={inputs}
-                        updateSection={(e) => {
-                            this.updateSection('');
-                            e.preventDefault();
-                        }}
-                    />
-                );
-            } else {
-                outgoingHooksSection = (
-                    <SettingItemMin
-                        title={formatMessage(holders.outName)}
-                        width='medium'
-                        describe={formatMessage(holders.outDesc)}
-                        updateSection={() => {
-                            this.updateSection('outgoing-hooks');
-                        }}
-                    />
-                );
-            }
-        }
-
         if (global.window.mm_config.EnableCommands === 'true') {
             if (this.props.activeSection === 'command-hooks') {
                 inputs.push(
@@ -187,10 +105,6 @@ class UserSettingsIntegrationsTab extends React.Component {
                         />
                     </h3>
                     <div className='divider-dark first'/>
-                    {incomingHooksSection}
-                    <div className='divider-light'/>
-                    {outgoingHooksSection}
-                    <div className='divider-dark'/>
                     {commandHooksSection}
                     <div className='divider-dark'/>
                 </div>
@@ -209,4 +123,4 @@ UserSettingsIntegrationsTab.propTypes = {
     collapseModal: React.PropTypes.func.isRequired
 };
 
-export default injectIntl(UserSettingsIntegrationsTab);
\ No newline at end of file
+export default injectIntl(UserSettingsIntegrationsTab);
-- 
cgit v1.2.3-1-g7c22

