mirror of https://github.com/zulip/zulip.git
312 lines
18 KiB
HTML
312 lines
18 KiB
HTML
{% extends "zerver/portico.html" %}
|
|
{% set entrypoint = "billing" %}
|
|
|
|
{% block title %}
|
|
<title>{{ _("Billing") }} | Zulip</title>
|
|
{% endblock %}
|
|
|
|
{% block portico_content %}
|
|
<div id="billing-page" class="register-account flex full-page">
|
|
<div class="center-block new-style">
|
|
<div class="pitch">
|
|
<h1>Zulip Cloud billing for {{ org_name }}</h1>
|
|
</div>
|
|
<div class="alert alert-danger" id="error-message-box"></div>
|
|
{% if admin_access and has_active_plan %}
|
|
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" />
|
|
<div class="white-box">
|
|
<div id="billing-page-details">
|
|
<div class="input-box billing-page-field no-validation">
|
|
<label for="org_current_plan" class="inline-block label-title">Your plan</label>
|
|
<div id="org_current_plan" class="not-editable-realm-field">
|
|
{% if free_trial %}
|
|
{{ plan_name }} Free Trial
|
|
{% else %}
|
|
{{ plan_name }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="input-box billing-page-field no-validation">
|
|
<label for="org_billing_freqency" class="inline-block label-title">Billing frequency</label>
|
|
<div id="org_billing_freqency" class="not-editable-realm-field">
|
|
{{ billing_frequency }}
|
|
{% if switch_to_annual_at_end_of_cycle %}
|
|
<br />
|
|
Your plan will switch to annual billing on {{ renewal_date }}.
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% if automanage_licenses %}
|
|
<div class="input-box billing-page-field no-validation">
|
|
<label for="automatic-license-count" class="inline-block label-title">
|
|
Number of licenses
|
|
<a href="/help/zulip-cloud-billing#what-is-the-difference-between-automatic-and-manual-billing" target="_blank" rel="noopener noreferrer">
|
|
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
|
|
</a>
|
|
</label>
|
|
<div id="automatic-license-count" class="not-editable-realm-field">
|
|
{{ licenses }} (managed automatically)
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="input-box billing-page-field no-validation input-box-number">
|
|
<label for="current-manual-license-count" class="inline-block label-title">
|
|
Number of licenses for current billing period
|
|
<a href="/help/zulip-cloud-billing#what-is-the-difference-between-automatic-and-manual-billing" target="_blank" rel="noopener noreferrer">
|
|
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
|
|
</a>
|
|
</label>
|
|
<div class="number-input-with-label">
|
|
<form id="current-license-change-form">
|
|
<input min="{{ licenses }}" type="number" name="licenses" autocomplete="off" id="current-manual-license-count" class="short-width-number-input" data-original-value="{{ licenses }}" value="{{ licenses }}" required/>
|
|
</form>
|
|
<span class="licence-count-in-use">licenses ({{ seat_count }} in use)</span>
|
|
<button id="current-manual-license-count-update-button" class="license-count-update-button" disabled>
|
|
<span class="billing-button-text">Update</span>
|
|
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
|
|
</button>
|
|
</div>
|
|
<div id="current-license-change-error" class="alert alert-danger billing-page-error"></div>
|
|
</div>
|
|
{% if not downgrade_at_end_of_cycle %}
|
|
<div class="input-box billing-page-field no-validation input-box-number">
|
|
<label for="next-manual-license-count" class="inline-block label-title">
|
|
Number of licenses for next billing period
|
|
<a href="/help/zulip-cloud-billing#what-is-the-difference-between-automatic-and-manual-billing" target="_blank" rel="noopener noreferrer">
|
|
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
|
|
</a>
|
|
</label>
|
|
<div class="number-input-with-label">
|
|
<form id="next-license-change-form">
|
|
<input type="number" name="licenses_at_next_renewal" autocomplete="off" id="next-manual-license-count" class="short-width-number-input" data-original-value="{{ licenses_at_next_renewal }}" value="{{ licenses_at_next_renewal }}" required/>
|
|
</form>
|
|
<span class="licence-count-in-use">licenses ({{ seat_count }} in use)</span>
|
|
<button id="next-manual-license-count-update-button" class="license-count-update-button" disabled>
|
|
<span class="billing-button-text">Update</span>
|
|
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
|
|
</button>
|
|
</div>
|
|
<div id="next-license-change-error" class="alert alert-danger billing-page-error"></div>
|
|
</div>
|
|
{% endif %}
|
|
<div id="licensechange-success" class="alert alert-success billing-page-success">
|
|
Plan updated. The page will now reload.
|
|
</div>
|
|
{% endif %}
|
|
<div id="cardchange-error" class="alert alert-danger"></div>
|
|
<div class="input-box billing-page-field no-validation">
|
|
<label for="customer-payment-method" class="inline-block label-title">Payment method</label>
|
|
<div id="customer-payment-method" class="not-editable-realm-field">
|
|
{{ payment_method }}
|
|
</div>
|
|
</div>
|
|
{% if charge_automatically %}
|
|
<div class="user-stripe-card-update input-box billing-page-field no-validation">
|
|
<button class="user-stripe-card-update-button" id="update-card-button">
|
|
<span class="billing-button-text">Update card</span>
|
|
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
<div id="cardchange-success" class="alert alert-success billing-page-success">
|
|
Redirecting to Stripe checkout page for updating Card details.
|
|
</div>
|
|
<div class="input-box billing-page-field no-validation">
|
|
<div class="next-payment-info not-editable-realm-field">
|
|
{% if renewal_amount %}
|
|
{% if free_trial %}
|
|
Your plan will be upgraded to <strong>{{ plan_name }}</strong> on <strong>{{ renewal_date }}</strong> for
|
|
<strong>${{ renewal_amount }}</strong>.
|
|
{% elif downgrade_at_end_of_cycle %}
|
|
Your organization will be downgraded to <strong>Zulip Cloud Free</strong> at the end of the current billing
|
|
period (<strong>{{ renewal_date }}</strong>). You will lose access to unlimited search history and
|
|
<a href="/plans/">other features</a> of your current plan.
|
|
{% else %}
|
|
{% if charge_automatically %}
|
|
Your plan will automatically renew on <strong>{{ renewal_date }}</strong>.
|
|
{% else %}
|
|
Your next invoice is due on <strong>{{ renewal_date }}</strong>.
|
|
{% endif %}
|
|
<br />
|
|
Expected charge: <strong>${{ renewal_amount }}</strong>
|
|
{% endif %}
|
|
{% else %}
|
|
Your plan ends on <strong>{{ renewal_date }}</strong>, and does not renew.
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="input-box no-validation billing-page-field">
|
|
<label for="billing-contact" class="inline-block label-title">Billing contact</label>
|
|
<div id="billing-contact" class="not-editable-realm-field">
|
|
<a href="mailto:{{ stripe_email }}">{{ stripe_email }}</a>
|
|
</div>
|
|
</div>
|
|
<div id="planchange-error" class="alert alert-danger"></div>
|
|
<div id="planchange-input-section">
|
|
{% if free_trial %}
|
|
<div class="end-free-trial plan-toggle-action input-box billing-page-field no-validation" id="end-free-trial">
|
|
<button class="end-free-trial-button plan-toggle-action-button">
|
|
<span class="billing-button-text">End free trial</span>
|
|
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
|
|
</button>
|
|
</div>
|
|
{% elif downgrade_at_end_of_cycle %}
|
|
<div class="reactivate-current-plan plan-toggle-action input-box billing-page-field no-validation" id="reactivate-subscription">
|
|
<button class="reactivate-current-plan-button plan-toggle-action-button">
|
|
<span class="billing-button-text">Reactivate subscription</span>
|
|
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
|
|
</button>
|
|
</div>
|
|
{% else %}
|
|
<div class="cancel-current-plan plan-toggle-action input-box billing-page-field no-validation" id="cancel-subscription">
|
|
<button class="cancel-current-plan-button plan-toggle-action-button">
|
|
<span class="billing-button-text">Cancel plan</span>
|
|
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<form id="planchange-form">
|
|
{% if free_trial %}
|
|
<input name="status" type="hidden" value="{{ CustomerPlan.ENDED }}" />
|
|
{% elif downgrade_at_end_of_cycle %}
|
|
<input name="status" type="hidden" value="{{ CustomerPlan.ACTIVE }}" />
|
|
{% else %}
|
|
<input name="status" type="hidden" value="{{ CustomerPlan.DOWNGRADE_AT_END_OF_CYCLE }}" />
|
|
{% endif %}
|
|
</form>
|
|
<input name="status" type="hidden" value="{{ CustomerPlan.DOWNGRADE_AT_END_OF_CYCLE }}" />
|
|
<div id="planchange-success" class="alert alert-success billing-page-success">
|
|
Plan updated. The page will now reload.
|
|
</div>
|
|
{% if onboarding %}
|
|
<div id="onboarding-go-to-org" class="input-box upgrade-page-field">
|
|
<a class="not-editable-realm-field" href="/"><b>Go to your Zulip organization</b></a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<div class="support-link">
|
|
<p>
|
|
To make changes to your plan or view your billing history <a href="mailto:support@zulip.com">contact Zulip support</a>.
|
|
</p>
|
|
</div>
|
|
{% else %}
|
|
<!-- For sponsored or sponsorship pending organizations we redirect to /sponsorship page. -->
|
|
<!-- For organizations on free plan we redirect to /plans page. -->
|
|
<p>
|
|
You must be an organization owner or a billing administrator to view this page.
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div id="confirm-end-free-trial" class="micromodal" aria-hidden="true">
|
|
<div class="modal__overlay" tabindex="-1">
|
|
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="dialog_title">
|
|
<header class="modal__header">
|
|
<h1 class="modal__title dialog_heading">
|
|
Confirm end free trial
|
|
</h1>
|
|
<button class="modal__close" aria-label="{{ _('Close modal') }}" data-micromodal-close></button>
|
|
</header>
|
|
<main class="modal__content">
|
|
<p>
|
|
Are you sure you want to end free trial and downgrade plan to <strong>Zulip Free</strong>?
|
|
</p>
|
|
</main>
|
|
<footer class="modal__footer">
|
|
<button class="modal__btn dialog_exit_button" aria-label="{{ '(Close this dialog window)' }}" data-micromodal-close>{{ _('Cancel') }}</button>
|
|
<button class="modal__btn dialog_submit_button">
|
|
<span>{{ _('Confirm') }}</span>
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="confirm-licenses-modal-increase" class="micromodal" aria-hidden="true">
|
|
<div class="modal__overlay" tabindex="-1">
|
|
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="dialog_title">
|
|
<header class="modal__header">
|
|
<h1 class="modal__title dialog_heading">
|
|
Confirm adding licenses
|
|
</h1>
|
|
<button class="modal__close" aria-label="{{ _('Close modal') }}" data-micromodal-close></button>
|
|
</header>
|
|
<main class="modal__content">
|
|
<p>
|
|
Are you sure you want to increase the number of licenses from
|
|
<b><span class="current_license_count_holder"></span></b> to
|
|
<b><span class="new_license_count_holder"></span></b>?
|
|
</p>
|
|
<p>
|
|
You will be charged for
|
|
<b><span class="difference_license_count_holder"></span></b> additional licenses.
|
|
</p>
|
|
</main>
|
|
<footer class="modal__footer">
|
|
<button class="modal__btn dialog_exit_button" aria-label="{{ '(Close this dialog window)' }}" data-micromodal-close>{{ _('Cancel') }}</button>
|
|
<button class="modal__btn dialog_submit_button">
|
|
<span>{{ _('Confirm') }}</span>
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="confirm-licenses-modal-decrease" class="micromodal" aria-hidden="true">
|
|
<div class="modal__overlay" tabindex="-1">
|
|
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="dialog_title">
|
|
<header class="modal__header">
|
|
<h1 class="modal__title dialog_heading">
|
|
Confirm decreasing licenses
|
|
</h1>
|
|
<button class="modal__close" aria-label="{{ _('Close modal') }}" data-micromodal-close></button>
|
|
</header>
|
|
<main class="modal__content">
|
|
<p>
|
|
Are you sure you want to decrease the number of licenses from
|
|
<b><span class="current_license_count_holder"></span></b> to
|
|
<b><span class="new_license_count_holder"></span></b>?
|
|
</p>
|
|
<p>
|
|
Your organization will be limited to at most
|
|
<b><span class="new_license_count_holder"></span></b> users.
|
|
</p>
|
|
</main>
|
|
<footer class="modal__footer">
|
|
<button class="modal__btn dialog_exit_button" aria-label="{{ '(Close this dialog window)' }}" data-micromodal-close>{{ _('Cancel') }}</button>
|
|
<button class="modal__btn dialog_submit_button">
|
|
<span>{{ _('Confirm') }}</span>
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="confirm-cancel-subscription-modal" class="micromodal" aria-hidden="true">
|
|
<div class="modal__overlay" tabindex="-1">
|
|
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="dialog_title">
|
|
<header class="modal__header">
|
|
<h1 class="modal__title dialog_heading">
|
|
Downgrade {{ org_name }} to Zulip Cloud Free?
|
|
</h1>
|
|
<button class="modal__close" aria-label="{{ _('Close modal') }}" data-micromodal-close></button>
|
|
</header>
|
|
<main class="modal__content">
|
|
<p>
|
|
Your organization will be downgraded to <strong>Zulip Cloud Free</strong> at the end of the current billing
|
|
period ({{ renewal_date }}). You will lose access to unlimited search history and
|
|
<a href="/plans/">other features</a>
|
|
of your current plan. Are you sure you want to continue?
|
|
</p>
|
|
</main>
|
|
<footer class="modal__footer">
|
|
<button class="modal__btn dialog_exit_button" aria-label="{{ '(Close this dialog window)' }}" data-micromodal-close>{{ _('Never mind') }}</button>
|
|
<button class="modal__btn dialog_submit_button">
|
|
<span>{{ _('Downgrade') }}</span>
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|