{% extends "misago/admin/generic/form.html" %}
{% load i18n misago_admin_form %}


{% block title %}
{% trans "New user" context "admin user form" %} | {{ active_link.name }} | {{ block.super }}
{% endblock title %}


{% block form-header %}
{% trans "New user" context "admin user form" %}
{% endblock %}


{% block form-body %}
<div class="form-fieldset">
  <fieldset>
    <legend>{% trans "Basic account settings" context "admin user form" %}</legend>

    {% form_row form.username %}

    {% if 'rank' in form.fields %}
      {% form_row form.rank %}
    {% endif %}

    {% form_row form.title %}
    {% form_row form.roles %}

    {% if 'staff_level' in form.fields %}
      {% form_row form.staff_level %}
    {% endif %}

  </fieldset>
</div>
<div class="form-fieldset">
  <fieldset>
    <legend>{% trans "Sign-in credentials" context "admin user form" %}</legend>

    {% form_row form.email %}
    {% form_row form.new_password %}
  </fieldset>
</div>
{% endblock form-body %}


{% block form-footer %}
<button class="btn btn-primary btn-sm">{% trans "Save user" context "admin user form" %}</button>
{% endblock form-footer %}
