{% extends "base.html" %}

{% load i18n %}
{% load tags %}

{% block title %}
    {% if assignment %}
        {% trans "Edit election" %}
    {% else %}
        {% trans "New election" %}
    {% endif %}
    – {{ block.super }}
{% endblock %}

{% block content %}
    <h1>
        {% if assignment %}
            {% trans "Edit election" %}
        {% else %}
            {% trans "New election" %}
        {% endif %}
        <small class="pull-right">
        {% if assignment %}
            <a href="{{ assignment|absolute_url }}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to election" %}</a>
        {% else %}
            <a href="{% url 'assignment_list' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
        {% endif %}
        </small>
    </h1>

    <form action="" method="post">{% csrf_token %}
        {% include "form.html" %}
        <p>
        {% include "formbuttons_saveapply.html" %}
        <a href='{% url 'assignment_list' %}' class="btn">
            {% trans 'Cancel' %}
        </a>
        </p>
        <small>* {% trans "required" %}</small>
    </form>
{% endblock %}
