Merge pull request #10 from toulibre/constraintshelp

Constraintshelp
This commit is contained in:
Lionel Porcheron 2016-08-07 11:33:36 +02:00 committed by GitHub
commit 0c3af44f3c
4 changed files with 17 additions and 4 deletions

View File

@ -1,6 +1,7 @@
from django import forms
from django.contrib.auth.models import User
from django.forms.models import modelform_factory
from django.utils.translation import ugettext_lazy as _
from django_select2.forms import Select2Widget
@ -13,7 +14,10 @@ ProfileForm = modelform_factory(Profile, fields=['biography'])
ParticipationForm = modelform_factory(Participation, fields=['transport', 'connector', 'sound', 'videotaped',
'video_licence', 'constraints'],
widgets={'transport': forms.CheckboxSelectMultiple(),
'connector': forms.CheckboxSelectMultiple()})
'connector': forms.CheckboxSelectMultiple()},
help_texts = {
'constraints': _('For example, you need to be back on saturday evening, you cannot eat meat.'),
})
ProfileOrgaForm = modelform_factory(Profile, fields=['biography'])

View File

@ -53,7 +53,7 @@ class Participation(PonyConfModel):
departure = models.DateTimeField(blank=True, null=True)
transport = models.ManyToManyField(Transport, verbose_name=_("I'm ok to travel by"), blank=True)
connector = models.ManyToManyField(Connector, verbose_name=_("I can output"), blank=True)
constraints = models.TextField(blank=True)
constraints = models.TextField(blank=True, verbose_name=_("Constraints"))
sound = models.BooleanField(_("I need sound"), default=False)
videotaped = models.BooleanField(_("I'm ok to be recorded on video"), default=True)
video_licence = models.IntegerField(choices=enum_to_choices(LICENCES), default=1, verbose_name=_("Video licence"))

Binary file not shown.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-05 21:53+0000\n"
"POT-Creation-Date: 2016-08-07 07:11+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,6 +18,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: accounts/forms.py:19
msgid ""
"For example, you need to be back on saturday evening, you cannot eat meat."
msgstr "Par exemple, vous devez rentrer le samedi soir, vous ne pouvez pas manger de viande, etc."
#: accounts/models.py:17 proposals/templates/proposals/user_details.html:12
msgid "Biography"
msgstr "Biographie"
@ -30,6 +35,10 @@ msgstr "Jaccepte de voyager en"
msgid "I can output"
msgstr "Sortie vidéo"
#: accounts/models.py:56
msgid "Constraints"
msgstr "Contraintes"
#: accounts/models.py:57
msgid "I need sound"
msgstr "Jai besoin de son"
@ -254,7 +263,7 @@ msgstr "Format"
msgid "No talks"
msgstr "Aucun exposé"
#: proposals/templates/proposals/home.html:7
#: proposals/templates/proposals/home.html:9
#, python-format
msgid "Welcome to %(site.name)s!"
msgstr "Bienvenue à la conférence %(site.name)s!"