{% extends "cfp/event/base.html" %}
{% load i18n %}
{% load bootstrap4 %}
{% block title %}{% trans "Login" %} :: {{ request.event }}{% endblock %}
{% block content %}
    <h2>{% trans "Welcome back!" %}</h2>
    <p>
        {% blocktrans trimmed %}
            You do not need an account to view the event, or submit feedback, or receive
            schedule updates. You'll only need an account if you participate in the
            event as speaker or as orga.
        {% endblocktrans %}
    </p>
    <p>
        {% blocktrans trimmed %}
            If you already created a submission for a different event on this server, you can re-use your account
            to log in for this event.
        {% endblocktrans %}
    </p>
    <form action="" class="labelless-password-input-form" method="post">
        {% csrf_token %}
        {% bootstrap_form_errors form %}
        {{ form.media }}
        <div class="row">
            <div class="col-md-6">
                <h4 class="text-center">{% trans "I already have an account" %}</h4>
                {% bootstrap_field form.login_username layout="inline" %}
                {% bootstrap_field form.login_password layout="inline" %}
                <button type="submit" class="btn btn-lg btn-success btn-block">
                    {% trans "Log in" %}
                </button>
                <a class="btn btn-block btn-link" href="{{ request.event.urls.reset }}">
                    {% trans "Reset password" %}
                </a>
            </div>
            <div class="col-md-6">
                <h4 class="text-center">{% trans "I need a new account" %}</h4>
                {% bootstrap_field form.register_username layout="inline" %}
                {% bootstrap_field form.register_email layout="inline" %}
                {% bootstrap_field form.register_password layout="inline" %}
                {% bootstrap_field form.register_password_repeat layout="inline" %}
                <button type="submit" class="btn btn-lg btn-info btn-block">
                    {% trans "Register" %}
                </button>
            </div>
        </div>
    </form>
{% endblock %}
