diff --git a/app/entreprises/forms.py b/app/entreprises/forms.py index a129c7228..c564b24d4 100644 --- a/app/entreprises/forms.py +++ b/app/entreprises/forms.py @@ -348,8 +348,16 @@ class CorrespondantCreationForm(FlaskForm): validators=[DataRequired(message=CHAMP_REQUIS)], render_kw={"class": "form-control"}, ) - nom = _build_string_field("Nom (*)", render_kw={"class": "form-control"}) - prenom = _build_string_field("Prénom (*)", render_kw={"class": "form-control"}) + nom = StringField( + "Nom (*)", + validators=[DataRequired('Le champ "Nom" est requis')], + render_kw={"class": "form-control"}, + ) + prenom = StringField( + "Prénom (*)", + validators=[DataRequired('Le champ "Prénom" est requis')], + render_kw={"class": "form-control"}, + ) telephone = _build_string_field( "Téléphone (*)", required=False, render_kw={"class": "form-control"} ) @@ -379,7 +387,6 @@ class CorrespondantCreationForm(FlaskForm): if not self.telephone.data and not self.mail.data: msg = "Saisir un moyen de contact (mail ou téléphone)" self.telephone.errors.append(msg) - self.mail.errors.append(msg) validate = False return validate @@ -464,7 +471,6 @@ class CorrespondantModificationForm(FlaskForm): if not self.telephone.data and not self.mail.data: msg = "Saisir un moyen de contact (mail ou téléphone)" self.telephone.errors.append(msg) - self.mail.errors.append(msg) validate = False return validate diff --git a/app/static/css/entreprises.css b/app/static/css/entreprises.css index 203b3aeba..14c8f2103 100644 --- a/app/static/css/entreprises.css +++ b/app/static/css/entreprises.css @@ -129,4 +129,9 @@ #form-entreprise-filter > label { margin-right: 20px; +} + +.title-form { + font-weight: bold; + color: #a94442 } \ No newline at end of file diff --git a/app/templates/entreprises/ajout_correspondants.html b/app/templates/entreprises/ajout_correspondants.html index 18070b7fc..487916038 100644 --- a/app/templates/entreprises/ajout_correspondants.html +++ b/app/templates/entreprises/ajout_correspondants.html @@ -17,6 +17,9 @@