Rearranged order_detail.html
This commit is contained in:
parent
fa6901e679
commit
aab9464c6f
1 changed files with 109 additions and 76 deletions
|
@ -44,9 +44,13 @@
|
||||||
{% if order %}
|
{% if order %}
|
||||||
<strong>{% trans "Status:"%}</strong><br>
|
<strong>{% trans "Status:"%}</strong><br>
|
||||||
{% if order.status == 'Approved' %}
|
{% if order.status == 'Approved' %}
|
||||||
<strong class="text-success">{% trans "Approved" %}</strong>
|
<strong class="text-success">
|
||||||
|
{% trans "Approved" %}
|
||||||
|
</strong>
|
||||||
{% else %}
|
{% else %}
|
||||||
<strong class="text-danger">{% trans "Declined" %}</strong>
|
<strong class="text-danger">
|
||||||
|
{% trans "Declined" %}
|
||||||
|
</strong>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br><br>
|
<br><br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -59,11 +63,16 @@
|
||||||
{% if order %}
|
{% if order %}
|
||||||
{{user.name}}<br>
|
{{user.name}}<br>
|
||||||
{{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br>
|
{{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br>
|
||||||
{{order.billing_address.city}}, {{order.billing_address.country}}.
|
{{order.billing_address.city}},
|
||||||
|
{{order.billing_address.country}}.
|
||||||
{% else %}
|
{% else %}
|
||||||
{% with request.session.billing_address_data as billing_address %}
|
{% with request.session.billing_address_data as
|
||||||
{{billing_address|get_value_from_dict:'cardholder_name'}}<br> {{billing_address|get_value_from_dict:'street_address'}}, {{billing_address|get_value_from_dict:'postal_code'}}<br>
|
billing_address %}
|
||||||
{{billing_address|get_value_from_dict:'city'}}, {{billing_address|get_value_from_dict:'country'}}.
|
{{billing_address|get_value_from_dict:'cardholder_name'}}<br>
|
||||||
|
{{billing_address|get_value_from_dict:'street_address'}},
|
||||||
|
{{billing_address|get_value_from_dict:'postal_code'}}<br>
|
||||||
|
{{billing_address|get_value_from_dict:'city'}},
|
||||||
|
{{billing_address|get_value_from_dict:'country'}}.
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</address>
|
</address>
|
||||||
|
@ -75,10 +84,12 @@
|
||||||
<address>
|
<address>
|
||||||
<strong>{% trans "Payment Method:"%}</strong><br>
|
<strong>{% trans "Payment Method:"%}</strong><br>
|
||||||
{% if order %}
|
{% if order %}
|
||||||
{{order.cc_brand}} {% trans "ending in" %} **** {{order.last4}}<br>
|
{{order.cc_brand}} {% trans "ending in" %} ****
|
||||||
|
{{order.last4}}<br>
|
||||||
{{user.email}}
|
{{user.email}}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{cc_brand}} {% trans "ending in" %} **** {{cc_last4}}<br>
|
{{cc_brand}} {% trans "ending in" %} ****
|
||||||
|
{{cc_last4}}<br>
|
||||||
{{request.session.user.email}}
|
{{request.session.user.email}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</address>
|
</address>
|
||||||
|
@ -94,24 +105,47 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{% if request.session.specs %}
|
{% if request.session.specs %}
|
||||||
{% with request.session.specs as vm %}
|
{% with request.session.specs as vm %}
|
||||||
<p><b>{% trans "Cores"%}</b> <span class="pull-right">{{vm.cpu}}</span></p>
|
<p><b>{% trans "Cores"%}</b>
|
||||||
|
<span class="pull-right">{{vm.cpu}}</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>{% trans "Memory"%}</b> <span class="pull-right">{{vm.memory}} GB</span></p>
|
<p><b>{% trans "Memory"%}</b>
|
||||||
|
<span class="pull-right">{{vm.memory}} GB</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>{% trans "Disk space"%}</b> <span class="pull-right">{{vm.disk_size}} GB</span></p>
|
<p><b>{% trans "Disk space"%}</b>
|
||||||
|
<span class="pull-right">{{vm.disk_size}} GB</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>{% trans "Configuration"%}</b> <span class="pull-right">{{request.session.template.name}}</span></p>
|
<p><b>{% trans "Configuration"%}</b>
|
||||||
|
<span class="pull-right">{{request.session.template.name}}</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}} CHF</b><span class="dcl-price-month"> /{% trans "Month" %}</span></p></h4>
|
<h4>{% trans "Total"%}
|
||||||
|
<p class="pull-right">
|
||||||
|
<b>{{vm.price}}CHF</b>
|
||||||
|
<span class="dcl-price-month"> /{% trans "Month" %}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</h4>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><b>{% trans "Cores"%}</b> <span class="pull-right">{{vm.cores}}</span></p>
|
<p><b>{% trans "Cores"%}</b>
|
||||||
|
<span class="pull-right">{{vm.cores}}</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>{% trans "Memory"%}</b> <span class="pull-right">{{vm.memory}} GB</span></p>
|
<p><b>{% trans "Memory"%}</b>
|
||||||
|
<span class="pull-right">{{vm.memory}} GB</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>{% trans "Disk space"%}</b> <span class="pull-right">{{vm.disk_size}} GB</span></p>
|
<p><b>{% trans "Disk space"%}</b>
|
||||||
|
<span class="pull-right">{{vm.disk_size}} GB</span>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}} CHF</b><span class="dcl-price-month"> /{% trans "Month" %}</span></p></h4>
|
<h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}}
|
||||||
|
CHF</b><span
|
||||||
|
class="dcl-price-month"> /{% trans "Month" %}</span>
|
||||||
|
</p></h4>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -127,18 +161,12 @@
|
||||||
id="btn-create-vm"
|
id="btn-create-vm"
|
||||||
data-href="{% url 'hosting:order-confirmation' %}"
|
data-href="{% url 'hosting:order-confirmation' %}"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#createvm-modal">{% trans "Place order"%}
|
data-target="#createvm-modal">
|
||||||
|
{% trans "Place order"%}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
|
||||||
{% url 'hosting:payment' as payment_url %}
|
|
||||||
{% if payment_url in request.META.HTTP_REFERER %}
|
|
||||||
<div class=" content pull-right">
|
|
||||||
<a href="{% url 'hosting:virtual_machines'%}" ><button class="btn btn-info">{% trans "Finish Configuration"%}</button></a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -151,13 +179,18 @@
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close hidden" data-dismiss="modal"
|
<button type="button" class="close hidden" data-dismiss="modal"
|
||||||
aria-label="create-vm-close"><span aria-hidden="true">×</span>
|
aria-label="create-vm-close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="modal-icon"><i class="fa fa-cog fa-spin fa-3x fa-fw"></i><span class="sr-only">{% trans "Processing..." %}</span>
|
<div class="modal-icon">
|
||||||
|
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||||
|
<span class="sr-only">{% trans "Processing..." %}</span>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="modal-title" id="createvm-modal-title">{% trans "Hold tight, we are processing your request" %}</h4>
|
<h4 class="modal-title" id="createvm-modal-title">
|
||||||
|
{% trans "Hold tight, we are processing your request" %}
|
||||||
|
</h4>
|
||||||
<div class="modal-text" id="createvm-modal-body">
|
<div class="modal-text" id="createvm-modal-body">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -172,7 +205,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
var locale_date = moment.utc(document.getElementById("order-created_at").textContent,'YYYY-MM-DD HH:mm').toDate();
|
var locale_date = moment.utc(document.getElementById("order-created_at").textContent, 'YYYY-MM-DD HH:mm').toDate();
|
||||||
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
|
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
|
||||||
document.getElementById('order-created_at').innerHTML = locale_date;
|
document.getElementById('order-created_at').innerHTML = locale_date;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue