eboutic_makecommand.jinja 1.6 KB
Newer Older
1 2
{% extends "core/base.jinja" %}

3 4 5 6
{% block title %}
{% trans %}Basket state{% endtrans %}
{% endblock %}

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
{% block content %}
<h3>{% trans %}Eboutic{% endtrans %}</h3>

<div>
    <p>{% trans %}Basket: {% endtrans %}</p>
    <table>
        <thead>
            <tr>
                <td>Article</td>
                <td>Quantity</td>
                <td>Unit price</td>
            </tr>
        </thead>
        <tbody>
            {% for item in basket.items.all() %}
            <tr>
                <td>{{ item.product_name }}</td>
                <td>{{ item.quantity }}</td>
                <td>{{ item.product_unit_price }}</td>
            </tr>
            {% endfor %}
        <tbody>
    </table>
Skia's avatar
Skia committed
30
    <p><strong>Total: </strong>{{ basket.get_total() }}</p>
Skia's avatar
Skia committed
31 32 33 34
    <form method="post" action="{{ settings.SITH_EBOUTIC_ET_URL }}">
        {% for (field_name,field_value) in et_request.items() -%}
        <input type="hidden" name="{{ field_name }}" value="{{ field_value }}">
        {% endfor %}
35 36
        <input type="submit" value="{% trans %}Pay with credit card{% endtrans %}" />
    </form>
37
    {% if basket.items.filter(type_id=settings.SITH_COUNTER_PRODUCTTYPE_REFILLING).exists() %}
Skia's avatar
Skia committed
38 39
    <p>{% trans %}AE account payment disabled because your basket contains refilling items.{% endtrans %}</p>
    {% else %}
40 41 42 43 44
    <form method="post" action="{{ url('eboutic:pay_with_sith') }}">
        {% csrf_token %}
        <input type="hidden" name="action" value="pay_with_sith_account">
        <input type="submit" value="{% trans %}Pay with Sith account{% endtrans %}" />
    </form>
Skia's avatar
Skia committed
45
    {% endif %}
46 47 48 49 50 51 52
</div>

{% endblock %}