{% extends "board_base.html" %}
{% load i18n %}

{% block sub_title %}{% trans "Edit forum profile" %}{% endblock sub_title %}

{% block content %}
<div class="row member-profile-edit">
  <div class="col-12">
    <div class="card">
      <div class="card-header">
        <h3 class="m-0 h5 card-title">{% trans "Edit forum profile" %}</h3>
      </div>
      <div class="card-body">
        <form method="post" action="." class="form" enctype="multipart/form-data" novalidate>{% csrf_token %}{% if form.avatar %}
          <div class="row">
            <div class="col-md-12">
              <div id="div_id_{{ form.avatar.html_name }}" class="form-group{% if form.avatar.errors %} has-error{% endif %}">
                <div class="controls">
                  {% if form.avatar.label %}<label class="control-label" for="{{ field.auto_id }}">{{ form.avatar.label }}{% if not form.avatar.field.required %} <span class="text-muted">{% trans "(optional)" %}</span>{% endif %}</label>{% endif %}
                  {{ form.avatar }}
                  {% if form.avatar.help_text %}<p class="help-block">{{ form.avatar.help_text }}</p>{% endif %}
                  {% for error in form.avatar.errors %}<p class="error">{{ error }}</p>{% endfor %}
                </div>
              </div>
            </div>
          </div>{% endif %}
          <div class="row">
            <div class="col-md-12">
              {% include "partials/form_field.html" with field=form.signature %}
            </div>
          </div>
          <div class="row">
            <div class="col-md-12">
              <div class="form-actions">
                <input type="submit" class="btn btn-large btn-primary" value="{% trans "Submit" %}" />
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
{% endblock content %}

{% block extra_css %}
{{ form.media.css }}
{% endblock extra_css %}

{% block extra_js %}
{{ form.media.js }}
{% endblock extra_js %}
