mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-18 20:23:23 +00:00
20 lines
707 B
Django/Jinja
20 lines
707 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 %}
|