2018-01-07 19:26:54 +00:00
{% extends "datacenterlight/base_hosting.html" %}
2018-03-27 15:40:21 +00:00
{% load staticfiles bootstrap3 i18n cms_tags humanize %}
2017-09-01 17:36:57 +00:00
2017-09-04 18:54:18 +00:00
{% block css_extra %}
< link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css" / >
{% endblock css_extra %}
2017-09-01 17:36:57 +00:00
{% block navbar %}
{% include "datacenterlight/includes/_navbar.html" %}
{% endblock navbar %}
{% block content %}
<!-- Credit card form -->
< div class = "dcl-order-container" >
< div class = "payment-container" >
2017-09-06 21:17:57 +00:00
< div class = "dcl-payment-grid" >
< div class = "dcl-payment-box" >
2017-09-05 18:42:13 +00:00
< div class = "dcl-payment-section" >
2017-09-07 14:26:34 +00:00
{% if request.user.is_authenticated %}
< div class = "dcl-payment-user" >
< h4 > {% trans "Welcome back" %} {{request.user.name}}!< / h4 >
< p > {% trans "Review your billing address and card details and proceed to make payment." %}< / p >
2017-09-05 18:42:13 +00:00
< / div >
2017-09-07 14:26:34 +00:00
{% else %}
< h3 > {%trans "Log in" %}< / h3 >
< hr class = "top-hr" >
< p style = "margin-bottom: 20px;" > {% blocktrans %}Already signed up?< br > By logging in you can retrieve saved billing information.{% endblocktrans %}< / p >
2017-10-07 10:59:40 +00:00
< form role = "form" id = "login-form" method = "post" action = "" novalidate >
2017-09-07 14:26:34 +00:00
{% for field in login_form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
2017-10-08 11:50:43 +00:00
< p class = "text-danger" > {{login_form.non_field_errors|striptags}}< / p >
2017-09-07 14:26:34 +00:00
< input type = 'hidden' name = 'next' value = '{{request.path}}' / >
< div class = "form-group text-right" >
2017-10-07 10:59:40 +00:00
< button type = "submit" class = "btn btn-wide btn-vm-contact" name = "login_form" > {% trans "LOGIN" %}< / button >
2017-09-07 14:26:34 +00:00
< / div >
< / form >
< p >
{% trans "Don't have an account yet?" %}< br >
{% trans "You can sign up by filling in the information below." %}< br >
2017-12-12 20:02:18 +00:00
< a href = "{% url 'hosting:reset_password' %}" target = "_blank" > {% trans "Forgot password?" %}< / a > or < a href = "{% url 'hosting:resend_activation_link' %}" target = "_blank" > {% trans "Resend activation link" %}?< / a >
2017-09-07 14:26:34 +00:00
< / p >
{% endif %}
2017-09-05 18:42:13 +00:00
< / div >
2017-09-04 18:54:18 +00:00
< / div >
2017-09-06 21:17:57 +00:00
< div class = "dcl-payment-box" >
2017-09-05 18:42:13 +00:00
< div class = "dcl-payment-section" >
2017-09-07 14:26:34 +00:00
{% if not request.user.is_authenticated %}
< h3 > < b > {%trans "Sign up"%}< / b > < / h3 >
{% else %}
< h3 > < b > {%trans "Billing Address"%}< / b > < / h3 >
{% endif %}
2017-09-06 21:17:57 +00:00
< hr class = "top-hr" >
2017-09-08 20:40:25 +00:00
{% for message in messages %}
{% if 'duplicate_email' in message.tags %}
< p class = "text-danger" > {{message}}< / p >
{% endif %}
{% endfor %}
2017-09-01 17:36:57 +00:00
< form role = "form" id = "billing-form" method = "post" action = "" novalidate >
{% csrf_token %}
2017-10-08 11:50:43 +00:00
{% for field in billing_address_form %}
2017-09-01 17:36:57 +00:00
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
< / form >
< / div >
2017-09-05 18:42:13 +00:00
< / div >
2017-09-12 20:25:58 +00:00
< div class = "dcl-payment-box" >
< div class = "dcl-payment-section" >
< h3 > {%trans "Your Order" %}< / h3 >
< hr class = "top-hr" >
< div class = "dcl-payment-order" >
< p > {% trans "Cores"%} < strong class = "pull-right" > {{request.session.specs.cpu|floatformat}}< / strong > < / p >
< hr >
< p > {% trans "Memory"%} < strong class = "pull-right" > {{request.session.specs.memory|floatformat}} GB< / strong > < / p >
< hr >
< p > {% trans "Disk space"%} < strong class = "pull-right" > {{request.session.specs.disk_size|floatformat}} GB< / strong > < / p >
< hr >
< p > {% trans "Configuration"%} < strong class = "pull-right" > {{request.session.template.name}}< / strong > < / p >
< hr >
2018-05-06 23:37:58 +00:00
< p >
< strong > {%trans "Total" %}< / strong >
< small >
({% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %})
< / small >
< strong class = "pull-right" > {{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}< / strong >
< / p >
< hr >
{% if vm_pricing.discount_amount %}
< p class = "mb-0" >
{%trans "Discount" as discount_name %}
< strong > {{ vm_pricing.discount_name|default:discount_name }}< / strong >
< strong class = "pull-right text-primary" > - {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %}< / strong >
< / p >
< p >
({% trans "Will be applied at checkout" %})
< / p >
{% endif %}
2017-09-12 20:25:58 +00:00
< / div >
< / div >
< / div >
2017-09-06 21:17:57 +00:00
< div class = "dcl-payment-box" >
2017-09-05 18:42:13 +00:00
< div class = "dcl-payment-section" >
2017-10-28 21:44:06 +00:00
{% with card_list_len=cards_list|length %}
2017-09-01 17:36:57 +00:00
< h3 > < b > {%trans "Credit Card"%}< / b > < / h3 >
2017-09-06 21:17:57 +00:00
< hr class = "top-hr" >
2017-09-07 14:26:34 +00:00
< p >
2017-10-28 21:44:06 +00:00
{% if card_list_len > 0 %}
2017-10-31 08:05:49 +00:00
{% blocktrans %}Please select one of the cards that you used before or fill in your credit card information below. We are using < a href = "https://stripe.com" target = "_blank" > Stripe< / a > for payment and do not store your information in our database.{% endblocktrans %}
2017-10-28 21:44:06 +00:00
{% else %}
2017-09-08 18:16:29 +00:00
{% blocktrans %}Please fill in your credit card information below. We are using < a href = "https://stripe.com" target = "_blank" > Stripe< / a > for payment and do not store your information in our database.{% endblocktrans %}
2017-10-28 21:44:06 +00:00
{% endif %}
2017-09-07 14:26:34 +00:00
< / p >
2017-10-28 21:44:06 +00:00
< div >
{% for card in cards_list %}
< div class = "credit-card-info" >
< div class = "col-xs-6 no-padding" >
< h5 class = "billing-head" > {% trans "Credit Card" %}< / h5 >
< h5 class = "membership-lead" > {% trans "Last" %} 4: ***** {{card.last4}}< / h5 >
< h5 class = "membership-lead" > {% trans "Type" %}: {{card.brand}}< / h5 >
< / div >
< div class = "col-xs-6 text-right align-bottom" >
< a class = "btn choice-btn choice-btn-faded" href = "#" data-id_card = "{{card.id}}" > {% trans "SELECT" %}< / a >
< / div >
< / div >
{% endfor %}
{% if card_list_len > 0 %}
2018-07-04 00:03:08 +00:00
< div class = "new-card-head" >
< div class = "row" >
< div class = "col-xs-6" >
< h4 > {% trans "Add a new credit card" %}< / h4 >
< / div >
2018-07-05 21:06:47 +00:00
< div class = "col-xs-6 text-right new-card-button-margin" >
2018-07-04 00:03:08 +00:00
< button data-toggle = "collapse" data-target = "#newcard" class = "btn choice-btn" >
< span class = "fa fa-plus" > < / span > {% trans "NEW CARD" %}
< / button >
< / div >
< / div >
< / div >
< div id = "newcard" class = "collapse" >
< hr class = "thick-hr" >
< div class = "card-details-box" >
< h3 > {%trans "New Credit Card" %}< / h3 >
< hr >
{% include "hosting/includes/_card_input.html" %}
< / div >
< / div >
{% else%}
{% include "hosting/includes/_card_input.html" %}
2017-10-28 21:44:06 +00:00
{% endif %}
< / div >
{% endwith %}
2017-09-01 17:36:57 +00:00
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- stripe key data -->
{% if stripe_key %}
{% get_current_language as LANGUAGE_CODE %}
< script type = "text/javascript" >
window.processing_text = '{%trans "Processing" %}';
window.enter_your_card_text = '{%trans "Enter your credit card number" %}';
(function () {
window.stripeKey = "{{stripe_key}}";
window.current_lan = "{{LANGUAGE_CODE}}";
})();
< / script >
{%endif%}
{%endblock%}