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()
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()
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')
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()
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()
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.')
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()
class RegisterForm(BaseRegisterForm): recaptcha = RecaptchaField()
class CorrectThisPageForm(BaseForm): email = TextField('Email', [validators.Optional()]) details = TextField('Details', [validators.Optional()]) url = TextField('URL', [validators.Optional()]) recaptcha = RecaptchaField()
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()
class RecaptchaForm(MyBaseForm): recaptcha = RecaptchaField()
class signupForm(Form): name = TextField('name') email = TextField('email', validators=[Required(), Email()]) recaptcha = RecaptchaField()
class FormSignup(Form): email = TextField('email', validators=[DataRequired(), Email()]) password = PasswordField('password', validators=[DataRequired()]) recaptcha = RecaptchaField()
class TicketFormFree(Form): recaptcha = RecaptchaField() submit_tickets = SubmitField('Get free ticket.')