From 429dd10b750fdce83b36f5be823bb6da3235e601 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 22 Sep 2018 08:17:43 +0200 Subject: [PATCH] Modify dcl landing_payment.html to accomodate the new generic payment form --- .../datacenterlight/landing_payment.html | 72 +++++++++++-------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html index 4c43f41c..aa0edd35 100644 --- a/datacenterlight/templates/datacenterlight/landing_payment.html +++ b/datacenterlight/templates/datacenterlight/landing_payment.html @@ -67,36 +67,48 @@
-

{%trans "Your Order" %}

-
-
-

{% trans "Cores"%} {{request.session.specs.cpu|floatformat}}

-
-

{% trans "Memory"%} {{request.session.specs.memory|floatformat}} GB

-
-

{% trans "Disk space"%} {{request.session.specs.disk_size|floatformat}} GB

-
-

{% trans "Configuration"%} {{request.session.template.name}}

-
-

- {%trans "Total" %}   - - ({% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %}) - - {{request.session.specs.price|intcomma}} CHF/{% trans "Month" %} -

-
- {% if vm_pricing.discount_amount %} -

- {%trans "Discount" as discount_name %} - {{ vm_pricing.discount_name|default:discount_name }}   - - {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %} -

-

- ({% trans "Will be applied at checkout" %}) -

- {% endif %} -
+ {% if generic_payment_form %} +

{%trans "Make a payment" %}

+
+
+ {% for field in generic_payment_form %} + {% csrf_token %} + {% bootstrap_field field show_label=False type='fields'%} + {% endfor %} +

{{generic_payment_form.non_field_errors|striptags}}

+
+ {% else %} +

{%trans "Your Order" %}

+
+
+

{% trans "Cores"%} {{request.session.specs.cpu|floatformat}}

+
+

{% trans "Memory"%} {{request.session.specs.memory|floatformat}} GB

+
+

{% trans "Disk space"%} {{request.session.specs.disk_size|floatformat}} GB

+
+

{% trans "Configuration"%} {{request.session.template.name}}

+
+

+ {%trans "Total" %}   + + ({% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %}) + + {{request.session.specs.price|intcomma}} CHF/{% trans "Month" %} +

+
+ {% if vm_pricing.discount_amount %} +

+ {%trans "Discount" as discount_name %} + {{ vm_pricing.discount_name|default:discount_name }}   + - {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %} +

+

+ ({% trans "Will be applied at checkout" %}) +

+ {% endif %} +
+ {% endif %}