{% load i18n %}
{% load l10n %}
{% load commadecimal %}
{% load dotdecimal %}
{% load ibanformat %}
{% load money %}
{% load unidecode %}
{% load rich_text %}

{% if pending_description %}
    {{ pending_description|rich_text }}
{% endif %}
<p>{% blocktrans trimmed %}
    Please transfer the full amount to the following bank account:
{% endblocktrans %}</p>

<div class="row">
    <div class="{% if settings.bank_details_type == "sepa" %}col-md-6{% else %}col-md-12{% endif %} col-xs-12">
        <p>
            {% if settings.bank_details_type == "sepa" %}
                <strong>{% trans "Account holder" %}:</strong> {{ settings.bank_details_sepa_name }}<br>
                <strong>{% trans "IBAN" %}:</strong> {{ settings.bank_details_sepa_iban|ibanformat }}<br>
                <strong>{% trans "BIC" %}:</strong> {{ settings.bank_details_sepa_bic }}<br>
                <strong>{% trans "Bank" %}:</strong> {{ settings.bank_details_sepa_bank }}<br>
            {% endif %}
            {% if details %}
                {{ details|linebreaksbr }}<br>
            {% endif %}
            <strong>{% trans "Amount:" %}</strong> {{ amount|money:event.currency }}<br/>
            <strong>{% trans "Reference code (important):" %} {{ code }}</strong>
        </p>
        <p>
            {% trans "After you sent the bank transfer, you can close this window. We will send you an email as soon as we received your payment." %}
        </p>
    </div>
    {% if settings.bank_details_type == "sepa" %}
        <div class="col-md-3 col-sm-6 hidden-xs text-center">
            BezahlCode<br>
            <a href="bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}">
                <script type="text/plain" data-size="150" data-replace-with-qr>bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}</script>
            </a>
            <p>&nbsp;</p>
        </div>
        <div class="col-md-3 col-sm-6 hidden-xs text-center">
            GiroCode / EPC-QR<br>
            <script type="text/plain" data-size="150" data-replace-with-qr>BCD
002
2
SCT
{{ settings.bank_details_sepa_bic }}
{{ settings.bank_details_sepa_name|unidecode }}
{{ settings.bank_details_sepa_iban }}
{{ event.currency }}{{ amount|dotdecimal }}


{{ code }}

            </script>
        </div>
        <div class="visible-xs-block text-center">
            <p>
                <a href="bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}" class="btn btn-default">
                    {% trans "Open banking app" %}
                </a><br>
                <small>{% trans "Requires that the app supports BezahlCode" %}</small>
            </p>
        </div>
    {% endif %}
</div>
