candidate_form.jinja 707 Bytes
Newer Older
Sli's avatar
Sli committed
1
2
3
{% extends "core/base.jinja" %}

{% block title %}
Sli's avatar
Sli committed
4
{% trans %}Candidate{% endtrans %}
Sli's avatar
Sli committed
5
6
7
{% endblock %}

{% block content %}
8
    {%- if (election.can_candidate(user) and election.is_candidature_active) or (user.can_edit(election) and election.is_vote_editable) %}
Sli's avatar
Sli committed
9
    <section class="election__add-candidature">
10
11
12
13
        <form action="{{ url('election:candidate', election_id=election.id) }}" method="post">
            {% csrf_token %}
            {{ form.as_p() }}
            <p><input type="submit" value="{% trans %}Candidate{% endtrans %}" /></p>
Sli's avatar
Sli committed
14
15
        </form>
    </section>
Sli's avatar
Sli committed
16
17
    {%- else -%}
    {% trans %}Candidature are closed for this election{% endtrans %}
Sli's avatar
Sli committed
18
    {%- endif %}
19
{% endblock content %}