2016-04-22 13:36:38 +00:00
{% extends "hosting/base_short.html" %}
2018-03-27 14:08:09 +00:00
{% load staticfiles bootstrap3 i18n humanize %}
2017-08-31 10:24:01 +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-06-29 14:34:40 +00:00
{% block content %}
2016-04-22 13:36:38 +00:00
<!-- Credit card form -->
2017-07-16 21:22:41 +00:00
< div class = "dcl-order-container" >
2017-07-15 14:09:51 +00:00
< div class = "payment-container" >
2018-05-06 23:37:58 +00:00
< div class = "dcl-order-sec" >
< h3 > < strong > {%trans "Your Order" %}< / strong > < / h3 >
< div class = "row" >
< div class = "col-xs-6 col-sm-12" >
< div class = "dcl-order-table-header" >
< div class = "row" >
< div class = "col-sm-2" >
< div class = "tbl-header" >
{%trans "Cores" %}
< / div >
< / div >
< div class = "col-sm-4" >
< div class = "tbl-header tbl-header-center" >
{%trans "Memory" %}
< / div >
< / div >
< div class = "col-sm-3" >
< div class = "tbl-header tbl-header-center" >
{%trans "Disk space" %}
< / div >
< / div >
< div class = "col-sm-3" >
< div class = "tbl-header tbl-header-right" >
{%trans "Configuration" %}
< / div >
< / div >
< / div >
2017-07-15 14:09:51 +00:00
< / div >
< / div >
2018-05-06 23:37:58 +00:00
< div class = "col-xs-6 col-sm-12" >
< div class = "dcl-order-table-content" >
< div class = "row" >
< div class = "col-sm-2" >
< div class = "tbl-content" >
{{request.session.specs.cpu|floatformat}}
< / div >
< / div >
< div class = "col-sm-4" >
< div class = "tbl-content tbl-content-center" >
{{request.session.specs.memory|floatformat}} GB
< / div >
< / div >
< div class = "col-sm-3" >
< div class = "tbl-content tbl-content-center" >
{{request.session.specs.disk_size|floatformat|intcomma}} GB
< / div >
< / div >
< div class = "col-sm-3" >
< div class = "tbl-content tbl-content-right" >
{{request.session.template.name}}
< / div >
< / div >
< / div >
2017-07-15 14:09:51 +00:00
< / div >
2018-05-06 23:37:58 +00:00
< / div >
< / div >
< div class = "dcl-order-table-total" >
< div class = "row" >
< div class = "col-xs-6" >
< div class = "tbl-tot" >
{%trans "Total" %}
< span > {% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %}< / span >
< / div >
2017-07-15 14:09:51 +00:00
< / div >
2018-05-06 23:37:58 +00:00
< div class = "col-xs-6" >
< div class = "tbl-total" >
{{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}
< / div >
2017-07-15 14:09:51 +00:00
< / div >
< / div >
2018-05-06 23:37:58 +00:00
{% if vm_pricing.discount_amount %}
< hr class = "thin-hr" >
< div class = "row" >
< div class = "col-xs-6" >
< div class = "tbl-tot" >
{%trans "Discount" as discount_name %}
{{ vm_pricing.discount_name|default:discount_name }} < br >
< span > ({% trans "Will be applied at checkout" %})< / span >
< / div >
2017-07-15 14:09:51 +00:00
< / div >
2018-05-06 23:37:58 +00:00
< div class = "col-xs-6 text-right" >
< div class = "tbl-total" >
< div class = "text-primary" > - {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %}< / div >
2017-07-15 22:08:48 +00:00
< / div >
2017-07-15 14:09:51 +00:00
< / div >
< / div >
2018-05-06 23:37:58 +00:00
{% endif %}
2017-07-15 14:09:51 +00:00
< / div >
< / div >
2018-05-06 23:37:58 +00:00
< div class = "dcl-billing-sec" >
< div class = "row" >
< div class = "col-sm-5 col-md-6" >
< div class = "billing dcl-billing" >
< h3 > < b > {%trans "Billing Address"%}< / b > < / h3 >
< hr >
< form role = "form" id = "billing-form" method = "post" action = "" novalidate >
{% csrf_token %}
2018-06-12 09:11:37 +00:00
{% for field in form %}
2018-05-06 23:37:58 +00:00
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
< / form >
< / div >
2017-07-15 14:09:51 +00:00
< / div >
< div class = "col-xs-12 col-sm-7 col-md-6 creditcard-box dcl-creditcard" >
2017-10-21 21:12:53 +00:00
{% with card_list_len=cards_list|length %}
2017-07-15 14:09:51 +00:00
< h3 > < b > {%trans "Credit Card"%}< / b > < / h3 >
< hr >
< div >
2017-10-03 12:48:18 +00:00
< p >
2017-10-21 21:12:53 +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-21 21:12:53 +00:00
{% else %}
2017-10-03 12:48:18 +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-21 21:12:53 +00:00
{% endif %}
2017-10-03 12:48:18 +00:00
< / p >
2017-07-15 14:09:51 +00:00
< div >
2017-10-21 21:12:53 +00:00
{% 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" >
2017-10-21 22:21:08 +00:00
< a class = "btn choice-btn choice-btn-faded" href = "#" data-id_card = "{{card.id}}" > {% trans "SELECT" %}< / a >
2017-10-21 21:12:53 +00:00
< / div >
2017-10-03 12:48:18 +00:00
< / div >
2017-10-21 21:12:53 +00:00
{% endfor %}
{% if card_list_len > 0 %}
2017-10-31 08:05:49 +00:00
< div class = "another-card-text" > {% trans "Use another card" %}< / div >
2017-07-15 22:08:48 +00:00
{% endif %}
2017-10-21 21:12:53 +00:00
{% include "hosting/includes/_card_input.html" %}
2017-07-15 22:08:48 +00:00
< / div >
2017-07-15 14:09:51 +00:00
< / div >
2017-10-21 21:12:53 +00:00
{% endwith %}
2017-07-15 14:09:51 +00:00
< / div >
< / div >
< / div >
< / div >
2016-04-22 13:36:38 +00:00
< / div >
2017-05-11 05:11:33 +00:00
2016-04-26 06:16:03 +00:00
<!-- stripe key data -->
{% if stripe_key %}
2017-06-04 22:04:38 +00:00
{% get_current_language as LANGUAGE_CODE %}
2017-06-29 14:34:40 +00:00
< script type = "text/javascript" >
2017-07-16 11:22:53 +00:00
window.processing_text = '{%trans "Processing" %}';
2017-07-16 18:25:29 +00:00
window.enter_your_card_text = '{%trans "Enter your credit card number" %}';
2017-06-04 22:04:38 +00:00
2017-07-15 14:09:51 +00:00
(function () {
2017-06-04 22:04:38 +00:00
window.stripeKey = "{{stripe_key}}";
window.current_lan = "{{LANGUAGE_CODE}}";
})();
2016-04-26 06:16:03 +00:00
< / script >
{%endif%}
2018-06-12 06:13:48 +00:00
{% comment "Looks as if no more used. To test..." %}
2017-05-11 05:11:33 +00:00
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
2017-06-29 14:34:40 +00:00
< script type = "text/javascript" >
2017-07-15 14:09:51 +00:00
(function () {
window.hasCreditcard = true;
})();
2017-05-11 05:11:33 +00:00
< / script >
{%endif%}
2018-06-12 06:13:48 +00:00
{% endcomment %}
2016-04-22 13:36:38 +00:00
{%endblock%}