Beispiel #1
0
class RegisterUserDBForm(DynamicForm):
    username = StringField(lazy_gettext('User Name'),
                           validators=[DataRequired()],
                           widget=BS3TextFieldWidget())
    first_name = StringField(lazy_gettext('First Name'),
                             validators=[DataRequired()],
                             widget=BS3TextFieldWidget())
    last_name = StringField(lazy_gettext('Last Name'),
                            validators=[DataRequired()],
                            widget=BS3TextFieldWidget())
    email = StringField(lazy_gettext('Email'),
                        validators=[DataRequired(), Email()],
                        widget=BS3TextFieldWidget())
    password = PasswordField(
        lazy_gettext('Password'),
        description=lazy_gettext(
            'Please use a good password policy, this application does not check this for you'
        ),
        validators=[DataRequired()],
        widget=BS3PasswordFieldWidget())
    conf_password = PasswordField(
        lazy_gettext('Confirm Password'),
        description=lazy_gettext('Please rewrite the password to confirm'),
        validators=[
            EqualTo('password', message=lazy_gettext('Passwords must match'))
        ],
        widget=BS3PasswordFieldWidget())
    recaptcha = RecaptchaField()
Beispiel #2
0
class Registration(Form):
    apple_id = EmailField('Email address: ', [email_validator])
    password = PasswordField('Password: '******'confirm', message="Passwords must match"),
        password_validator
    ])
    confirm = PasswordField('Confirm: ', [password_validator])
    recaptcha = RecaptchaField()
Beispiel #3
0
class RegistrationForm(Form):
    login = StringField('Username', validators=[Required()])
    email = StringField('Email', validators=[Required(), Email()])
    password = PasswordField('Password', validators=[Required()])
    password_again = PasswordField(
        'Password again', validators=[Required(),
                                      EqualTo('password')])
    school = StringField()
    recaptcha = RecaptchaField()
    submit = SubmitField('Register')
Beispiel #4
0
class RegisterUserOIDForm(DynamicForm):
    username = StringField(lazy_gettext('User Name'),
                           validators=[DataRequired()],
                           widget=BS3TextFieldWidget())
    first_name = StringField(lazy_gettext('First Name'),
                             validators=[DataRequired()],
                             widget=BS3TextFieldWidget())
    last_name = StringField(lazy_gettext('Last Name'),
                            validators=[DataRequired()],
                            widget=BS3TextFieldWidget())
    email = StringField(lazy_gettext('Email'),
                        validators=[DataRequired(), Email()],
                        widget=BS3TextFieldWidget())
    recaptcha = RecaptchaField()
Beispiel #5
0
class RegisterForm(Form):
    username = TextField('Username',
                         validators=[DataRequired(), validate_user])
    password = PasswordField('Password',
                             validators=[
                                 DataRequired(),
                                 EqualTo('password_conf',
                                         message="Passwords Must Match.")
                             ])
    password_conf = PasswordField('Repeat Password')
    email = TextField(
        'Email',
        validators=[Email("Not a valid email address."), validate_email])
    name = TextField('Name (Optional)')
    city = TextField('City (Optional)')
    recaptcha = RecaptchaField()
Beispiel #6
0
class NonAdminAddNewFoodResourceForm(AddNewFoodResourceForm):
	your_name = TextField(
		label = 'Your Name', 
		validators = [
			InputRequired("Please provide your name."),
			Length(1, 150)
		],
		description = "Please provide your first AND last name. Your name will \
			not be displayed publicly on Philly Food Finder."
	)
	your_email_address = TextField(
		label = 'Your Email Address', 
		validators = [
			Length(0, 255)
		],
		description = "Please provide an email address at which we can contact \
			you if we have questions about your submitted food resource. Your \
			email address will not be used for any other purpose. Your email \
			address will not be displayed publicly on Philly Food Finder."
	)
	your_phone_number = TextField(
		label = 'Your Phone Number', 
		validators = [
			InputRequired("Please provide a phone number at which we can \
				contact you.")
		],
		description = "Please provide a phone number at which we can contact \
			you if we have questions about your submitted food resource. Your \
			phone number will not be displayed publicly on Philly Food Finder."
	)
	notes = TextAreaField(
		label = 'Notes', 
		validators = [
			Length(0, 500)
		], 
		description = 'Is there any additional information that you think we \
			should know as we review your food resource? For example, is your \
			site already in the database but its information is incorrect?'
	)   

	recaptcha = RecaptchaField() 

	def validate_your_email_address(form, field):
		regex = re.compile('^.+@[^.].*\.[a-z]{2,10}$')
		if len(str(field.data)) > 0 and not regex.match(str(field.data)):
			raise ValidationError('Invalid email address.')
Beispiel #7
0
class SignupForm(Form):
    username_signup = StringField('Username', validators=[DataRequired()], render_kw={"placeholder": "Username"})
    email = StringField('Email', validators=[DataRequired(), Email()], render_kw={"placeholder": "email"})
    password_signup = PasswordField('Password', validators=[DataRequired()], render_kw={"placeholder": "Password"})
    recap = RecaptchaField()
Beispiel #8
0
class RegisterForm(BaseRegisterForm):
    recaptcha = RecaptchaField()
Beispiel #9
0
class CorrectThisPageForm(BaseForm):
    email = TextField('Email', [validators.Optional()])
    details = TextField('Details', [validators.Optional()])
    url = TextField('URL', [validators.Optional()])
    recaptcha = RecaptchaField()
Beispiel #10
0
class ContactForm(Form):
    name = TextField('Name', validators=[DataRequired()])
    email = TextField('Email', validators=[DataRequired(), Email()])
    subject = TextField('Subject', validators=[DataRequired()])
    message = TextAreaField('Message', validators=[DataRequired()])
    recaptcha = RecaptchaField()
class CommentForm(Form):

    comment = TextAreaField("Comment", validators=[DataRequired()])
    recaptcha = RecaptchaField()
Beispiel #12
0
class RecaptchaForm(MyBaseForm):

    recaptcha = RecaptchaField()
Beispiel #13
0
class signupForm(Form):
    name = TextField('name')
    email = TextField('email', validators=[Required(), Email()])
    recaptcha = RecaptchaField()
Beispiel #14
0
class FormSignup(Form):
    email = TextField('email', validators=[DataRequired(), Email()])
    password = PasswordField('password', validators=[DataRequired()])
    recaptcha = RecaptchaField()
Beispiel #15
0
class TicketFormFree(Form):
    recaptcha = RecaptchaField()
    submit_tickets = SubmitField('Get free ticket.')