{% extends "admin/base_site.html" %}
{% load i18n admin_urls %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
    &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
    &rsaquo; <a href="{% url 'admin:core_user_changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
    &rsaquo; {% translate "Add passwordless user" %}
</div>
{% endblock %}

{% block content %}
<form method="post">
    {% csrf_token %}
    <fieldset class="module aligned">
        <p class="help">
            {% translate "Creates a user with no password and no OIDC sub. The account will be claimed automatically on first OIDC login that matches this email." %}
        </p>
        {% for field in form %}
            <div class="form-row{% if field.errors %} errors{% endif %}">
                {{ field.errors }}
                <div>
                    {{ field.label_tag }}
                    {{ field }}
                </div>
            </div>
        {% endfor %}
    </fieldset>
    <div class="submit-row">
        <input type="submit" value="{% translate 'Create' %}" class="default">
        <a href="{% url 'admin:core_user_changelist' %}" class="button cancel-link">{% translate 'Cancel' %}</a>
    </div>
</form>
{% endblock %}
