|
@@ -63,7 +63,7 @@ const CustomBotWithoutProxySettingsAccordion = ({
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- const onTestConnectionHandler = async() => {
|
|
|
|
|
|
|
+ const testConnection = async() => {
|
|
|
setConnectionErrorCode(null);
|
|
setConnectionErrorCode(null);
|
|
|
setConnectionErrorMessage(null);
|
|
setConnectionErrorMessage(null);
|
|
|
setConnectionSuccessMessage(null);
|
|
setConnectionSuccessMessage(null);
|
|
@@ -81,6 +81,11 @@ const CustomBotWithoutProxySettingsAccordion = ({
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const submitForm = (e) => {
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ testConnection();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const inputTestChannelHandler = (channel) => {
|
|
const inputTestChannelHandler = (channel) => {
|
|
|
setTestChannel(channel);
|
|
setTestChannel(channel);
|
|
|
};
|
|
};
|
|
@@ -159,7 +164,7 @@ const CustomBotWithoutProxySettingsAccordion = ({
|
|
|
>
|
|
>
|
|
|
<p className="text-center m-4">{t('admin:slack_integration.without_proxy.test_connection_by_pressing_button')}</p>
|
|
<p className="text-center m-4">{t('admin:slack_integration.without_proxy.test_connection_by_pressing_button')}</p>
|
|
|
<div className="d-flex justify-content-center">
|
|
<div className="d-flex justify-content-center">
|
|
|
- <form className="form-row align-items-center w-25">
|
|
|
|
|
|
|
+ <form className="form-row align-items-center w-25" onSubmit={e => submitForm(e)}>
|
|
|
<div className="col-8 input-group-prepend">
|
|
<div className="col-8 input-group-prepend">
|
|
|
<span className="input-group-text" id="slack-channel-addon"><i className="fa fa-hashtag" /></span>
|
|
<span className="input-group-text" id="slack-channel-addon"><i className="fa fa-hashtag" /></span>
|
|
|
<input
|
|
<input
|
|
@@ -172,10 +177,9 @@ const CustomBotWithoutProxySettingsAccordion = ({
|
|
|
</div>
|
|
</div>
|
|
|
<div className="col-4">
|
|
<div className="col-4">
|
|
|
<button
|
|
<button
|
|
|
- type="button"
|
|
|
|
|
|
|
+ type="submit"
|
|
|
className="btn btn-info mx-3 font-weight-bold"
|
|
className="btn btn-info mx-3 font-weight-bold"
|
|
|
disabled={testChannel.trim() === ''}
|
|
disabled={testChannel.trim() === ''}
|
|
|
- onClick={onTestConnectionHandler}
|
|
|
|
|
>Test
|
|
>Test
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|