This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d3891c
commit 75d79c3
Showing
13 changed files
with
172 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ class OfficeIdentificationForm(FlaskForm): | |
'N° de Siret *', | ||
validators=[ | ||
DataRequired(), | ||
Regexp('[0-9]{14}', message=("Le siret de l'établissement est invalide (14 chiffres)")) | ||
Regexp('[0-9]{14}', message=("Le siret de l'établissement est invalide (14 chiffres sans espace)")) | ||
], | ||
description="14 chiffres, sans espace. Exemple: 36252187900034", | ||
) | ||
|
@@ -34,30 +34,22 @@ class OfficeIdentificationForm(FlaskForm): | |
first_name = StringField('Prénom *', validators=[DataRequired()]) | ||
phone = TelField( | ||
'Téléphone *', | ||
validators=[DataRequired(), Regexp(PHONE_REGEX)], | ||
render_kw={"placeholder": "01 77 86 39 49, +331 77 86 39 49"} | ||
description="Exemple: 01 77 86 39 49 ou +331 77 86 39 49", | ||
validators=[DataRequired(), Regexp(PHONE_REGEX, message="Entrée invalide. Exemple valide: 01 77 86 39 49 ou +331 77 86 39 49")], | ||
) | ||
email = EmailField( | ||
'Adresse email *', | ||
validators=[DataRequired(), Email()], | ||
render_kw={"placeholder": "[email protected]"} | ||
description="Exemple: [email protected]", | ||
validators=[DataRequired(), Email(message="Entrée invalide. Exemple valide: [email protected]")], | ||
) | ||
|
||
|
||
class OfficeHiddenIdentificationForm(FlaskForm): | ||
siret = HiddenField('Siret *', validators=[DataRequired()]) | ||
last_name = HiddenField('Nom *', validators=[DataRequired()]) | ||
first_name = HiddenField('Prénom *', validators=[DataRequired()]) | ||
phone = HiddenField( | ||
'Téléphone *', | ||
validators=[DataRequired(), Regexp(PHONE_REGEX)], | ||
render_kw={"placeholder": "01 77 86 39 49, +331 77 86 39 49"} | ||
) | ||
email = HiddenField( | ||
'Adresse email *', | ||
validators=[DataRequired(), Email()], | ||
render_kw={"placeholder": "[email protected]"} | ||
) | ||
phone = HiddenField('Téléphone *', validators=[DataRequired(), Regexp(PHONE_REGEX)]) | ||
email = HiddenField('Adresse email *', validators=[DataRequired(), Email()]) | ||
|
||
|
||
class OfficeOtherRequestForm(OfficeHiddenIdentificationForm): | ||
|
@@ -77,27 +69,33 @@ class OfficeUpdateCoordinatesForm(OfficeHiddenIdentificationForm): | |
new_contact_mode = RadioField('Mode de contact à privilégier', choices=CONTACT_MODES, default='email') | ||
new_website = StringField( | ||
'Site Internet', | ||
validators=[URL(), Optional()], render_kw={"placeholder": "http://exemple.com"} | ||
description="Exemple: http://exemple.com", | ||
validators=[URL(message="Entrée invalide. Exemple: http://exemple.com"), Optional()] | ||
) | ||
new_email = EmailField( | ||
'Email recruteur', | ||
validators=[Email(), Optional()], render_kw={"placeholder": "[email protected]"} | ||
description="Exemple: [email protected]", | ||
validators=[Email(message="Entrée invalide. Exemple valide: [email protected]"), Optional()] | ||
) | ||
new_phone = StringField( | ||
'Téléphone', | ||
validators=[Optional(), Regexp(PHONE_REGEX)], | ||
render_kw={"placeholder": "01 77 86 39 49, +331 77 86 39 49"} | ||
description="Exemple: 01 77 86 39 49 ou +331 77 86 39 49", | ||
validators=[Optional(), Regexp(PHONE_REGEX, message="Entrée invalide. Exemple valide: 01 77 86 39 49 ou +331 77 86 39 49")] | ||
) | ||
social_network = StringField( | ||
'Réseau social', | ||
description="Exemple: https://twitter.com/0123456_abcdef", | ||
validators=[URL(message="Entrée invalide. Exemple: https://twitter.com/0123456_abcdef"), Optional()] | ||
) | ||
social_network = StringField('Réseau social', validators=[URL(), Optional()]) | ||
new_email_alternance = EmailField( | ||
'Email recruteur spécialisé alternance', | ||
validators=[validators.optional(), Email()], | ||
render_kw={"placeholder": "exemple-alternance@domaine.com"} | ||
description="Exemple: [email protected]", | ||
validators=[validators.optional(), Email(message="Entrée invalide. Exemple valide: [email protected]")] | ||
) | ||
new_phone_alternance = StringField( | ||
'Téléphone du recruteur spécialisé alternance', | ||
validators=[validators.optional(), Regexp(PHONE_REGEX)], | ||
render_kw={"placeholder": "01 77 86 39 49, +331 77 86 39 49"} | ||
description="Exemple: 01 77 86 39 49 ou +331 77 86 39 49", | ||
validators=[validators.optional(), Regexp(PHONE_REGEX, message="Entrée invalide. Exemple valide: 01 77 86 39 49 ou +331 77 86 39 49")] | ||
) | ||
rgpd_consent = BooleanField( | ||
'En cochant cette case, vous consentez à diffuser des données à caractère personnel sur les services numériques de Pôle emploi.', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.