forked from numerique-gouv/sites-faciles
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Chris Mann
committed
Nov 17, 2024
1 parent
f50d072
commit 877a364
Showing
3 changed files
with
52 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,45 +9,62 @@ | |
# declare a new model with a name "GeeksModel" | ||
class signup(forms.Form): | ||
# fields of the model | ||
username = forms.CharField( | ||
widget=forms.TextInput(attrs={"placeholder": _("nomdutilisateur"), "class": "required"}), | ||
validators=[validators.validate_slug], | ||
label=_("Pseudo d'utilisateur"), | ||
email = forms.EmailField( | ||
widget=forms.EmailInput( | ||
attrs={ | ||
"placeholder": _("[email protected]"), | ||
"class": "required", | ||
"onChange": "javascript:id_username.value=this.value.replace(/@.*/,'')", | ||
} | ||
), | ||
label=_("Email"), | ||
required=True, | ||
label_suffix=" * ", | ||
) | ||
firstName = forms.CharField( | ||
widget=forms.TextInput(attrs={"placeholder": _("Prénom")}), | ||
widget=forms.TextInput( | ||
attrs={ | ||
"placeholder": _("Prénom"), | ||
"onChange": "javascript:id_displayName.value=id_firstName.value + ' ' + id_lastName.value", | ||
} | ||
), | ||
max_length=200, | ||
label=_("Prénom"), | ||
required=False, | ||
label_suffix=" ", | ||
) | ||
lastName = forms.CharField( | ||
widget=forms.TextInput(attrs={"placeholder": _("Nom de Famille"), "class": "required"}), | ||
widget=forms.TextInput( | ||
attrs={ | ||
"placeholder": _("Nom de Famille"), | ||
"class": "required", | ||
"onChange": "javascript:id_displayName.value=id_firstName.value + ' ' + id_lastName.value", | ||
} | ||
), | ||
max_length=200, | ||
label=_("Nom de famille"), | ||
required=True, | ||
label_suffix="* ", | ||
) | ||
email = forms.EmailField( | ||
widget=forms.EmailInput(attrs={"placeholder": _("[email protected]"), "class": "required"}), | ||
label=_("Email"), | ||
username = forms.CharField( | ||
widget=forms.TextInput(attrs={"placeholder": _("nomdutilisateur"), "class": "required"}), | ||
validators=[validators.validate_slug], | ||
label=_("identifiant"), | ||
required=True, | ||
label_suffix=" * ", | ||
) | ||
telephoneNumber = forms.CharField( | ||
widget=forms.TextInput(attrs={"placeholder": _("+33 6 12 34 56 78")}), | ||
max_length=32, | ||
required=False, | ||
label=_("Numéro de téléphone"), | ||
label_suffix=" ", | ||
) | ||
displayName = forms.CharField( | ||
widget=forms.TextInput(attrs={"placeholder": _("Oumar Xhi")}), | ||
max_length=200, | ||
label=_("Nom usuel affiché"), | ||
required=False, | ||
) | ||
password = forms.CharField( | ||
widget=forms.PasswordInput(attrs={"class": "required"}), | ||
widget=forms.PasswordInput(attrs={"class": "required", "onClick": "javascript:peekAtPass(this)"}), | ||
label=_("Mot de passe"), | ||
required=True, | ||
label_suffix=" * ", | ||
) | ||
captcha = CaptchaField() | ||
|
||
|
Empty file.
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