{# -*- engine:django -*- #}

{% extends "core/base.html" %}

{% load material_form i18n %}

{% load render_table from django_tables2 %}

{% block browser_title %}{% blocktrans %}Invite{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}Invite{% endblocktrans %}{% endblock %}


{% block content %}

  <div class="row">
    <div class="col s6">
      <h5>{% trans "Invite by email address" %}</h5>
      <form method="post">
        {% csrf_token %}
        {% form form=form %}{% endform %}
        {% trans "Invite" as caption %}
        {% include "core/partials/save_button.html" with caption=caption icon="card_giftcard" %}
      </form>
    </div>
    <div class="col s6">        
      <h5>{% trans "Generate invitation code" %}</h5>

      <a class="btn waves-effect waves-light hundred-percent" href="{% url 'generate_invitation_code' %}">
        {% trans "Generate code" %}
      </a>
    </div>
    <div class="col s12">
      <h5>{% trans "Invitations" %}</h5>

      {% render_table table %}
    </div>
  </div>
{% endblock %}
