]> git.parisson.com Git - teleforma.git/commitdiff
Make portrait field mandatory
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 24 Aug 2020 14:21:52 +0000 (16:21 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 24 Aug 2020 14:21:52 +0000 (16:21 +0200)
teleforma/forms.py

index ff4011b7d700ff59d704181744de4a04611c3601..0cf95256d6426bfda9e3616016a7322c4dced747 100644 (file)
@@ -72,7 +72,7 @@ class UserForm(ModelForm):
     telephone = CharField(label=_('Telephone'), max_length=255)
     birthday = DateField(label=_('Birthday'), help_text="Au format jj/mm/aaaa")
     # student
-    portrait = ImageField(widget=FileInput(attrs={'accept': "image/*;capture=camera"}), required=False,
+    portrait = ImageField(widget=FileInput(attrs={'accept': "image/*;capture=camera"}), required=True,
                           help_text="Veuillez utiliser une photo au format d'identité.")
     level = ChoiceField(label=_('Studying level'), choices=LEVEL_CHOICES)
     iej = ModelChoiceField(label='IEJ',