{% extends "sentry/bases/modal.html" %}

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

{% block title %}{% trans "Add Member to Organization" %} | {{ block.super }}{% endblock %}

{% block main %}
  <div class="page-header">
    <a class="back-arrow" style="top: 0px;" href="{% url 'sentry-organization-members' organization.slug %}"><span class="icon-arrow-left"></span></a>
    <h2>{% trans "Add Member to Organization" %}</h2>
  </div>

  {% if is_invite %}
    <p>{% trans "Invite a member to join this organization via their email address. If they do not already have an account, they will first be asked to create one." %}</p>
  {% else %}
    <p>{% trans "You may add a user by their username if they already have an account." %}</p>
  {% endif %}

  <form class="form-stacked" action="" method="post">
    {% csrf_token %}

    {% for field in form %}
      {{ field|as_crispy_field }}
    {% endfor %}

    <div class="form-actions">
      <button type="submit" class="btn btn-primary">{% trans "Add Member" %}</button>
    </div>
  </form>
{% endblock %}
