From d3363bab968c639cb507a8596e2806189e1bc51e Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Fri, 10 Nov 2023 11:50:17 +0000 Subject: [PATCH] upgrade: Add a dropdown to select billing cycle. --- templates/corporate/upgrade.html | 27 ++++++--------------------- web/src/billing/upgrade.ts | 9 ++++++--- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html index 43138ae117..8b2e38be93 100644 --- a/templates/corporate/upgrade.html +++ b/templates/corporate/upgrade.html @@ -59,34 +59,19 @@

Zulip Cloud Standard free trial

{% endif %} -
+
-

{{ _("Payment schedule") }}

{% if free_trial_days %}

You won't be charged during the free trial. You can also downgrade to Zulip Cloud Free, our forever free plan, at any time.

{% endif %} - - + +
{% if not manual_license_management %} diff --git a/web/src/billing/upgrade.ts b/web/src/billing/upgrade.ts index 7c026561be..682b69e25e 100644 --- a/web/src/billing/upgrade.ts +++ b/web/src/billing/upgrade.ts @@ -40,9 +40,12 @@ export const initialize = (): void => { helpers.update_charged_amount(prices, helpers.schedule_schema.parse(this.value)); }); - $("#autopay_annual_price").text(helpers.format_money(prices.annual)); - $("#autopay_annual_price_per_month").text(helpers.format_money(prices.annual / 12)); - $("#autopay_monthly_price").text(helpers.format_money(prices.monthly)); + $("#autopay_annual_price_per_month").text( + `Pay annually ($${helpers.format_money(prices.annual / 12)}/user/month)`, + ); + $("#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));