From 833b300fde999a6b2e253b1bb803f23ac0850745 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 21 Mar 2024 20:28:12 +0100 Subject: [PATCH] Fix motivation letter validation Signed-off-by: Emmy D'Anello --- participation/forms.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/participation/forms.py b/participation/forms.py index 3887d56..39593b0 100644 --- a/participation/forms.py +++ b/participation/forms.py @@ -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', )