Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upgrade: Add a dropdown to select billing cycle.
Aman Agrawald3363bab968c
diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.htmlindex 43138ae1171..8b2e38be931 100644--- a/templates/corporate/upgrade.html+++ b/templates/corporate/upgrade.html@@ -59,34 +59,19 @@<hr /><h2>Zulip Cloud Standard free trial</h2>{% endif %}- <div class="payment-schedule">+ <div class="payment-schedule input-box"><div id="autopay-error" class="alert alert-danger"></div>- <h3>{{ _("Payment schedule") }}</h3>{% if free_trial_days %}<p>You won't be charged during the free trial. You can also downgrade toZulip Cloud Free, our forever free plan, at any time.</p>{% endif %}- <label>- <input type="radio" name="schedule" value="monthly" checked/>- <div class="box">- <div class="schedule-time">{{ _("Pay monthly") }}</div>- <div class="schedule-amount">$<span id="autopay_monthly_price"></span>/user/month</div>- </div>- </label>- <label>- <input type="radio" name="schedule" value="annual"/>- <div class="box">- <div class="schedule-time annually">{{ _("Pay annually") }}</div>- <div class="schedule-amount">- $<span id="autopay_annual_price_per_month"></span>/user/month- <div class="schedule-amount-2">- ($<span id="autopay_annual_price"></span>/user/year)- </div>- </div>- </div>- </label>+ <select name="payment-schedule" id="payment-schedule-select">+ <option value="monthly" id="autopay_monthly_price"></option>+ <option value="annually" id="autopay_annual_price_per_month"></option>+ </select>+ <label for="payment-schedule-select">Payment schedule</label></div>{% if not manual_license_management %}diff --git a/web/src/billing/upgrade.ts b/web/src/billing/upgrade.tsindex 7c026561be7..682b69e25e5 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));