app-MAIL-temp/templates/dashboard/billing.html

114 lines
3.7 KiB
HTML
Raw Normal View History

2019-11-14 15:05:20 +01:00
{% extends 'default.html' %}
{% block title %}
Billing
{% endblock %}
{% block head %}
{% endblock %}
{% block default_content %}
2020-05-11 23:22:06 +02:00
<div class="card">
<div class="card-body">
<h1 class="h3 mb-5"> Billing </h1>
{% if sub.cancelled %}
<p>
You are on the <b>{{ sub.plan_name() }}</b> plan. <br>
You have canceled your subscription and it will end on {{ sub.next_bill_date.strftime("%Y-%m-%d") }}
</p>
<p class="alert alert-info">
If you change your mind you can subscribe again to SimpleLogin but
please note that this will be a completely
2020-05-11 23:22:06 +02:00
new subscription and
your payment method will be charged <b>immediately</b>. <br>
The period left in the current subscription isn't taken into account.
2020-05-11 23:22:06 +02:00
<br>
<a href="{{ url_for('dashboard.pricing') }}" class="btn btn-primary mt-2">Re-subscribe</a>
</p>
{% else %}
<p>
You are on the <b>{{ sub.plan_name() }}</b> plan. Thank you very much for supporting
SimpleLogin. 🙌 <br>
The next billing cycle starts at {{ sub.next_bill_date.strftime("%Y-%m-%d") }}.
</p>
<div class="mt-3">
Click here to update billing information on Paddle, our payment partner: <br>
<a class="btn btn-outline-success mt-2" href="{{ sub.update_url }}"> Update billing information </a>
</div>
<hr>
<div class="mt-6">
<h4>Change Plan</h4>
You can change the plan at any moment. <br>
Please note that the new billing cycle starts instantly
2021-04-12 10:14:35 +02:00
i.e. you will be charged <b>immediately</b> the annual fee ($30) when switching from monthly plan or vice-versa
2020-05-11 23:22:06 +02:00
<b>without pro rata computation </b>. <br>
To change the plan you can also cancel the current one and subscribe a new one <b>by the end</b> of this plan.
{% if sub.plan == PlanEnum.yearly %}
2021-01-25 10:45:18 +01:00
<form method="post" onsubmit="return confirm('This will change your current subscription plan, please confirm');">
2020-05-11 23:22:06 +02:00
<input type="hidden" name="form-name" value="change-monthly">
<button class="btn btn-outline-primary mt-2">Change to Monthly Plan</button>
</form>
{% else %}
2021-01-25 10:45:18 +01:00
<form method="post" onsubmit="return confirm('This will change your current subscription plan, please confirm');">
2020-05-11 23:22:06 +02:00
<input type="hidden" name="form-name" value="change-yearly">
<button class="btn btn-outline-primary mt-2">Change to Yearly Plan</button>
</form>
{% endif %}
</div>
<hr>
<div>
<h4>Cancel subscription</h4>
Don't want to protect your inbox anymore? <br>
2019-11-14 15:05:20 +01:00
2020-05-11 23:22:06 +02:00
<form method="post">
<input type="hidden" name="form-name" value="cancel">
2020-03-08 10:28:13 +01:00
2020-05-11 23:22:06 +02:00
<span class="cancel btn btn-outline-danger mt-2">
2020-03-08 10:28:13 +01:00
Cancel subscription <i class="fe fe-alert-triangle text-danger"></i>
</span>
2020-05-11 23:22:06 +02:00
</form>
2020-03-08 10:28:13 +01:00
2020-05-11 23:22:06 +02:00
</div>
{% endif %}
</div>
2019-11-14 15:05:20 +01:00
</div>
2020-03-08 10:28:13 +01:00
{% endblock %}
{% block script %}
<script>
2019-11-14 15:05:20 +01:00
2020-03-08 10:28:13 +01:00
$(".cancel").on("click", function (e) {
2020-04-30 22:37:39 +02:00
let that = $(this);
bootbox.confirm({
message: "This operation is irreversible, please confirm.",
buttons: {
confirm: {
label: 'Cancel subscription',
className: 'btn-danger'
},
cancel: {
label: 'Close',
className: 'btn-outline-primary'
}
2020-03-08 10:28:13 +01:00
},
2020-04-30 22:37:39 +02:00
callback: function (result) {
if (result) {
that.closest("form").submit();
}
2020-03-08 10:28:13 +01:00
}
2020-04-30 22:37:39 +02:00
})
2020-03-08 10:28:13 +01:00
});
2019-11-14 15:05:20 +01:00
2020-03-08 10:28:13 +01:00
</script>
2019-11-14 15:05:20 +01:00
{% endblock %}