Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upgrade: Add some recommendation for user on payment failure.

Aman Agrawal2b68b300a118
diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html
index 82074790733..08b6bb5dd68 100644
--- a/templates/corporate/upgrade.html
+++ b/templates/corporate/upgrade.html
@@ -171,7 +171,7 @@
</span>
<object class="loader upgrade-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
</button>
- <div id="autopay-error" class="alert alert-danger upgrade-page-error"></div>
+ <div id="autopay-error" class="alert alert-danger upgrade-page-error hide"></div>
</div>
</form>
{% if error_message %}
diff --git a/web/src/billing/upgrade.ts b/web/src/billing/upgrade.ts
index 185e33910b3..d457b068284 100644
--- a/web/src/billing/upgrade.ts
+++ b/web/src/billing/upgrade.ts
@@ -45,6 +45,9 @@ 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.`);
},
);
});
diff --git a/web/styles/portico/billing.css b/web/styles/portico/billing.css
index 0f9fd4bd7d9..05ebb5f9dd3 100644
--- a/web/styles/portico/billing.css
+++ b/web/styles/portico/billing.css
@@ -613,3 +613,8 @@ input[name="licenses"] {
#upgrade-page-details .upgrade-add-card-container {
text-align: left;
}
+
+#autopay-error {
+ font-weight: 400;
+ margin-left: 0;
+}
diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css
index 9a7d14ccba5..0c9764bdc3e 100644
--- a/web/styles/portico/portico_signin.css
+++ b/web/styles/portico/portico_signin.css
@@ -478,7 +478,12 @@ html {
}
.alert {
- &:not(.alert-info, .billing-page-success, .upgrade-page-success) {
+ &:not(
+ .alert-info,
+ .billing-page-success,
+ .upgrade-page-success,
+ #autopay-error
+ ) {
padding: 0;
margin-bottom: 5px;
font-weight: 600;