Sith/election/templates/election/candidate_form.jinja

20 lines
707 B
Django/Jinja
Raw Normal View History

2016-12-21 23:32:14 +00:00
{% extends "core/base.jinja" %}
{% block title %}
2016-12-23 22:49:00 +00:00
{% trans %}Candidate{% endtrans %}
2016-12-21 23:32:14 +00:00
{% endblock %}
{% block content %}
{%- if (election.can_candidate(user) and election.is_candidature_active) or (user.can_edit(election) and election.is_vote_editable) %}
2016-12-24 01:16:21 +00:00
<section class="election__add-candidature">
<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>
2016-12-24 01:16:21 +00:00
</form>
</section>
2016-12-25 19:09:18 +00:00
{%- else -%}
{% trans %}Candidature are closed for this election{% endtrans %}
2016-12-24 01:16:21 +00:00
{%- endif %}
{% endblock content %}