Modify dcl landing_payment.html to accomodate the new generic

payment form
This commit is contained in:
PCoder 2018-09-22 08:17:43 +02:00
parent a7fa52490c
commit 429dd10b75

View file

@ -67,36 +67,48 @@
</div> </div>
<div class="dcl-payment-box"> <div class="dcl-payment-box">
<div class="dcl-payment-section"> <div class="dcl-payment-section">
<h3>{%trans "Your Order" %}</h3> {% if generic_payment_form %}
<hr class="top-hr"> <h3>{%trans "Make a payment" %}</h3>
<div class="dcl-payment-order"> <hr class="top-hr">
<p>{% trans "Cores"%} <strong class="pull-right">{{request.session.specs.cpu|floatformat}}</strong></p> <form role="form" id="generic-payment-form" method="post" action="" novalidate>
<hr> {% for field in generic_payment_form %}
<p>{% trans "Memory"%} <strong class="pull-right">{{request.session.specs.memory|floatformat}} GB</strong></p> {% csrf_token %}
<hr> {% bootstrap_field field show_label=False type='fields'%}
<p>{% trans "Disk space"%} <strong class="pull-right">{{request.session.specs.disk_size|floatformat}} GB</strong></p> {% endfor %}
<hr> <p class="text-danger">{{generic_payment_form.non_field_errors|striptags}}</p>
<p>{% trans "Configuration"%} <strong class="pull-right">{{request.session.template.name}}</strong></p> </form>
<hr> {% else %}
<p> <h3>{%trans "Your Order" %}</h3>
<strong>{%trans "Total" %}</strong>&nbsp;&nbsp; <hr class="top-hr">
<small> <div class="dcl-payment-order">
({% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %}) <p>{% trans "Cores"%} <strong class="pull-right">{{request.session.specs.cpu|floatformat}}</strong></p>
</small> <hr>
<strong class="pull-right">{{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}</strong> <p>{% trans "Memory"%} <strong class="pull-right">{{request.session.specs.memory|floatformat}} GB</strong></p>
</p> <hr>
<hr> <p>{% trans "Disk space"%} <strong class="pull-right">{{request.session.specs.disk_size|floatformat}} GB</strong></p>
{% if vm_pricing.discount_amount %} <hr>
<p class="mb-0"> <p>{% trans "Configuration"%} <strong class="pull-right">{{request.session.template.name}}</strong></p>
{%trans "Discount" as discount_name %} <hr>
<strong>{{ vm_pricing.discount_name|default:discount_name }}</strong>&nbsp;&nbsp; <p>
<strong class="pull-right text-primary">- {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %}</strong> <strong>{%trans "Total" %}</strong>&nbsp;&nbsp;
</p> <small>
<p> ({% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %})
({% trans "Will be applied at checkout" %}) </small>
</p> <strong class="pull-right">{{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}</strong>
{% endif %} </p>
</div> <hr>
{% if vm_pricing.discount_amount %}
<p class="mb-0">
{%trans "Discount" as discount_name %}
<strong>{{ vm_pricing.discount_name|default:discount_name }}</strong>&nbsp;&nbsp;
<strong class="pull-right text-primary">- {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %}</strong>
</p>
<p>
({% trans "Will be applied at checkout" %})
</p>
{% endif %}
</div>
{% endif %}
</div> </div>
</div> </div>
<div class="dcl-payment-box"> <div class="dcl-payment-box">