diff --git a/com/views.py b/com/views.py index bc2d576b..ad4a27fd 100644 --- a/com/views.py +++ b/com/views.py @@ -9,6 +9,7 @@ from django.core.exceptions import ValidationError from django.utils import timezone from django.conf import settings from django.db.models import Max +from django.forms.models import modelform_factory from django import forms from datetime import timedelta @@ -259,7 +260,8 @@ class WeekmailPreviewView(ComTabsMixin, CanEditPropMixin, DetailView): class WeekmailEditView(ComTabsMixin, QuickNotifMixin, CanEditPropMixin, UpdateView): model = Weekmail template_name = 'com/weekmail.jinja' - fields = ['title', 'intro', 'joke', 'protip', 'conclusion'] + form_class = modelform_factory(Weekmail, fields=['title', 'intro', 'joke', 'protip', 'conclusion'], + help_texts={'title': _("Delete and save to regenerate")}) success_url = reverse_lazy('com:weekmail') current_tab = "weekmail" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 4edf64ae..9004f0e1 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: 2017-03-12 17:57+0100\n" +"POT-Creation-Date: 2017-03-12 18:11+0100\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -1037,7 +1037,7 @@ msgstr "Vous n'avez pas la permission de faire cela" msgid "Begin date" msgstr "Date de début" -#: club/views.py:170 com/views.py:98 counter/views.py:933 +#: club/views.py:170 com/views.py:99 counter/views.py:933 #: election/views.py:131 msgid "End date" msgstr "Date de fin" @@ -1267,7 +1267,7 @@ msgid "Coming soon... don't miss!" msgstr "Prochainement... à ne pas rater!" #: com/templates/com/weekmail.jinja:5 com/templates/com/weekmail.jinja.py:9 -#: com/views.py:36 core/templates/core/user_tools.jinja:69 +#: com/views.py:37 core/templates/core/user_tools.jinja:69 msgid "Weekmail" msgstr "Weekmail" @@ -1347,43 +1347,47 @@ msgstr "Astuce" msgid "Final word" msgstr "Le mot de la fin" -#: com/views.py:29 +#: com/views.py:30 msgid "Communication administration" msgstr "Administration de la communication" -#: com/views.py:41 core/templates/core/user_tools.jinja:70 +#: com/views.py:42 core/templates/core/user_tools.jinja:70 msgid "Weekmail destinations" msgstr "Destinataires du Weekmail" -#: com/views.py:46 +#: com/views.py:47 msgid "Index page" msgstr "Page d'accueil" -#: com/views.py:51 +#: com/views.py:52 msgid "Info message" msgstr "Message d'info" -#: com/views.py:56 +#: com/views.py:57 msgid "Alert message" msgstr "Message d'alerte" -#: com/views.py:97 election/views.py:130 +#: com/views.py:98 election/views.py:130 msgid "Start date" msgstr "Date de début" -#: com/views.py:99 +#: com/views.py:100 msgid "Until" msgstr "Jusqu'à" -#: com/views.py:100 +#: com/views.py:101 msgid "Automoderation" msgstr "Automodération" -#: com/views.py:106 com/views.py:108 com/views.py:110 +#: com/views.py:107 com/views.py:109 com/views.py:111 msgid "This field is required." msgstr "Ce champ est obligatoire." -#: com/views.py:270 +#: com/views.py:264 +msgid "Delete and save to regenerate" +msgstr "Supprimer et sauver pour regénérer" + +#: com/views.py:272 msgid "Weekmail of the " msgstr "Weekmail du " @@ -1730,7 +1734,8 @@ msgid "" "Enter a valid page name. This value may contain only unaccented letters, " "numbers and ./+/-/_ characters." msgstr "" -"Entrez un nom de page correct. Uniquement des lettres non accentuées, numéros, et ./+/-/_" +"Entrez un nom de page correct. Uniquement des lettres non accentuées, " +"numéros, et ./+/-/_" #: core/models.py:748 msgid "page name"