From a61c06c42542afdf1157ace5d94ed82ece9935e4 Mon Sep 17 00:00:00 2001 From: sujal Date: Thu, 28 Mar 2024 19:37:40 +0530 Subject: [PATCH] bot-url: Disable stream dropdown widget when no integration is selected. Previously, the stream dropdown remained active regardless of whether an integration type was selected. This commit addresses the issue by disabling the stream dropdown widget when no integration type is selected --- web/src/integration_url_modal.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/integration_url_modal.ts b/web/src/integration_url_modal.ts index 21cf6ec7b8..5223d427a2 100644 --- a/web/src/integration_url_modal.ts +++ b/web/src/integration_url_modal.ts @@ -41,6 +41,7 @@ export function show_generate_integration_url_modal(api_key: string): void { const $dialog_submit_button = $("#generate-integration-url-modal .dialog_submit_button"); $dialog_submit_button.prop("disabled", true); + $("#integration-url-stream_widget").prop("disabled", true); const clipboard = new ClipboardJS("#generate-integration-url-modal .dialog_submit_button", { text() { @@ -63,11 +64,12 @@ export function show_generate_integration_url_modal(api_key: string): void { function update_url(): void { selected_integration = integration_input_dropdown_widget.value()!.toString(); if (selected_integration === default_integration_option.unique_id) { + $("#integration-url-stream_widget").prop("disabled", true); $integration_url.text(default_url_message); $dialog_submit_button.prop("disabled", true); return; } - + $("#integration-url-stream_widget").prop("disabled", false); const stream_id = stream_input_dropdown_widget.value(); const topic_name = $topic_input.val()!;