mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 06:22:22 +00:00
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):
|
class MotivationLetterForm(forms.ModelForm):
|
||||||
def clean_file(self):
|
def clean_motivation_letter(self):
|
||||||
if "motivation_letter" in self.files:
|
if "motivation_letter" in self.files:
|
||||||
file = self.files["motivation_letter"]
|
file = self.files["motivation_letter"]
|
||||||
if file.size > 2e6:
|
if file.size > 2e6:
|
||||||
@ -208,24 +208,23 @@ class AddJuryForm(forms.ModelForm):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.helper = FormHelper()
|
self.helper = FormHelper()
|
||||||
self.helper.form_class = 'form-inline'
|
self.helper.form_class = 'form-inline'
|
||||||
self.helper.layout = Fieldset(
|
self.helper.layout = Div(
|
||||||
_("Add new jury"),
|
|
||||||
Div(
|
Div(
|
||||||
Div(
|
Div(
|
||||||
InlineField('first_name', autofocus="autofocus"),
|
InlineField('first_name', autofocus="autofocus"),
|
||||||
css_class='col-xl-3',
|
css_class='col-md-3',
|
||||||
),
|
),
|
||||||
Div(
|
Div(
|
||||||
InlineField('last_name'),
|
InlineField('last_name'),
|
||||||
css_class='col-xl-3',
|
css_class='col-md-3',
|
||||||
),
|
),
|
||||||
Div(
|
Div(
|
||||||
InlineField('email'),
|
InlineField('email'),
|
||||||
css_class='col-xl-5',
|
css_class='col-md-5',
|
||||||
),
|
),
|
||||||
Div(
|
Div(
|
||||||
Submit('submit', _("Add")),
|
Submit('submit', _("Add")),
|
||||||
css_class='col-xl-1',
|
css_class='col-md-1',
|
||||||
),
|
),
|
||||||
css_class='row',
|
css_class='row',
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user