dynamicweb/hosting/templates/hosting/payment.html

176 lines
8.2 KiB
HTML
Raw Normal View History

{% 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 %}
{% block content %}
<!-- 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" %}&nbsp;
<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 }}&nbsp;&nbsp;<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>
</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 %}
{% 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">
{% 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>
{% 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 %}
{% 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 %}
{% endif %}
2017-10-03 12:48:18 +00:00
</p>
2017-07-15 14:09:51 +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">
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>
</div>
2017-10-03 12:48:18 +00:00
</div>
{% endfor %}
{% if card_list_len > 0 %}
2017-10-31 08:05:49 +00:00
<div class="another-card-text">{% trans "Use another card" %}</div>
{% endif %}
{% include "hosting/includes/_card_input.html" %}
</div>
2017-07-15 14:09:51 +00:00
</div>
{% endwith %}
2017-07-15 14:09:51 +00:00
</div>
</div>
</div>
</div>
</div>
<!-- stripe key data -->
{% if stripe_key %}
{% get_current_language as LANGUAGE_CODE %}
<script type="text/javascript">
2017-07-16 11:22:53 +00:00
window.processing_text = '{%trans "Processing" %}';
window.enter_your_card_text = '{%trans "Enter your credit card number" %}';
2017-07-15 14:09:51 +00:00
(function () {
window.stripeKey = "{{stripe_key}}";
window.current_lan = "{{LANGUAGE_CODE}}";
})();
</script>
{%endif%}
{% comment "Looks as if no more used. To test..." %}
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
<script type="text/javascript">
2017-07-15 14:09:51 +00:00
(function () {
window.hasCreditcard = true;
})();
</script>
{%endif%}
{% endcomment %}
{%endblock%}