From cd97901db141ab6daf6c211d0799f48d1f1f530a Mon Sep 17 00:00:00 2001 From: klmp200 Date: Sun, 25 Dec 2016 23:36:34 +0100 Subject: [PATCH] Some date fix --- election/templates/election/election_detail.jinja | 4 ++-- election/templates/election/election_list.jinja | 8 ++++---- election/views.py | 13 +++++++------ locale/fr/LC_MESSAGES/django.po | 15 ++++++++++++--- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/election/templates/election/election_detail.jinja b/election/templates/election/election_detail.jinja index ce052d8f..60a3bf23 100644 --- a/election/templates/election/election_detail.jinja +++ b/election/templates/election/election_detail.jinja @@ -239,10 +239,10 @@ th { {% trans %}Polls closed {% endtrans %} {%- else %} {% trans %}Polls will open {% endtrans %} - at + {% trans %} at {% endtrans %} {% trans %}and will close {% endtrans %} {%- endif %} - at + {% trans %} at {% endtrans %}

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

diff --git a/election/templates/election/election_list.jinja b/election/templates/election/election_list.jinja index 3cceb2dc..697516e5 100644 --- a/election/templates/election/election_list.jinja +++ b/election/templates/election/election_list.jinja @@ -27,15 +27,15 @@

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

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

{{ election.description }}

diff --git a/election/views.py b/election/views.py index 579b8cf2..cf0db1ba 100644 --- a/election/views.py +++ b/election/views.py @@ -117,19 +117,20 @@ class ElectionForm(forms.ModelForm): class Meta: model = Election fields = ['title', 'description', 'start_candidature', 'end_candidature', 'start_date', 'end_date', - 'edit_groups', 'view_groups', 'vote_groups', 'candidature_groups'] + 'edit_groups', 'view_groups', 'vote_groups', 'candidature_groups'] widgets = { 'edit_groups': CheckboxSelectMultiple, 'view_groups': CheckboxSelectMultiple, 'edit_groups': CheckboxSelectMultiple, 'vote_groups': CheckboxSelectMultiple, - 'candidature_groups': CheckboxSelectMultiple, - 'start_date': SelectDateTime, - 'end_date': SelectDateTime, - 'start_candidature': SelectDateTime, - 'end_candidature': SelectDateTime, + 'candidature_groups': CheckboxSelectMultiple } + start_date = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("Start date"), widget=SelectDateTime, required=True) + end_date = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("End date"), widget=SelectDateTime, required=True) + start_candidature = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("Start candidature"), widget=SelectDateTime, required=True) + end_candidature = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("End candidature"), widget=SelectDateTime, required=True) + # Display elections diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 46ce07d5..c7efb785 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-25 19:56+0100\n" +"POT-Creation-Date: 2016-12-25 23:30+0100\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -362,7 +362,7 @@ msgstr "Nouveau compte club" #: counter/templates/counter/counter_list.jinja:47 #: election/templates/election/election_detail.jinja:277 #: election/templates/election/election_detail.jinja:322 -#: election/templates/election/election_detail.jinja:366 +#: election/templates/election/election_detail.jinja:368 #: election/templates/election/update_template.jinja:4 #: election/templates/election/update_template.jinja:8 #: launderette/templates/launderette/launderette_list.jinja:16 @@ -3190,6 +3190,15 @@ msgstr "Votes fermés" msgid "Polls will open " msgstr "Les votes ouvriront" +#: election/templates/election/election_detail.jinja:242 +#: election/templates/election/election_detail.jinja:245 +#: election/templates/election/election_list.jinja:30 +#: election/templates/election/election_list.jinja:32 +#: election/templates/election/election_list.jinja:36 +#: election/templates/election/election_list.jinja:38 +msgid " at " +msgstr " à " + #: election/templates/election/election_detail.jinja:243 msgid "and will close " msgstr "et fermeront" @@ -3236,7 +3245,7 @@ msgstr "Envoyer le vote !" msgid "Add a new list" msgstr "Ajouter une nouvelle liste" -#: election/templates/election/election_detail.jinja:365 +#: election/templates/election/election_detail.jinja:366 msgid "Add a new role" msgstr "Ajouter un nouveau rôle"