Fix motivation letter validation

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-03-21 20:28:12 +01:00
parent 12d25b64fe
commit 833b300fde
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 6 additions and 7 deletions

View File

@ -79,7 +79,7 @@ class ParticipationForm(forms.ModelForm):
class MotivationLetterForm(forms.ModelForm):
def clean_file(self):
def clean_motivation_letter(self):
if "motivation_letter" in self.files:
file = self.files["motivation_letter"]
if file.size > 2e6:
@ -208,24 +208,23 @@ class AddJuryForm(forms.ModelForm):
super().__init__(*args, **kwargs)
self.helper = FormHelper()
self.helper.form_class = 'form-inline'
self.helper.layout = Fieldset(
_("Add new jury"),
self.helper.layout = Div(
Div(
Div(
InlineField('first_name', autofocus="autofocus"),
css_class='col-xl-3',
css_class='col-md-3',
),
Div(
InlineField('last_name'),
css_class='col-xl-3',
css_class='col-md-3',
),
Div(
InlineField('email'),
css_class='col-xl-5',
css_class='col-md-5',
),
Div(
Submit('submit', _("Add")),
css_class='col-xl-1',
css_class='col-md-1',
),
css_class='row',
)