Feat(UI): Blog with article page and Newsletter signup form.
This commit is contained in:
@@ -21,7 +21,7 @@ from forms.base import Form_Base
|
||||
from flask import Flask, render_template, request, flash, redirect, url_for, current_app
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, TextAreaField, SubmitField, HiddenField, BooleanField, Field, EmailField
|
||||
from wtforms.validators import DataRequired, Email, ValidationError
|
||||
from wtforms.validators import DataRequired, Email, ValidationError, Optional
|
||||
import markupsafe
|
||||
from flask_wtf.recaptcha import RecaptchaField
|
||||
from abc import ABCMeta, abstractmethod
|
||||
@@ -77,11 +77,26 @@ class AltchaField(Field):
|
||||
|
||||
|
||||
class Form_Contact(FlaskForm):
|
||||
email = EmailField('Email')
|
||||
contact_name = StringField('Name')
|
||||
company_name = StringField('Company')
|
||||
message = TextAreaField('Message')
|
||||
receive_marketing = BooleanField('I would like to receive marketing emails.')
|
||||
email = EmailField(
|
||||
'Email'
|
||||
, validators = [DataRequired()]
|
||||
)
|
||||
contact_name = StringField(
|
||||
'Name'
|
||||
, validators = [DataRequired()]
|
||||
)
|
||||
company_name = StringField(
|
||||
'Company'
|
||||
, validators = [Optional()]
|
||||
)
|
||||
message = TextAreaField(
|
||||
'Message'
|
||||
, validators = [Optional()]
|
||||
)
|
||||
receive_marketing = BooleanField(
|
||||
'I would like to receive marketing emails.'
|
||||
, validators = [DataRequired()]
|
||||
)
|
||||
# recaptcha = RecaptchaField()
|
||||
# altcha = HiddenField('ALTCHA') # , validators=[validate_altcha]
|
||||
altcha = AltchaField('Verify you are human')
|
||||
|
||||
Reference in New Issue
Block a user