Fix motivation letter validation
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
12d25b64fe
commit
833b300fde
|
@ -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',
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue