196 lines
10 KiB
HTML
196 lines
10 KiB
HTML
{% extends "hosting/base_short.html" %}
|
|
{% load staticfiles bootstrap3 i18n %}
|
|
{% block content %}
|
|
<!-- Credit card form -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
|
|
<div class="dcl-order-container">
|
|
<div class="payment-container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-sec">
|
|
<h3><strong>{%trans "Your Order" %}</strong></h3>
|
|
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-header">
|
|
<div class="col-xs-12 col-sm-2 col-md-1 col-lg-1 tbl-header">
|
|
{%trans "Cores" %}
|
|
</div>
|
|
<div class="col-xs-12 col-sm-3 col-md-4 col-lg-4 tbl-header">
|
|
{%trans "Memory" %}
|
|
</div>
|
|
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-header">
|
|
{%trans "Disk space" %}
|
|
</div>
|
|
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
|
|
{%trans "Configuration" %}
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-content">
|
|
<div class="col-xs-12 col-sm-2 col-md-1 col-lg-1 tbl-content">
|
|
{{request.session.specs.cpu|floatformat}}
|
|
</div>
|
|
<div class="col-xs-12 col-sm-3 col-md-4 col-lg-4 tbl-content">
|
|
{{request.session.specs.memory|floatformat}} GB
|
|
</div>
|
|
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-content">
|
|
{{request.session.specs.disk_size|floatformat}} GB
|
|
</div>
|
|
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
|
|
{{request.session.template.name}}
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-table-total">
|
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-tot tbl-no-padding">
|
|
{%trans "Total" %} <span>{%trans "including VAT" %}</span>
|
|
</div>
|
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding">
|
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"></div>
|
|
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-total">{{request.session.specs.price}}
|
|
CHF
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-billing-sec">
|
|
<div class="col-xs-12 col-sm-5 col-md-6 billing dcl-billing">
|
|
<h3><b>{%trans "Billing Address"%}</b></h3>
|
|
<hr>
|
|
<form role="form" id="billing-form" method="post" action="" novalidate>
|
|
{% for field in form %}
|
|
{% csrf_token %}
|
|
{% bootstrap_field field show_label=False type='fields'%}
|
|
{% endfor %}
|
|
{% bootstrap_form_errors form type='non_fields'%}
|
|
</form>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-7 col-md-6 creditcard-box dcl-creditcard">
|
|
<h3><b>{%trans "Credit Card"%}</b></h3>
|
|
<hr>
|
|
<div>
|
|
<div>
|
|
<p>
|
|
{% 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 %}
|
|
</p>
|
|
</div>
|
|
<br>
|
|
<div>
|
|
{% if credit_card_data.last4 %}
|
|
<form role="form" id="payment-form-with-creditcard" novalidate>
|
|
<h5 class="billing-head">Credit Card</h5>
|
|
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
|
|
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
|
|
<input type="hidden" name="credit_card_needed" value="false"/>
|
|
</form>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<p>
|
|
{% blocktrans %}
|
|
You are not making any payment yet. After submitting your card
|
|
information, you will be taken to the Confirm Order Page.
|
|
{% endblocktrans %}
|
|
</p>
|
|
</div>
|
|
<div class="col-xs-12">
|
|
<div class="col-xs-6 pull-right">
|
|
<button id="payment_button_with_creditcard" class="btn btn-success stripe-payment-btn"
|
|
type="submit">
|
|
{%trans "Submit" %}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% else %}
|
|
<form action="" id="payment-form-new" method="POST">
|
|
<input type="hidden" name="token"/>
|
|
<div class="group">
|
|
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-9 credit-card-goup">
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 card-element card-number-element">
|
|
<label>{%trans "Card Number" %}</label>
|
|
<div id="card-number-element" class="field my-input"></div>
|
|
</div>
|
|
<div class="col-xs-5 col-sm-3 col-md-3 col-lg-3 card-element card-expiry-element">
|
|
<label>{%trans "Expiry Date" %}</label>
|
|
<div id="card-expiry-element" class="field my-input"></div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-2 col-md-6 col-lg-7 hide-mobile"></div>
|
|
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-2 card-element card-cvc-element">
|
|
<label>{%trans "CVC" %}</label>
|
|
<div id="card-cvc-element" class="field my-input"></div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 card-element brand">
|
|
<label>{%trans "Card Type" %}</label>
|
|
<i class="pf pf-credit-card" id="brand-icon"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="card-errors" role="alert"></div>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<p class="card-warning-content">
|
|
{% blocktrans %}
|
|
You are not making any payment yet. After submitting your card
|
|
information, you will be taken to the Confirm Order Page.
|
|
{% endblocktrans %}
|
|
</p>
|
|
</div>
|
|
<div class="col-xs-12">
|
|
<div class="col-xs-6 pull-right">
|
|
<button class="btn btn-success stripe-payment-btn" type="submit">{%trans "Submit" %}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" style="display:none;">
|
|
<div class="col-xs-12">
|
|
<p class="payment-errors"></p>
|
|
</div>
|
|
</div>
|
|
{% if paymentError %}
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<p>
|
|
{% bootstrap_alert paymentError alert_type='danger' %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</form>
|
|
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</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%}
|
|
|
|
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
|
|
<script type="text/javascript">
|
|
(function () {
|
|
window.hasCreditcard = true;
|
|
})();
|
|
</script>
|
|
|
|
{%endif%}
|
|
|
|
{%endblock%}
|