mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
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 6db88f0d39 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.
This commit is contained in:
@@ -26,24 +26,18 @@ import * as user_profile from "./user_profile";
|
|||||||
const OUTGOING_WEBHOOK_BOT_TYPE = "3";
|
const OUTGOING_WEBHOOK_BOT_TYPE = "3";
|
||||||
const EMBEDDED_BOT_TYPE = "4";
|
const EMBEDDED_BOT_TYPE = "4";
|
||||||
|
|
||||||
export function hide_errors() {
|
|
||||||
$("#bot_table_error").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
const focus_tab = {
|
const focus_tab = {
|
||||||
active_bots_tab() {
|
active_bots_tab() {
|
||||||
$("#bots_lists_navbar .active").removeClass("active");
|
$("#bots_lists_navbar .active").removeClass("active");
|
||||||
$("#bots_lists_navbar .active-bots-tab").addClass("active");
|
$("#bots_lists_navbar .active-bots-tab").addClass("active");
|
||||||
$("#active_bots_list").show();
|
$("#active_bots_list").show();
|
||||||
$("#inactive_bots_list").hide();
|
$("#inactive_bots_list").hide();
|
||||||
hide_errors();
|
|
||||||
},
|
},
|
||||||
inactive_bots_tab() {
|
inactive_bots_tab() {
|
||||||
$("#bots_lists_navbar .active").removeClass("active");
|
$("#bots_lists_navbar .active").removeClass("active");
|
||||||
$("#bots_lists_navbar .inactive-bots-tab").addClass("active");
|
$("#bots_lists_navbar .inactive-bots-tab").addClass("active");
|
||||||
$("#active_bots_list").hide();
|
$("#active_bots_list").hide();
|
||||||
$("#inactive_bots_list").show();
|
$("#inactive_bots_list").show();
|
||||||
hide_errors();
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -190,7 +184,6 @@ function update_add_bot_button() {
|
|||||||
|
|
||||||
export function update_bot_permissions_ui() {
|
export function update_bot_permissions_ui() {
|
||||||
update_bot_settings_tip();
|
update_bot_settings_tip();
|
||||||
hide_errors();
|
|
||||||
update_add_bot_button();
|
update_add_bot_button();
|
||||||
$("#id_realm_bot_creation_policy").val(page_params.realm_bot_creation_policy);
|
$("#id_realm_bot_creation_policy").val(page_params.realm_bot_creation_policy);
|
||||||
}
|
}
|
||||||
@@ -243,7 +236,6 @@ export function add_a_new_bot() {
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success() {
|
success() {
|
||||||
hide_errors();
|
|
||||||
create_avatar_widget.clear();
|
create_avatar_widget.clear();
|
||||||
dialog_widget.close_modal();
|
dialog_widget.close_modal();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,6 +31,5 @@
|
|||||||
<ol class="bots_list required-text" id="inactive_bots_list" data-empty="{{t 'You have no inactive bots.' }}">
|
<ol class="bots_list required-text" id="inactive_bots_list" data-empty="{{t 'You have no inactive bots.' }}">
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div id="bot_table_error" class="alert alert-error hide"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user