dynamicweb/hosting/templates/hosting/payment.html

181 lines
8.3 KiB
HTML
Raw Normal View History

{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% block content %}
<!-- Credit card form -->
2017-07-15 14:09:51 +00:00
<div class="dcl-order-container 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>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-2 col-lg-2 tbl-header">
Cores
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
Memory
</div>
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 tbl-header">
Disk space
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
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-2 col-lg-2 tbl-content">
1
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
2 GB
</div>
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 tbl-content">
10 GB
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
CentOS 7
</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">
Total <span>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">15CHF</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 %}
2017-07-15 14:09:51 +00:00
{% 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>{% trans '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.' %}</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>
2017-07-07 19:37:58 +00:00
2017-07-15 14:09:51 +00:00
<div class="row">
<br>
<div class="col-xs-12>
<p>
{% trans " You are not making any payment yet. After submitting your card
information,
you
will be taken to the Confirm Order Page.
" %}
</p>
</div>
<div class="col-xs-12">
<div class="col-xs-6 pull-right">
<button style="width: 100px; float: right; font-style: normal; font-weight: bold; position: absolute; right: 0;"
id="payment_button_with_creditcard" class="btn btn-success"
type="submit">
{% trans "Submit" %}
</button>
</div>
</div>
</div>
{% else %}
2017-07-15 14:09:51 +00:00
<form role="form" id="payment-form" novalidate>
<div class="row">
<div class="form-group col-xs-12">
<div id="card-element">
<!-- a Stripe Element will be inserted here. -->
</div>
</div>
</div>
<div id="card-errors" role="alert"></div>
<div class="row">
2017-07-15 14:09:51 +00:00
<br>
<div class="col-xs-12">
<p style="font-family: Lato;border: 1px solid #a1a1a1;border-radius: 3px; padding: 5px;">
{% trans "You are not making any payment yet. After submitting your card
information, you will be taken to the Confirm Order Page." %}</p>
</div>
<div class="col-xs-12">
<div class="col-xs-6 pull-right">
<button style="width: 100px; float: right; font-style: normal; font-weight: bold; position: absolute; right: 0;"
class="btn btn-success" 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>
2017-07-15 14:09:51 +00:00
{% if paymentError %}
<div class="row">
<div class="col-xs-12">
<p>
{% bootstrap_alert paymentError alert_type='danger' %}
</p>
</div>
</div>
{% endif %}
2017-07-15 14:09:51 +00:00
</form>
{% endif %}
2017-07-15 14:09:51 +00:00
</div>
</div>
</div>
</div>
</div>
</div>
<!-- stripe key data -->
{% if stripe_key %}
{% get_current_language as LANGUAGE_CODE %}
<script type="text/javascript">
2017-07-15 14:09:51 +00:00
(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">
2017-07-15 14:09:51 +00:00
(function () {
window.hasCreditcard = true;
})();
</script>
{%endif%}
{%endblock%}