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:
Yogesh Sirsat
2022-09-16 16:10:13 +05:30
committed by Tim Abbott
parent 6db88f0d39
commit 0b3dd4755e
3 changed files with 10 additions and 1 deletions

View File

@@ -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();
});
}