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

{% block content %}
	<h2>Group membership</h2>
	<div class="group-invite">
		{% if user.is_authenticated %}
			<p class="form-message">{{ msg }}</p>
			<table>
				{% for membership in memberships %}
					<tr>
						<td>{{ membership.user }}</td>
						<td><a href="{% url group_invite_delete clan.id membership.user %}">delete</a></td>
					</tr>
				{% endfor %}
			</table>
			<form class="form" action="{% url group_invite clan.id %}" method="post">
				{% csrf_token %}
				{{ form.as_p }}
				<input type="submit" value="Submit" />
			</form>
		{% else %}
			<a href="/login">login</a>
		{% endif %}
	</div>
{% endblock %}
