class FormUser(wtf.Form): id = wtf.HiddenField() client = wtf.HiddenField() name = wtf.StringField( label='Nom et prenom :', validators=[validators.Required('information obligatoire')]) phone = wtf.StringField( label='Telephone :', validators=[validators.Required('information obligatoire')]) email = wtf.StringField(label='Adresse email :') login = wtf.StringField(label='login de connexion :', validators=[execpt_login]) profil = wtf.SelectField(label='Selection d\'un profil :', coerce=int, default=0)
class FormCommande(wtf.Form): event = wtf.StringField( label='Selectionnez un evenement', validators=[validators.Required('Information Obligatoire')]) date_livre = wtf.StringField( label='Date de livraison', validators=[validators.Required('Date obligatoire')]) heure_livre = wtf.StringField( label='Heure de livraison', validators=[validators.Required('Date obligatoire'), current_time]) date_anniv = wtf.StringField( label='Date d\'anniversaire', default=datetime.date.today().strftime("%d/%m/%Y"), validators=[date_anniv_existe]) age = wtf.StringField( label='Age ', validators=[validators.Required('Information Obligatoire')]) theme = wtf.StringField( label='Theme :', validators=[validators.Required('Information Obligatoire')]) concerne = wtf.StringField(label='Concerne :', validators=[concerne_existe]) exixt_at_date = wtf.HiddenField(default='0') info = wtf.TextAreaField(label='Autres infos pour la livraison:') update = wtf.BooleanField(default=False)
class FormProfil(wtf.Form): id = wtf.HiddenField() name = wtf.StringField( label='Nom profil', validators=[ validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator ]) description = wtf.TextAreaField(label='Description du profil') active = wtf.BooleanField(default=True)
class FormLogin(wtf.Form): email = wtf.StringField('Email ou login', validators=[validators.Required()]) password = wtf.PasswordField( 'Mot de passe', [validators.Required("Le mot de passe est requis.")]) submit = wtf.SubmitField("Connexion")
class FormPrixGateaux(wtf.Form): id = wtf.HiddenField() interval = wtf.StringField(label='Nombre de part :', validators=[validators.Required(message='Champ obligatoire')]) prix = wtf.StringField(label='Prix Minimum :', widget=NumberInput(), validators=[validators.Required(message='Champ obligatoire')]) categorie = wtf.SelectField(label='Votre categorie :', coerce=int, validators=[validators.Required(message='Champ obligatoire'), compare_part_interval])
class FormAutre(wtf.Form): id = wtf.HiddenField() name = wtf.StringField(label='Nom du produit :', validators=[validators.Required(message='Champs obligatoire'), validators.length(max=50), unique_code_validator]) prix = wtf.StringField(label='Prix :', widget=NumberInput(), validators=[validators.Required(message='Prix obligatoire')])
class FormGateau(wtf.Form): id = wtf.HiddenField() name = wtf.StringField(label='Nom du gateau :', validators=[validators.Required(message='Champs obligatoire'), validators.length(max=50), unique_code_validator]) prix = wtf.StringField(label='Prix Minimum :', widget=NumberInput(), validators=[validators.Required(message='Prix obligatoire')]) category = wtf.StringField(label=' Categorie', validators=[validators.Required('Champs obligatoire')]) part = wtf.StringField(label='Nombre de part', validators=[validators.Required('Champs obligatoire')])
class FormConfig(wtf.Form): id = wtf.HiddenField() type_data = wtf.HiddenField() name = wtf.StringField(label='Nom ', validators=[validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator_config])
class FormTypeGateau(wtf.Form): id = wtf.HiddenField() name = wtf.StringField(label='Nom type gateau', validators=[validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator]) pr_sable = wtf.BooleanField(label='Utilise pour produit sable', default=False)