{% extends "sentry/teams/members/index.html" %}

{% load crispy_forms_tags %}
{% load i18n %}
{% load sentry_helpers %}

{% block title %}{% trans "Edit Member" %} | {{ block.super }}{% endblock %}

{% block sidebar %}
    {{ block.super }}
    <h6>{% trans "Access Levels" %}</h6>
    <p>{% blocktrans %}The primary difference between access levels is team management. Any member with admin access is treated almost identical to the team owner.{% endblocktrans %}</p>
{% endblock %}

{% block inner %}
    <form class="form-stacked" action="" method="post">
        {% csrf_token %}
        <legend>{% trans "Details" %}</legend>

        {% if form.errors %}
            <div class="alert alert-error">{% trans "Please correct the errors below." %}</div>
        {% endif %}

        {{ form|as_crispy_errors }}

        <div class="control-group">
            <label>{% trans "User" %}</label>
            <div class="controls">
                {{ member.user.username }}
            </div>
        </div>
        <br/>
        <legend>{% trans "Access" %}</legend>
        {% for field in form %}
            {{ field|as_crispy_field }}
        {% endfor %}
        <div class="form-actions">
            <button type="submit" class="btn btn-primary">{% trans "Save Changes" %}</button>
        </div>
    </form>
{% endblock %}
