mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
settings_bots: Make it possible to add new bots from org settings.
Adding an "Add a new bot" button to Organization settings > Bots, which opens a `Add a new bot` form modal from `settings_bots.js`. Fixes #20309.
This commit is contained in:
committed by
Tim Abbott
parent
6db88f0d39
commit
0b3dd4755e
@@ -107,6 +107,7 @@ export function build_page() {
|
||||
realm_avatar_changes_disabled: page_params.realm_avatar_changes_disabled,
|
||||
realm_add_custom_emoji_policy: page_params.realm_add_custom_emoji_policy,
|
||||
can_add_emojis: settings_data.user_can_add_custom_emoji(),
|
||||
can_create_new_bots: settings_bots.can_create_new_bots(),
|
||||
realm_message_content_edit_limit_minutes: settings_org.get_realm_time_limits_in_minutes(
|
||||
"realm_message_content_edit_limit_seconds",
|
||||
),
|
||||
|
||||
@@ -693,4 +693,10 @@ export function set_up_humans() {
|
||||
export function set_up_bots() {
|
||||
section.bots.handle_events();
|
||||
section.bots.create_table();
|
||||
|
||||
$("#admin-bot-list .add-a-new-bot").on("click", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
settings_bots.add_a_new_bot();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user