mirror of https://github.com/zulip/zulip.git
ui_report: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes and variables to align with Zulip's no-abbreviations policy and streamline the search results.
This commit is contained in:
parent
1cc66fbad4
commit
afa537e35c
|
@ -68,7 +68,7 @@ export function generic_embed_error(error_html: string, remove_after?: number):
|
|||
}
|
||||
}
|
||||
|
||||
export function generic_row_button_error(xhr: JQuery.jqXHR, $btn: JQuery): void {
|
||||
export function generic_row_button_error(xhr: JQuery.jqXHR, $button: JQuery): void {
|
||||
let parsed;
|
||||
if (
|
||||
xhr.status >= 400 &&
|
||||
|
@ -76,9 +76,9 @@ export function generic_row_button_error(xhr: JQuery.jqXHR, $btn: JQuery): void
|
|||
(parsed = z.object({msg: z.string()}).safeParse(xhr.responseJSON)).success
|
||||
) {
|
||||
const $error = $("<p>").addClass("text-error").text(parsed.data.msg);
|
||||
$btn.closest("td").empty().append($error);
|
||||
$button.closest("td").empty().append($error);
|
||||
} else {
|
||||
$btn.text($t({defaultMessage: "Failed!"}));
|
||||
$button.text($t({defaultMessage: "Failed!"}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue