diff --git a/election/templates/election/candidate_form.jinja b/election/templates/election/candidate_form.jinja index ccb6fa91..ad889b27 100644 --- a/election/templates/election/candidate_form.jinja +++ b/election/templates/election/candidate_form.jinja @@ -7,12 +7,13 @@ {% block content %} {%- if election.can_candidate(user) or user.can_edit(election) %}
-
{{form.as_p()}} -

- {% csrf_token %} + + {% csrf_token %} + {{ form.as_p() }} +

{%- else -%} {% trans %}Candidature are closed for this election{% endtrans %} {%- endif %} -{% endblock content %} \ No newline at end of file +{% endblock content %} diff --git a/election/templates/election/election_detail.jinja b/election/templates/election/election_detail.jinja index 60a3bf23..dea749ff 100644 --- a/election/templates/election/election_detail.jinja +++ b/election/templates/election/election_detail.jinja @@ -1,7 +1,7 @@ {% extends "core/base.jinja" %} {% block title %} -{{object.title}} +{{ object.title }} {% endblock %} {% block head %} @@ -239,10 +239,12 @@ th { {% trans %}Polls closed {% endtrans %} {%- else %} {% trans %}Polls will open {% endtrans %} - {% trans %} at {% endtrans %} + + {% trans %} at {% endtrans %} {% trans %}and will close {% endtrans %} {%- endif %} - {% trans %} at {% endtrans %} + + {% trans %} at {% endtrans %}

{%- if election.has_voted(user) %}

@@ -255,7 +257,7 @@ th { {%- endif %}

-
+ {% csrf_token %} {%- set election_lists = election.election_lists.all() -%} @@ -263,7 +265,7 @@ th { {%- for election_list in election_lists %} - + {%- endfor %} {%- for role in election.roles.all() %} @@ -271,8 +273,8 @@ th { {%- set role_data = election_form.data.getlist(role.title) if role.title in election_form.data else [] %} - @@ -311,7 +313,7 @@ th {
{%- if candidature.user.profile_pict and user.is_subscriber_viewable %} - {% trans %}Profile{% endtrans %} + {% trans %}Profile{% endtrans %} {%- endif %}
@@ -337,7 +339,7 @@ th { {%- if election.is_vote_finished %} {%- set results = election_results[role.title][candidature.user.username] %}
- {{results.vote}} {% trans %}votes{% endtrans %} ({{results.percent}} %) + {{ results.vote }} {% trans %}votes{% endtrans %} ({{ results.percent }} %)
{%- endif %} @@ -358,14 +360,14 @@ th { {%- endif %}
{%- if election.can_candidate(user) or user.can_edit(election) %} - {% trans %}Candidate{% endtrans %} + {% trans %}Candidate{% endtrans %} {%- endif %} - {% trans %}Add a new list{% endtrans %} + {% trans %}Add a new list{% endtrans %} {%- if user.can_edit(election) %} {% if election.is_vote_editable %} - {% trans %}Add a new role{% endtrans %} + {% trans %}Add a new role{% endtrans %} {% endif %} - {% trans %}Edit{% endtrans %} + {% trans %}Edit{% endtrans %} {%- endif %}
{% endblock %} @@ -395,4 +397,4 @@ function setupRestrictions(role) { } } -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/election/templates/election/election_list.jinja b/election/templates/election/election_list.jinja index 697516e5..3bcb0110 100644 --- a/election/templates/election/election_list.jinja +++ b/election/templates/election/election_list.jinja @@ -26,18 +26,23 @@ {{ election }}

- {% trans %}Applications open from{% endtrans %} - {% trans %} at {% endtrans %} - {% trans %}to{% endtrans %} - {% trans %} at {% endtrans %} + {% trans %}Applications open from{% endtrans %} + + {% trans %} at {% endtrans %} + {% trans %}to{% endtrans %} + + {% trans %} at {% endtrans %}

- {% trans %}Polls open from{% endtrans %} - {% trans %} at {% endtrans %} - {% trans %}to{% endtrans %} - {% trans %} at {% endtrans %} + {% trans %}Polls open from{% endtrans %} + + {% trans %} at {% endtrans %} + {% trans %}to{% endtrans %} + + {% trans %} at {% endtrans %}

{{ election.description }}

{%- endfor %} -{%- endblock %} \ No newline at end of file +{%- endblock %} +
{% trans %}Blank vote{% endtrans %}{{election_list.title}}{{ election_list.title }}
- {{role.title}} + + {{ role.title }} {% if user.can_edit(role) and election.is_vote_editable -%} {% trans %}Edit{% endtrans %} {% trans %}Delete{% endtrans %} @@ -299,7 +301,7 @@ th { {%- if election.is_vote_finished %} {%- set results = election_results[role.title]['blank vote'] %}
- {{results.vote}} {% trans %}votes{% endtrans %} ({{results.percent}} %) + {{ results.vote }} {% trans %}votes{% endtrans %} ({{ results.percent }} %)
{%- endif %}