copanier/copanier/templates/place_order.html

46 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block body %}
<article class="order">
<h3><a href="/livraison/{{ delivery.id }}">{{ delivery.producer }}</a> — Commande de «{{ person.email }}»</h3>
{% include "includes/delivery_head.html" %}
<form method="post">
<table class="order">
<tr>
<th class="product">Produit</th>
<th class="price">Prix</th>
{% if delivery.has_packing %}
<th class="packing">Conditionnement</th>
{% endif %}
<th class="amount">Quantité</th>
{% if delivery.status == delivery.ADJUSTMENT %}<th class="amount">Ajustement</th>{% endif %}</tr>
{% for product in delivery.products %}
<tr>
<th class="product">{{ product.label }}
{% if product.description or product.img %}
{% with unique_id=loop.index %}
{% include "includes/modal_product.html" %}
{% endwith %}
{% endif %}</p>
</th>
<td>{{ product.price }} €</td>
{% if delivery.has_packing %}
<td{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} class="missing" title="Les commandes individuelles ne correspondent pas aux conditionnements"{% endif %}>{{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} ({{ delivery.product_missing(product) }}){% endif %}</td>
{% endif %}
<td class="with-input"><input {% if delivery.status != delivery.OPEN %}type="text" readonly{% else%}type="number"{% endif%} min=0 name="wanted:{{ product.ref }}" value="{{ order[product].wanted }}"></td>
{% if delivery.status == delivery.ADJUSTMENT %}
<td class="with-input"><input type="number" name="adjustment:{{ product.ref }}" value="{{ order[product].adjustment }}" {% if not delivery.product_missing(product) %}readonly{% endif %}></td>
{% endif %}
</tr>
{% endfor %}
</table>
<p>Total: {{ order.total(delivery.products) if order else 0 }} €</p>
{% if delivery.is_passed %}
<p>Commande soldée: <input type="checkbox" name="paid" {% if order.paid %}checked{% endif %}></p>
{% endif %}
<input type="hidden" name="email" value="{{ person.email }}">
<input type="submit" value="Enregistrer la commande">
<a class="button" href="/livraison/{{ delivery.id }}/courriel?email={{ person.email }}">Envoyer par courriel</a>
</form>
</article>
{% endblock body %}