Esempio n. 1
0
class FormUser(wtf.Form):
    id = wtf.HiddenField()
    first_name = wtf.StringField(
        label='Nom',
        validators=[validators.Required('Information obligatoire')])
    last_name = wtf.StringField(label='Prenom')
    email = wtf.StringField(label='Adresse Email',
                            validators=[
                                validators.Email('Adresse email invalide'),
                                validators.Required('Information obligatoire'),
                                unique_email_validator_2
                            ])
    phone = wtf.StringField(label='Telephone')
    appareil = wtf.SelectMultipleField(label='Appareil', coerce=str)
    categorie = wtf.SelectMultipleField(label='Departement', coerce=str)
Esempio n. 2
0
class FormClient(wtf.Form):
    id = wtf.HiddenField()
    type_client = wtf.HiddenField()

    display_name = wtf.StringField(label='Nom du client :',
                                   validators=[
                                       validators.Required('Nom obligatoire'),
                                       unique_name_validator
                                   ])

    email = wtf.StringField(label='Adresse Courriel :',
                            validators=[
                                validators.email('Adresse courriel invalide'),
                                unique_email_validator
                            ])
    phone = wtf.StringField(label='Telephone :')

    entreprise = wtf.StringField(label='Societe :')

    ville = wtf.StringField(label='Villes :')
    quartier = wtf.StringField(label='Quartier :')

    categorie = wtf.SelectMultipleField(label='Groupes :', coerce=str)

    note = wtf.TextAreaField(label='Notes :')
Esempio n. 3
0
class CreateUserForm(wtf.Form):
    fname = wtf.TextField('First Name*', [validators.Required()])
    mname = wtf.TextField('Middle Name', [validators.Optional()])
    lname = wtf.TextField('Last Name*', [validators.Required()])
    cwruid = wtf.TextField('CWRU ID*', [validators.Required()])
    family = wtf.SelectField('Family', [validators.Optional()])
    big = wtf.TextField('Big CWRU ID', [validators.Optional()])
    avatar = wtf.TextField(
        'Gravatar email',
        [validators.Email(), validators.Optional()])
    # need to make the role list change according to the roles in the database
    roles = wtf.SelectMultipleField('Role Name', [validators.Optional()])
Esempio n. 4
0
File: forms.py Progetto: altai/focus
 class SpawnForm(wtf.Form):
     image = wtf.SelectField(
         'Image', [wtf.Required()], choices=IMAGE_CHOICES)
     flavor = wtf.SelectField(
         'Flavor', [wtf.Required()], choices=FLAVOR_CHOICES)
     name = wtf.TextField('Name', [wtf.Required()])
     password = wtf.PasswordField('Password')
     confirm_password = wtf.PasswordField(
         'Confirm Password', [wtf.EqualTo('password')])
     keypair = wtf.SelectField('Key Pair', choices=KEYPAIR_CHOICES)
     security_groups = wtf.SelectMultipleField(
         'Security Groups', choices=SECURITY_GROUP)
Esempio n. 5
0
class FormClient(wtf.Form):

    id = wtf.HiddenField()
    notCat = wtf.HiddenField()

    raison = wtf.StringField(label='Forme juridique :')
    name = wtf.StringField(
        label='Nom de l\'entreprise :',
        validators=[validators.Required(message='Champ obligatoire')])
    ville = wtf.StringField(
        label='Ville :',
        validators=[validators.Required(message='Champ obligatoire')])
    quartier = wtf.StringField(label='Quartier :')
    adresse = wtf.StringField(label='Adresse :')
    postal_code = wtf.StringField(label='Code postal :')
    repere = wtf.StringField(label='Reperage :')
    region = wtf.StringField(label='Region :')

    email = wtf.StringField(label='Adresse Email :',
                            validators=[unique_email_validator])
    phone = wtf.StringField(label='Numero de telephone :')
    description = wtf.TextAreaField(label='Description :')
    urlsite = wtf.StringField(label='Site web :')

    latitude = wtf.StringField(label='Latitude :')
    longitude = wtf.StringField(label='Longitude :')

    facebook = wtf.StringField(label='Lien facebook :')
    twitter = wtf.StringField(label='Lien twitter :')
    linkedin = wtf.StringField(label='Lien linkedin :')
    youtube = wtf.StringField(label='Lien youtube :')

    idcategorie = wtf.SelectMultipleField(
        label='Categorie de l\'entreprise :',
        coerce=str,
        validators=[validators.Required(message='Champ obligatoire')])
    maincategorie = wtf.SelectField(
        label='Categorie Principale :',
        coerce=str,
        validators=[validators.Required(message='Champ obligatoire')])

    logo = wtf.StringField(label='Logo entreprise :')
    imageslide = wtf.StringField(label='Image du slide :')
Esempio n. 6
0
class FormItem(wtf.Form):
    id = wtf.HiddenField()
    variantes = wtf.HiddenField()
    produit_compose = wtf.HiddenField(validators=[valid_matiere])

    name = wtf.StringField(label='Nom ',
                           validators=[
                               validators.Required('Nom obligatoire'),
                               unique_name_validator
                           ])

    description = wtf.TextAreaField(label='Description')

    prix_achat = wtf.StringField(label='Prix d\'achat', default=0)

    a_vendre = wtf.BooleanField(label='Produit a vendre')
    type_article = wtf.BooleanField(label='Produit Compose')

    categorie = wtf.SelectField(label='Categorie', coerce=str)

    magasin = wtf.SelectMultipleField(label='Point de vente', coerce=str)
Esempio n. 7
0
class AdminUpdateUserForm(wtf.Form):
    big = wtf.TextField('Big CWRU ID', [validators.Optional()])
    family = wtf.SelectField('Family', [validators.Optional()])
    roles = wtf.SelectMultipleField('Roles', [validators.Optional()])
Esempio n. 8
0
File: forms.py Progetto: altai/focus
 class NewUserToProjectForm(wtf.Form):
     user = wtf.SelectField(
         'User', [wtf.Required()], choices=USERS_CHOICES, coerce=int)
     roles = wtf.SelectMultipleField(
         'Roles', [wtf.Required()], choices=ROLES_CHOICES, coerce=int)