copanier/kaba/templates/place_order.html
2019-03-23 21:53:33 +01:00

27 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% block body %}
<article class="order">
<h3>{{ delivery.producer }} — Commande de «{{ person }}»</h3>
{% include "includes/delivery_head.html" %}
<form method="post">
<table class="order">
<tr><th class="product">Produit</th><th class="price">Prix</th><th class="amount">Quantité</th></tr>
{% for product in delivery.products %}
<tr>
<th class="product">{{ product.name }}
{% if product.description or product.img %}
{% with unique_id=loop.index %}
{% include "includes/modal_product.html" %}
{% endwith %}
{% endif %}</p>
</th>
<td>{{ product.price }} €</td><td class="with-input"><input type="number" name="{{ product.ref }}" value="{{ order.get_quantity(product) }}"></td></tr>
{% endfor %}
</table>
<p>Total: {{ order.total(delivery.products) if order else 0 }} €</p>
<input type="hidden" name="email" value="{{ person }}">
<input type="submit" value="Valider la commande">
</form>
</article>
{% endblock body %}