Update _calculator_form.html

This commit is contained in:
Arvind Tiwari 2018-04-20 17:54:23 +05:30 committed by GitHub
parent 1e97d0ba38
commit 8f6260b063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -1,14 +1,16 @@
{% load staticfiles i18n%}
{% if vm_pricing %}
<script type="application/javascript">
window.vat_inclusive = {% if vm_pricing.vat_inclusive %}true{% else %}false{% endif%};
window.vat_percentage = {% if vm_pricing.vat_percentage %}{{vm_pricing.vat_percentage}}{% else %}0{% endif%};
window.coresUnitPrice = {% if vm_pricing.cores_unit_price %}{{vm_pricing.cores_unit_price}}{% else %}0{% endif%};
window.ramUnitPrice = {% if vm_pricing.ram_unit_price %}{{vm_pricing.ram_unit_price}}{% else %}0{% endif%};
window.ssdUnitPrice = {% if vm_pricing.ssd_unit_price %}{{vm_pricing.ssd_unit_price}}{% else %}0{% endif%};
window.hddUnitPrice = {% if vm_pricing.hdd_unit_price %}{{vm_pricing.hdd_unit_price}}{% else %}0{% endif%};
</script>
<script type="application/javascript">
window.vat_inclusive = {% if vm_pricing.vat_inclusive %}true{% else %}false{% endif%};
window.vat_percentage = {{vm_pricing.vat_percentage|default:0}};
window.coresUnitPrice = {{vm_pricing.cores_unit_price|default:0}};
window.ramUnitPrice = {{vm_pricing.ram_unit_price|default:0}};
window.ssdUnitPrice = {{vm_pricing.ssd_unit_price|default:0}};
window.hddUnitPrice = {{vm_pricing.hdd_unit_price|default:0}};
</script>
{% endif %}
<form id="order_form" method="POST" action="{% url 'datacenterlight:index' %}" data-toggle="validator" role="form">
{% csrf_token %}
<div class="title">