Added /renew endpoint to redirect to Blender Store renewal URL.

This commit is contained in:
2017-12-06 14:36:02 +01:00
parent 561db0428d
commit bff51e1e83
3 changed files with 49 additions and 8 deletions

View File

@@ -0,0 +1,28 @@
| {% extends "errors/layout.html" %}
| {% block title %}Renew | Blender Cloud{% endblock %}
| {% block head %}
noscript
meta(http-equiv="refresh", content="2; url=https://store.blender.org/renew-my-subscription.php")
| {% endblock %}
| {% block body %}
#error-container(class="error-404")
#error-box
.error-top-container
.error-title
i.pi-heart
| Renew your Blender Cloud subscription
.error-lead
p
='You are being forwarded to '
a(href='https://store.blender.org/renew-my-subscription.php') the Blender Store
=' to renew your subscription.'
.error-lead.extra
p
="If you aren't forwarded in a few seconds, use "
a(href="https://store.blender.org/renew-my-subscription.php") this direct link
=' instead.'
script.
// Use replace() so that the back button doesn't even visit this page.
window.location.replace('https://store.blender.org/renew-my-subscription.php');
| {% endblock %}

View File

@@ -6,6 +6,7 @@ style(type='text/css').
}
| {% endblock %}
| {% block body %}
| {% set renew_url = url_for('cloud.renew_subscription') %}
.container
#settings
| {% include 'users/settings/_sidebar.html'%}
@@ -15,19 +16,28 @@ style(type='text/css').
.settings-content
| {% if current_user.has_role('subscriber') %}
| {% if current_user.has_cap('has-subscription') %}
| {% if current_user.has_cap('subscriber') %}
h3.subscription-active
i.pi-check
| Your subscription is active
h4 Thank you for supporting us!
hr
p Subscription expires on: <strong>{{ store_user['expiration_date'][:10] }}</strong>
a(href="https://store.blender.org/my-account/subscriptions/") Manage your subscription on Blender Store
| {% else %}
h3.subscription-missing
i.pi-info
a(href="{{renew_url}}") Your subscription can be renewed
hr
p.text-danger Subscription expired on: <strong>{{ store_user['expiration_date'][:10] }}</strong>
p
a.btn.btn-success(href="{{renew_url}}") Renew now
| {% endif %}
| {% if 'demo' in groups %}
p
a(href="https://store.blender.org/my-account/subscriptions/") Manage your subscription on Blender Store
| {% elif 'demo' in groups %}
h3.subscription-demo
i.pi-heart-filled
| You have a free account
@@ -44,11 +54,9 @@ style(type='text/css').
a(href="https://store.blender.org/product/membership/") Get full access to Blender Cloud now!
| {% endif %}
| {% endif %}
hr
p
button#recheck_subscription.btn.btn-default(onclick="javascript:recheck_subscription(this)") Re-check my subscription
hr
script.