mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
ui_report: Do not pass jQuery element to the html method.
Although it works, this feature is not documented.
This commit is contained in:
committed by
Tim Abbott
parent
9e08c6db93
commit
fd45ef57fa
@@ -61,9 +61,8 @@ export function generic_embed_error(error_html) {
|
|||||||
|
|
||||||
export function generic_row_button_error(xhr, btn) {
|
export function generic_row_button_error(xhr, btn) {
|
||||||
if (xhr.status >= 400 && xhr.status < 500) {
|
if (xhr.status >= 400 && xhr.status < 500) {
|
||||||
btn.closest("td").html(
|
const $error = $("<p>").addClass("text-error").text(JSON.parse(xhr.responseText).msg);
|
||||||
$("<p>").addClass("text-error").text(JSON.parse(xhr.responseText).msg),
|
btn.closest("td").empty().append($error);
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
btn.text($t({defaultMessage: "Failed!"}));
|
btn.text($t({defaultMessage: "Failed!"}));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user