{% load i18n %}
{% load ibanformat %}
{% load bootstrap3 %}

{% if details or code %}
    <p>{% blocktrans trimmed %}
        After completing your purchase, we will ask you to transfer the money to the following
        bank account, using a personal reference code:
    {% endblocktrans %}</p>

    {% if not code %}<div class="user-select-none" data-toggle="tooltip" title="{% trans "Please do not yet start a payment. We'll assign you a personal reference code after you completed the order." %}">{% endif %}
    {% if settings.bank_details_type == "sepa" %}
        <dl class="dl-horizontal">
            <dt>{% trans "Account holder" %}: </dt><dd>{{ settings.bank_details_sepa_name }}</dd>
            <dt>{% trans "IBAN" %}: </dt><dd>{{ settings.bank_details_sepa_iban|ibanformat }}</dd>
            <dt>{% trans "BIC" %}: </dt><dd>{{ settings.bank_details_sepa_bic }}</dd>
            <dt>{% trans "Bank" %}: </dt><dd>{{ settings.bank_details_sepa_bank }}</dd>
        </dl>
    {% endif %}

    {{ details|linebreaks }}
    {% if not code %}</div>{% endif %}

    {% if code %}
        <dl class="dl-horizontal">
            <dt>{% trans "Reference code (important):" %} </dt><dd><strong>{{ code }}</strong></dd>
        </dl>
    {% else %}
        <p>
            <strong>
                {% trans "We will assign you a personal reference code to use after you completed the order." %}
            </strong>
        </p>
    {% endif %}
{% else %}
    <p>{% blocktrans trimmed %}
        After completing your purchase, we will ask you to transfer the money to our bank account, using a personal
        reference code.
    {% endblocktrans %}</p>
{% endif %}
{% if form.fields %}
    <div class="col-md-12">
        {% bootstrap_form form layout='inline' %}
    </div>
{% endif %}
