{% extends "suff/base.html" %}

{% block content %}
<p class="muted">Crew-Ansicht</p>
<h2>Neuen Benutzer anlegen</h2>

<p>Name eingeben. PIN ist optional — kann später bei Bedarf gesetzt werden.</p>

{% if error %}<p class="error">{{ error }}</p>{% endif %}

<form method="post" action="{% url 'suff:staff_register' %}">
    {% csrf_token %}
    <label>
        Name
        <input type="text" name="name" maxlength="150" required autofocus
               value="{{ prefill_name }}" />
    </label>
    <label>
        PIN (optional, 3 Ziffern)
        <input type="text" name="pin" inputmode="numeric" pattern="[0-9]{3}"
               maxlength="3" autocomplete="off" value="{{ prefill_pin }}" />
    </label>
    <button type="submit" class="btn-primary">Anlegen</button>
</form>

<div class="logout-form">
    <a href="{% url 'suff:staff_index' %}" class="link-btn link-btn-secondary">Zurück</a>
</div>
{% endblock %}
