uncloud/uncloud_v3/app/templates/app/productorder_form.html

32 lines
1021 B
HTML

<h2>Ordering a {{ product }} instance for {{ timeframe }}</h2>
TODO: catch invalid timeframe
<form method="post" >
{% csrf_token %}
<div class="form-group">
<label for="product">Product</label>
<input type="text" class="form-control"
id="product" value={{product.slug}} readonly>
</div>
<div class="form-group">
<label for="timeframe">Timeframe</label>
<input type="text" class="form-control"
id="timeframe" value="{{timeframe.slug}}" readonly>
</div>
{% for res,price,currency in res_price %}
<div class="form-group">
<label for="{{res.slug}}">{{res.name}} {{res.unit}}
{{ price }}{{ currency.short_name }}/unit/{{ timeframe}}
{% if res.minimum_units %} (Min: {{res.minimum_units}}) {%endif%}
{% if res.maximum_units %} (Max: {{res.maximum_units}}) {%endif%}
</label>
<input type="text" class="form-control"
id="{{res.slug}}">
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">Submit</button>
</form>