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


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


{% block page-target %}
{% trans "New user" %}
{% endblock page-target %}


{% block form-header %}
<h1>
  {% trans "New user" %}
</h1>
{% endblock %}


{% block form-extra %}
class="form-horizontal"
{% endblock form-extra%}


{% block form-body %}
<div class="form-body">
  {% with label_class="col-md-3" field_class="col-md-9" %}
  <fieldset>
    <legend>{% trans "Basic account settings" %}</legend>

    {% form_row form.username label_class field_class %}

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

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

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

  </fieldset>
  <fieldset>
    <legend>{% trans "Sign-in credentials" %}</legend>

    {% form_row form.email label_class field_class %}
    {% form_row form.new_password label_class field_class %}

  </fieldset>
  {% endwith %}
</div>
{% endblock form-body %}


{% block form-footer-class %}
col-md-offset-3
{% endblock form-footer-class %}


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