Custom "required" error message when a plan is not chosen
authorGu1 <gu1@cafai.fr>
Wed, 17 Apr 2013 23:43:43 +0000 (01:43 +0200)
committerGu1 <gu1@cafai.fr>
Wed, 17 Apr 2013 23:44:14 +0000 (01:44 +0200)
fdneligibility/forms.py
fdneligibility/locale/fr/LC_MESSAGES/django.mo
fdneligibility/locale/fr/LC_MESSAGES/django.po

index 55cb5fa..5c57879 100644 (file)
@@ -16,7 +16,7 @@ class EligibilityForm1(forms.Form):
 
 
 class EligibilityForm2(forms.Form):
-    plans = forms.ChoiceField(label=_('Plans'), widget=forms.RadioSelect)
+    plans = forms.ChoiceField(label=_('Plans'), widget=forms.RadioSelect, error_messages={'required': _('Please choose a plan')})
 
     def format_plan(self, o):
         from django.utils.safestring import mark_safe
index e755d6b..43541b1 100644 (file)
Binary files a/fdneligibility/locale/fr/LC_MESSAGES/django.mo and b/fdneligibility/locale/fr/LC_MESSAGES/django.mo differ
index 02878bb..648d24d 100644 (file)
@@ -3,7 +3,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: django-fdn-eligibility\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-14 04:11+0200\n"
+"POT-Creation-Date: 2013-04-15 20:04+0200\n"
 "PO-Revision-Date: 2013-04-09 19:42+0200\n"
 "Last-Translator: gu1 <gu1@cafai.fr>\n"
 "Language: fr\n"
@@ -24,6 +24,10 @@ msgstr "Code postal"
 msgid "Plans"
 msgstr "Formules"
 
+#: forms.py:19
+msgid "Please choose a plan"
+msgstr "Merci de sélectionner une formule"
+
 #: forms.py:26
 msgid "Opening fees"
 msgstr "Frais d'ouverture"