mirror of https://github.com/zulip/zulip.git
upgrade: Avoid duplicate errors accumulating.
This commit is contained in:
parent
2b68b300a1
commit
e4d3d4b31d
|
@ -23,6 +23,11 @@ export const initialize = (): void => {
|
|||
$("#org-upgrade-button").on("click", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
// Clear the error box in case this is a repeat request.
|
||||
const $error_box = $("#autopay-error");
|
||||
$error_box.text("");
|
||||
$error_box.hide();
|
||||
|
||||
$("#org-upgrade-button-text").hide();
|
||||
$("#org-upgrade-button .upgrade-button-loader").show();
|
||||
helpers.create_ajax_request(
|
||||
|
@ -45,7 +50,6 @@ export const initialize = (): void => {
|
|||
() => {
|
||||
$("#org-upgrade-button-text").show();
|
||||
$("#org-upgrade-button .upgrade-button-loader").hide();
|
||||
const $error_box = $("#autopay-error");
|
||||
const error_text = $error_box.text();
|
||||
$error_box.text(`${error_text} Please fix this issue or use a different card.`);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue