billing: Change how flat discount on billing/upgrade page is displayed.

This commit is contained in:
Aman Agrawal 2024-01-10 10:23:23 +00:00 committed by Tim Abbott
parent 618cce03d6
commit 03254bea5b
3 changed files with 19 additions and 10 deletions

View File

@ -241,10 +241,6 @@
<label for="expected-charge">Expected next charge</label>
{% if not fixed_price %}
<div class="not-editable-realm-field">
{% if using_min_licenses_for_plan %}
<i>Minimum purchase for this plan: {{ min_licenses_for_plan }} licenses</i>
<br />
{% endif %}
${{ pre_discount_renewal_cents }} (${{ price_per_license }} x {{ licenses_at_next_renewal }} {{ 'user' if licenses_at_next_renewal == 1 else 'users' }} x
{% if switch_to_annual_at_end_of_cycle %}
12 months
@ -255,7 +251,8 @@
{%- endif -%})
{% if discounted_months_left != 0 %}
<br />
Discount: ${{ flat_discount }}/month off <i class="billing-page-discount">({{ discounted_months_left }} {{ "month" if discounted_months_left == 1 else "months" }} remaining)</i>
<span class="flat-discount-minus-sign"></span>
<span class="flat-discount-separator">${{ flat_discount }}/month off</span> <i class="billing-page-discount">({{ discounted_months_left }} {{ "month" if discounted_months_left == 1 else "months" }} remaining)</i>
{% endif %}
{% if discount_percent %}
<br />
@ -265,6 +262,9 @@
{% endif %}
</div>
<h1>${{ renewal_amount }}</h1>
{% if not fixed_price and using_min_licenses_for_plan %}
<i>Minimum purchase for this plan: {{ min_licenses_for_plan }} licenses</i>
{% endif %}
{% endif %}
{% else %}
Your plan ends on <strong>{{ renewal_date }}</strong>, and does not renew.

View File

@ -125,10 +125,6 @@
</span>
</label>
<div id="due-today" class="not-editable-realm-field">
{% if not manual_license_management and using_min_licenses_for_plan %}
<i>Minimum purchase for this plan: {{ min_licenses_for_plan }} licenses</i>
<br />
{% endif %}
$<span id="pre-discount-renewal-cents"></span>
($<span class="due-today-unit-price"></span> x
{% if not manual_license_management %}
@ -146,13 +142,17 @@
{% endif %}
{% if page_params.flat_discounted_months > 0 %}
<br/>
Discount: $<span class="flat-discounted-price"></span>/month off <i class="billing-page-discount">({{ page_params.flat_discounted_months }} {{ "month" if discounted_months_left == 1 else "months" }} remaining)</i>
<span class="flat-discount-minus-sign"></span>
<span class="flat-discount-separator">$<span class="flat-discounted-price"></span>/month off</span> <i class="billing-page-discount">({{ page_params.flat_discounted_months }} {{ "month" if page_params.flat_discounted_months == 1 else "months" }} remaining)</i>
{% endif %}
<h1>$<span class="due-today-price"></span></h1>
{% if free_trial_days %}
<i>Your actual bill will depend on the number of
active users in your organization.</i>
{% endif %}
{% if not manual_license_management and using_min_licenses_for_plan %}
<i>Minimum purchase for this plan: {{ min_licenses_for_plan }} licenses</i>
{% endif %}
</div>
</div>

View File

@ -738,3 +738,12 @@ input[name="licenses"] {
#account-deactivated-success-page-top-message {
margin-top: 10px;
}
.flat-discount-minus-sign {
position: absolute;
left: -10px;
}
.flat-discount-separator {
border-bottom: 1px solid hsl(0deg 0% 0%);
}