{% extends "pretixpresale/organizers/base.html" %}
{% load i18n %}
{% load eventurl %}
{% load urlreplace %}
{% load bootstrap3 %}
{% block title %}{% trans "Log in" %}{% endblock %}
{% block content %}
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <h2>
                {% blocktrans trimmed with org=request.organizer.name %}
                    Sign in to your account at {{ org }}
                {% endblocktrans %}
            </h2>
            <form action="" method="post">
                {% csrf_token %}
                {% if request.organizer.settings.customer_accounts_native %}
                    {% bootstrap_form form %}
                    <div class="form-group buttons">
                        <button type="submit" class="btn btn-primary btn-lg btn-block">
                            {% trans "Log in" %}
                        </button>
                    </div>
                {% endif %}
                {% for provider in providers %}
                    {% if provider.is_active %}
                        <a href="{% eventurl request.organizer "presale:organizer.customer.login" provider=provider.pk %}?{{ request.META.QUERY_STRING }}"
                           class="btn btn-primary btn-lg btn-block">
                            {{ provider.button_label }}
                        </a>
                    {% endif %}
                {% endfor %}
                {% if request.organizer.settings.customer_accounts_native %}
                    <div class="row">
                        <div class="col-md-6">
                            <a class="btn btn-link btn-block"
                               href="{% eventurl request.organizer "presale:organizer.customer.register" %}">
                                {% trans "Create account" %}
                            </a>
                        </div>
                        <div class="col-md-6">
                            <a class="btn btn-link btn-block"
                               href="{% eventurl request.organizer "presale:organizer.customer.resetpw" %}">
                                {% trans "Reset password" %}
                            </a>
                        </div>
                    </div>
                {% endif %}
            </form>
        </div>
    </div>
    <p>&nbsp;</p>
{% endblock %}
