mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
bots settings: Stop modal from getting closed when an error is shown.
This commit fixes the issue of error message not getting displayed when the `Full name` field, in bots settings, is given a duplicate name of an already created bot with the same name. We were closing the modal each time whether the request is successful or not. Hence, we now close the modal only when the request is successful and error is displayed on the modal otherwise. Fixes #18091.
This commit is contained in:
@@ -542,7 +542,6 @@ export function set_up() {
|
||||
loading.destroy_indicator(spinner);
|
||||
edit_button.show();
|
||||
errors.text(JSON.parse(xhr.responseText).msg).show();
|
||||
overlays.close_modal("#edit_bot_modal");
|
||||
},
|
||||
});
|
||||
},
|
||||
|
@@ -825,6 +825,10 @@ input[type="checkbox"] {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.bot_edit_errors {
|
||||
margin: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
#bots_lists_navbar .active a {
|
||||
background-color: hsl(0, 0%, 98%);
|
||||
}
|
||||
|
Reference in New Issue
Block a user