From 07180432835973f65a50fa75a6797762c9ea2d9d Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Fri, 13 Jan 2023 20:10:03 +0530 Subject: [PATCH] bot_settings: Remove "#bot_table_error" element. We do not use "#bot_table_error" element to show any errors anymore. It was previously used to show the error if bot creation failed but since 6db88f0d394fc8 moved bot creation to a modal, we now show error, if any, inside the modal itself. This commit also removes the hide_errors function since the error element itself is removed. --- static/js/settings_bots.js | 8 -------- static/templates/settings/bot_settings.hbs | 1 - 2 files changed, 9 deletions(-) diff --git a/static/js/settings_bots.js b/static/js/settings_bots.js index 564440f1dd..ac4ceeb6c2 100644 --- a/static/js/settings_bots.js +++ b/static/js/settings_bots.js @@ -26,24 +26,18 @@ import * as user_profile from "./user_profile"; const OUTGOING_WEBHOOK_BOT_TYPE = "3"; const EMBEDDED_BOT_TYPE = "4"; -export function hide_errors() { - $("#bot_table_error").hide(); -} - const focus_tab = { active_bots_tab() { $("#bots_lists_navbar .active").removeClass("active"); $("#bots_lists_navbar .active-bots-tab").addClass("active"); $("#active_bots_list").show(); $("#inactive_bots_list").hide(); - hide_errors(); }, inactive_bots_tab() { $("#bots_lists_navbar .active").removeClass("active"); $("#bots_lists_navbar .inactive-bots-tab").addClass("active"); $("#active_bots_list").hide(); $("#inactive_bots_list").show(); - hide_errors(); }, }; @@ -190,7 +184,6 @@ function update_add_bot_button() { export function update_bot_permissions_ui() { update_bot_settings_tip(); - hide_errors(); update_add_bot_button(); $("#id_realm_bot_creation_policy").val(page_params.realm_bot_creation_policy); } @@ -243,7 +236,6 @@ export function add_a_new_bot() { processData: false, contentType: false, success() { - hide_errors(); create_avatar_widget.clear(); dialog_widget.close_modal(); }, diff --git a/static/templates/settings/bot_settings.hbs b/static/templates/settings/bot_settings.hbs index 3b14566482..beafdb1c44 100644 --- a/static/templates/settings/bot_settings.hbs +++ b/static/templates/settings/bot_settings.hbs @@ -31,6 +31,5 @@
-