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: Remove invoice payment instructions.

Aman Agrawal6cadf333fb83
diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html
index 578d838537f..4024e53249c 100644
--- a/templates/corporate/upgrade.html
+++ b/templates/corporate/upgrade.html
@@ -127,69 +127,6 @@
</form>
</div>
</div>
-
- <div id="invoice">
- <div id="invoice-error" class="alert alert-danger"></div>
- <div id="invoice-input-section">
- <form id="invoice-form" method="post">
- {% if onboarding and free_trial_days %}
- <p><b>Not ready to start your trial?</b> <a href="/">Continue with the Zulip Cloud Free plan</a>.</p>
- <hr />
- <h2>Zulip Cloud Standard free trial</h2>
- {% endif %}
- <input type="hidden" name="signed_seat_count" value="{{ signed_seat_count }}" />
- <input type="hidden" name="salt" value="{{ salt }}" />
- <input type="hidden" name="billing_modality" value="send_invoice" />
- <div class="payment-schedule">
- <h3>{{ _("Payment schedule") }}</h3>
- <label>
- <input type="radio" name="schedule" value="annual" checked />
- <div class="box">
- <div class="schedule-time annually">{{ _("Pay annually") }}</div>
- <div class="schedule-amount">
- $<span id="invoice_annual_price_per_month"></span>/user/month
- <div class="schedule-amount-2">
- ($<span id="invoice_annual_price"></span>/user/year)
- </div>
- </div>
- </div>
- </label>
- </div>
- <p>
- {% if free_trial_days %}
- Enter the number of users you would like to pay for.<br />
- We'll email you an invoice after the free trial.
- Invoices can be paid by ACH transfer or credit card.
- {% else %}
- Enter the number of users you would like to pay for.<br />
- We'll email you an invoice in 1-2 hours. Invoices can be paid by
- ACH transfer or credit card.
- {% endif %}
- </p>
- <h4>Number of licenses (minimum {{ min_invoiced_licenses }})</h4>
- <input type="number" min="{{ min_invoiced_licenses }}" autocomplete="off"
- id="invoiced_licenses" name="licenses" required/><br />
- <!-- Disabled buttons do not fire any events, so we need a container div that isn't disabled for tippyjs to work -->
- <div class="upgrade-button-container" {% if is_demo_organization %}data-tippy-content="{% trans %}Convert demo organization before upgrading.{% endtrans %}"{% endif %}>
- <button type="submit" id="invoice-button" class="stripe-button-el invoice-button" {% if is_demo_organization %}disabled{% endif %}>
- Buy Standard
- </button>
- </div>
- </form>
- </div>
- <div id="invoice-loading">
- <div class="zulip-loading-logo">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 773.12 773.12">
- <circle cx="386.56" cy="386.56" r="386.56"/>
- <path d="M566.66 527.25c0 33.03-24.23 60.05-53.84 60.05H260.29c-29.61 0-53.84-27.02-53.84-60.05 0-20.22 9.09-38.2 22.93-49.09l134.37-120c2.5-2.14 5.74 1.31 3.94 4.19l-49.29 98.69c-1.38 2.76.41 6.16 3.25 6.16h191.18c29.61 0 53.83 27.03 53.83 60.05zm0-281.39c0 20.22-9.09 38.2-22.93 49.09l-134.37 120c-2.5 2.14-5.74-1.31-3.94-4.19l49.29-98.69c1.38-2.76-.41-6.16-3.25-6.16H260.29c-29.61 0-53.84-27.02-53.84-60.05s24.23-60.05 53.84-60.05h252.54c29.61 0 53.83 27.02 53.83 60.05z"/>
- </svg>
- </div>
- <div id="invoice_loading_indicator"></div>
- </div>
- <div id="invoice-success" class="alert alert-success">
- Upgrade complete! The page will now reload.
- </div>
- </div>
</div>
<div class="support-link">
<p>
diff --git a/web/src/billing/upgrade.ts b/web/src/billing/upgrade.ts
index 682b69e25e5..92b697db115 100644
--- a/web/src/billing/upgrade.ts
+++ b/web/src/billing/upgrade.ts
@@ -5,7 +5,6 @@ import type {Prices} from "./helpers";
import {page_params} from "./page_params";
export const initialize = (): void => {
- helpers.set_tab("upgrade");
$("#add-card-button").on("click", (e) => {
const license_management = $<HTMLInputElement>(
"input[type=radio][name=license_management]:checked",
@@ -20,17 +19,6 @@ export const initialize = (): void => {
window.location.replace(response_data.stripe_session_url);
});
});
-
- $("#invoice-button").on("click", (e) => {
- if (!helpers.is_valid_input($("#invoiced_licenses"))) {
- return;
- }
- e.preventDefault();
- helpers.create_ajax_request("/json/billing/upgrade", "invoice", [], "POST", () =>
- window.location.replace("/billing/"),
- );
- });
-
const prices: Prices = {
annual: page_params.annual_price * (1 - page_params.percent_off / 100),
monthly: page_params.monthly_price * (1 - page_params.percent_off / 100),
@@ -46,15 +34,6 @@ export const initialize = (): void => {
$("#autopay_monthly_price").text(
`Pay monthly ($${helpers.format_money(prices.monthly)}/user/month)`,
);
- $("#invoice_annual_price").text(helpers.format_money(prices.annual));
- $("#invoice_annual_price_per_month").text(helpers.format_money(prices.annual / 12));
-
- helpers.update_charged_amount(
- prices,
- helpers.schedule_schema.parse(
- $<HTMLInputElement>("input[type=radio][name=schedule]:checked").val(),
- ),
- );
};
$(() => {