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


{% block title %}
{{ target.username }} | {{ active_link.name }} | {{ block.super }}
{% endblock title %}


{% block page-target %}
{{ target.username }}
{% endblock page-target %}


{% block form-header %}
<h1>
  {{ target.username }}
</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>
  <fieldset>
    <legend>{% trans "Avatar" %}</legend>

    {% form_row form.is_avatar_banned label_class field_class %}
    {% form_row form.avatar_ban_user_message label_class field_class %}
    {% form_row form.avatar_ban_staff_message label_class field_class %}

  </fieldset>
  <fieldset>
    <legend>{% trans "Signature" %}</legend>

    {% form_row form.signature label_class field_class %}
    {% form_row form.is_signature_banned label_class field_class %}
    {% form_row form.signature_ban_user_message label_class field_class %}
    {% form_row form.signature_ban_staff_message label_class field_class %}

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


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