Sith/election/templates/election/candidate_form.jinja
2024-07-25 16:46:45 +02:00

20 lines
687 B
Django/Jinja

{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Candidate{% endtrans %}
{% endblock %}
{% block content %}
{%- if (election.can_candidate(user) and election.is_candidature_active) or (user.can_edit(election) and election.is_vote_editable) %}
<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>
</form>
</section>
{%- else -%}
{% trans %}Candidature are closed for this election{% endtrans %}
{%- endif %}
{% endblock content %}