{% extends theme("layout.html") %}
{% import "forms.html" as forms with context %}

{% block content %}
    <div class="moin-form">
        {{ forms.render_errors(form) }}

        {% if 'username' in login_inputs or 'password' in login_inputs %}
            <h2>{{ _('Moin login') }}</h2>
            {{ gen.form.open(form, method="post", action=url_for('frontend.login')) }}
                <dl>
                    {% if 'username' in login_inputs %}
                        {{ forms.render(form['username']) }}
                    {% endif %}
                    {% if 'password' in login_inputs %}
                        {{ forms.render(form['password']) }}
                    {% endif %}
                </dl>
                {{ forms.render(form['nexturl']) }}
                {{ forms.render(form['submit']) }}
                {{ forms.render_submit(form) }}
            {{ gen.form.close() }}
        {% endif %}

    </div>
{% endblock %}
