Reformatted the template file and used opennebula_vm_template_id instead of template_id

This commit is contained in:
M.Ravi 2017-07-26 20:38:53 +02:00
parent 71e4fece58
commit f3cfe19e68

View file

@ -2,7 +2,7 @@
<form id="order_form" method="POST" action="" data-toggle="validator" role="form"> <form id="order_form" method="POST" action="" data-toggle="validator" role="form">
{% csrf_token %} {% csrf_token %}
<div class="title"> <div class="title">
<h3>{% trans "VM hosting" %} </h3> <h3>{% trans "VM hosting" %} </h3>
</div> </div>
<div class="price"> <div class="price">
<span id="total">15</span> <span id="total">15</span>
@ -17,28 +17,31 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="description input"> <div class="description input">
<i class="fa fa-minus-circle left" data-minus="cpu" aria-hidden="true"></i> <i class="fa fa-minus-circle left" data-minus="cpu" aria-hidden="true"></i>
<input class="input-price select-number" type="number" min="1" max="48" id="coreValue" name="cpu" data-error="{% trans 'Please enter a value in range 1 - 48.' %}" required> <input class="input-price select-number" type="number" min="1" max="48" id="coreValue" name="cpu"
<span> Core</span> data-error="{% trans 'Please enter a value in range 1 - 48.' %}" required>
<i class="fa fa-plus-circle right" data-plus="cpu" aria-hidden="true"></i> <span> Core</span>
<i class="fa fa-plus-circle right" data-plus="cpu" aria-hidden="true"></i>
</div> </div>
<div class="help-block with-errors"></div> <div class="help-block with-errors"></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="description input"> <div class="description input">
<i class="fa fa-minus-circle left" data-minus="ram" aria-hidden="true"></i> <i class="fa fa-minus-circle left" data-minus="ram" aria-hidden="true"></i>
<input id="ramValue" class="input-price select-number" type="number" min="2" max="200" name="ram" data-error="{% trans 'Please enter a value in range 2 - 200.' %}" required> <input id="ramValue" class="input-price select-number" type="number" min="2" max="200" name="ram"
<span> GB RAM</span> data-error="{% trans 'Please enter a value in range 2 - 200.' %}" required>
<i class="fa fa-plus-circle right" data-plus="ram" aria-hidden="true"></i> <span> GB RAM</span>
<i class="fa fa-plus-circle right" data-plus="ram" aria-hidden="true"></i>
</div> </div>
<div class="help-block with-errors"></div> <div class="help-block with-errors"></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="description input"> <div class="description input">
<i class="fa fa-minus-circle left" data-minus="storage" aria-hidden="true"></i> <i class="fa fa-minus-circle left" data-minus="storage" aria-hidden="true"></i>
<input id="storageValue" class="input-price select-number" type="number" min="10" max="2000" step="10" name="storage" data-error="{% trans 'Please enter a value in range 10 - 2000.' %}" required> <input id="storageValue" class="input-price select-number" type="number" min="10" max="2000" step="10"
<span>{% trans "GB Storage (SSD)" %}</span> name="storage" data-error="{% trans 'Please enter a value in range 10 - 2000.' %}" required>
<i class="fa fa-plus-circle right" data-plus="storage" aria-hidden="true"></i> <span>{% trans "GB Storage (SSD)" %}</span>
<i class="fa fa-plus-circle right" data-plus="storage" aria-hidden="true"></i>
</div> </div>
<div class="help-block with-errors"></div> <div class="help-block with-errors"></div>
</div> </div>
@ -46,7 +49,7 @@
<label for="config">OS</label> <label for="config">OS</label>
<select name="config" id=""> <select name="config" id="">
{% for template in templates %} {% for template in templates %}
<option value="{{template.id}}">{{template.name}} </option> <option value="{{template.opennebula_vm_template_id}}">{{template.name}}</option>
{% endfor %} {% endfor %}
</select> </select>
</div> </div>
@ -56,31 +59,38 @@
</div>--> </div>-->
<div class="form-group"> <div class="form-group">
<div class="description input justify-center"> <div class="description input justify-center">
<label for="name" class="control-label">{% trans "Name"%}</label> <label for="name" class="control-label">{% trans "Name"%}</label>
<input type="text" name="name" class="form-control" placeholder="{% trans 'Your Name'%}" data-minlength="3" data-error="{% trans 'Please enter your name.' %}" required> <input type="text" name="name" class="form-control" placeholder="{% trans 'Your Name'%}"
data-minlength="3" data-error="{% trans 'Please enter your name.' %}" required>
</div> </div>
<div class="help-block with-errors"> <div class="help-block with-errors">
{% for message in messages %} {% for message in messages %}
{% if 'name' in message.tags %} {% if 'name' in message.tags %}
<ul class="list-unstyled"><li> <ul class="list-unstyled">
<li>
{{ message|safe }} {{ message|safe }}
</li></ul> </li>
{% endif %} </ul>
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="description input justify-center"> <div class="description input justify-center">
<label for="email" class="control-label">{% trans "Email"%}</label> <label for="email" class="control-label">{% trans "Email"%}</label>
<input name="email" type="email" pattern="^[^@\s]+@([^@\s]+\.)+[^@\s]+$" class="form-control" placeholder="{% trans 'Your Email' %}" data-error="{% trans 'Please enter a valid email address.' %}" required> <input name="email" type="email" pattern="^[^@\s]+@([^@\s]+\.)+[^@\s]+$" class="form-control"
placeholder="{% trans 'Your Email' %}"
data-error="{% trans 'Please enter a valid email address.' %}" required>
</div> </div>
<div class="help-block with-errors"> <div class="help-block with-errors">
{% for message in messages %} {% for message in messages %}
{% if 'email' in message.tags %} {% if 'email' in message.tags %}
<ul class="list-unstyled"><li> <ul class="list-unstyled">
<li>
{{ message|safe }} {{ message|safe }}
</li></ul> </li>
{% endif %} </ul>
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>