From c94b7b9d4fe2c51e6427888d9ba6e3d7b8eb321c Mon Sep 17 00:00:00 2001 From: Nicolas Clerc Date: Tue, 8 Mar 2016 01:34:41 +0100 Subject: [PATCH] toggle incompatible settings views --- .../user_settings/manage_command_hooks.jsx | 256 ++++++++++-------- 1 file changed, 136 insertions(+), 120 deletions(-) diff --git a/webapp/components/user_settings/manage_command_hooks.jsx b/webapp/components/user_settings/manage_command_hooks.jsx index 71dcc36e98..9703664cc8 100644 --- a/webapp/components/user_settings/manage_command_hooks.jsx +++ b/webapp/components/user_settings/manage_command_hooks.jsx @@ -444,6 +444,35 @@ export default class ManageCommandCmds extends React.Component { const disableButton = this.state.cmd.url === '' || (this.state.cmd.trigger === '' && !this.state.external_management); + let triggerInput; + if (!this.state.cmd.external_management) { + triggerInput = ( +
+ +
+ +
+
+ +
+
+ ); + } + let slashCommandAutocompleteCheckbox; if (Utils.isFeatureEnabled(PreReleaseFeatures.SLASHCMD_AUTOCMP)) { slashCommandAutocompleteCheckbox = ( @@ -474,6 +503,110 @@ export default class ManageCommandCmds extends React.Component { ); } + let autoCompleteSettings; + if (!this.state.cmd.external_management) { + autoCompleteSettings = ( +
+
+ +
+
+ +
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ {addError} +
+
+ ); + } + return (
-
- {slashCommandAutocompleteCheckbox} - -
- -
-
- -
-
+ {slashCommandAutocompleteCheckbox} + {triggerInput}
-
- -
-
- -
-
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
- -
- {addError} -
+ {autoCompleteSettings}