class FeedbackForm(wtf.Form): subject = wtf.TextField(_('Subject'), [wtf.validators.required()]) message = wtf.TextAreaField(_('Message'), [wtf.validators.required()]) email = wtf.TextField(_('Email (optional)'), [ wtf.validators.optional(), wtf.validators.email(_('That does not look like an email')), ])
class MainUpdateUserForm(wtf.Form): fname = wtf.TextField('First Name*', [validators.Required()]) mname = wtf.TextField('Middle Name', [validators.Optional()]) lname = wtf.TextField('Last Name*', [validators.Required()]) avatar = wtf.TextField( 'Gravatar Email', [validators.Optional(), validators.Email()])
class CreateServiceEventForm(wtf.Form): """This is the Create a Service Event Form .. method:: CreateServiceEventForm(name, date, startTime, endTime, location[, summary, maxBrothers]) :param name: Name of event :type name: unicode :param date: Date of the event :type date: datetime.date :param startTime: Time event starts at :type startTime: datetime.time :param endTime: Time event ends at :type endTime: datetime.time :param location: Location of the event :type location: application.models.Location :param summary: Description of the event :type summary: unicode :param maxBrothers: Maximum Number of Brothers :type maxBrothers: int :rtype: Form instance """ name = wtf.TextField('Name: ', validators=[validators.Required()]) date = wtf.TextField('Date: ', validators=[validators.Required()]) startTime = wtf.TextField('Start Time: ', validators=[validators.Required()]) endTime = wtf.TextField('End Time: ', validators=[validators.Required()]) location = wtf.TextAreaField('Location: ', validators=[validators.Required()]) summary = wtf.TextAreaField('Summary: ', validators=[validators.Required()]) maxBrothers = wtf.TextField('Max number of brothers: ', validators=[validators.Optional()])
class ContactForm(wtf.Form): order_id = wtf.IntegerField(u'Порядок сортировки', description=u'От большего к меньшему', default=0) is_public = wtf.BooleanField( u'Показывать на сайте?', description=u'Показывать ли данный контакт на страницах сайта?', default=False) title = wtf.TextField(u'Название', description=u'Например, "Головной офис" или "Склад"') zip_code = wtf.TextField(u'Почтовый индекс', description=u'Введите почтовый индекс') city = wtf.TextField(u'Город', description=u'Введите город') address = wtf.TextAreaField(u'Адрес', description=u'Введите полный адрес') telephones = wtf.TextAreaField(u'Телефоны', description=u'Введите телефоны') faxes = wtf.TextAreaField(u'Факсы', description=u'Введите факсы') additional_info = wtf.TextAreaField( u'Дополнительная информация', description=u'Введите любую другую информацию') latitude = wtf.FloatField(u'Широта', description=u'Введите широту на карте', default=0.0) longitude = wtf.FloatField(u'Долгота', description=u'Введите долготу на карте', default=0.0)
class AddressForm(wtf.Form): addrName = wtf.TextField('Name', [validators.Optional()]) street1 = wtf.TextField('Street', [validators.Required()]) street2 = wtf.TextField('', [validators.Optional()]) city = wtf.TextField('City', [validators.Required()]) state = wtf.TextField('State', [validators.Required()]) zip_code = wtf.IntegerField('Zip', [validators.Required()]) key = wtf.HiddenField([validators.Optional()])
class ContactUpdateForm(wtf.Form): name = wtf.TextField('Name', [wtf.validators.required()]) email = wtf.TextField('Email', [ wtf.validators.optional(), wtf.validators.email('That does not look like an email'), ]) phone = wtf.TextField('Phone', [wtf.validators.optional()]) address = wtf.TextAreaField('Address', [wtf.validators.optional()])
class CreateServiceEventForm(wtf.Form): name = wtf.TextField('Name*', [validators.Required()]) desc = wtf.TextField('Description', [validators.Optional()]) start_time = wtf.DateTimeField('Start Time*', [validators.Required()]) end_time = wtf.DateTimeField('End Time*', [validators.Required()]) location = wtf.TextField('Location*', [validators.Required()]) addinfo = wtf.TextField('Additional Info', [validators.Optional()]) max_bros = wtf.IntegerField('Maximum Number of Brothers', [validators.Optional()])
class PicUploadForm(wtf.Form): PicTitle = wtf.TextField('What you bought:', validators=[validators.Required()]) PicImage = wtf.FileField('Picture of it:', validators=[checkfile]) PicWhere = wtf.TextField('Where you bought it:', validators=[validators.Required()]) PicPrice = wtf.TextField('How much you paid for it:', validators=[validators.Required()]) PicPoster = wtf.TextField('Your name:', validators=[validators.Required()])
class FeedbackForm(wtf.Form): subject = wtf.TextField(u'Тема', [wtf.validators.required()]) feedback = wtf.TextAreaField(u'Вопрос/предложение', [wtf.validators.required()]) email = wtf.TextField(u'Email (необязательно)', [ wtf.validators.optional(), wtf.validators.email( u"Хмм... это не выглядит похожим на настоящий email,\ вероятнее всего Вы ошиблись"), ])
class ProfileUpdateForm(wtf.Form): name = wtf.TextField(_('Name'), [wtf.validators.required()]) email = wtf.TextField(_('Email'), [ wtf.validators.optional(), wtf.validators.email(_('That does not look like an email')), ]) locale = wtf.SelectField( _('Language'), choices=config.LOCALE_SORTED, )
class StreamForm(wtf.Form): """Stream Form""" stream_name = wtf.TextField('Name', validators=[validators.Required()]) stream_type = wtf.SelectField('Type', choices=[('sc2', 'Shoutcast 2'), ('ic2', 'Icecast 2')]) stream_hostname = wtf.TextField('Hostname', validators=[validators.Required()]) stream_port = wtf.IntegerField('Port', [validators.required()]) stream_sid = wtf.IntegerField('SID', [validators.Optional()]) stream_mount = wtf.TextField('Mount', [validators.Optional()])
class RegisterForm(wtf.Form): first_name = wtf.TextField('First Name', validators=[validators.Required()]) last_name = wtf.TextField('Last Name', validators=[validators.Required()]) email = wtf.TextField('Email', validators=[validators.Required()]) password = wtf.PasswordField('Password', validators=[validators.Required()]) confirm = wtf.PasswordField('Confirm Password', [ validators.Required(), validators.EqualTo('password', message='Passwords must match') ])
class NewStudentForm(wtf.Form): name = wtf.TextField('Name', validators=[validators.Optional()]) email = wtf.TextField( 'Email', validators=[validators.Required(), validators.Email()]) graduation_year = wtf.TextField('Graduation year', validators=[validators.Optional()]) preferences = MultiCheckboxField('Preferences', choices=zip(models.SUBJECTS, models.SUBJECTS), validators=[validators.Optional()])
class RecordAliasForm(wtf.Form): type = wtf.SelectField("Type", choices=RECORD_CHOICES) name = wtf.TextField("Name", validators=[validators.Required()]) alias_hosted_zone_id = wtf.TextField("Alias hosted zone ID", validators=[validators.Required()]) alias_dns_name = wtf.TextField("Alias DNS name", validators=[validators.Required()]) ttl = wtf.IntegerField("TTL", default="86400", validators=[validators.Required()]) comment = wtf.TextAreaField("Comment")
class ProfileUpdateForm(wtf.Form): name = wtf.TextField( 'Name', [wtf.validators.required()], filters=[util.strip_filter], ) email = wtf.TextField( 'Email', [wtf.validators.optional(), wtf.validators.email()], filters=[util.strip_filter], )
class StoreLinkForm(wtf.Form): name = wtf.TextField(u'Название магазина', description=u'Введите название магазина', validators=[wtf.validators.required()]) link = wtf.TextField( u'Ссылка на магазин', description= u'Укажите ссылку на магазин. Ссылка должна быть вида http://example.ru', validators=[wtf.validators.required(), wtf.validators.url()]) description = wtf.TextField( u'Описание', description=u'Введите краткое описание магазина')
class SubmitPhotoForm(wtf.Form): """Form for submitting a photo to the website .. method:: SubmitPhotoForm(name, photo) :param name: Brief description of photo :type albumName: unicode :param photo: Photo URL :type photo: unicode :rtype: Form instance """ name = wtf.TextField('Photo Name: ', validators=[validators.Required()]) photo = wtf.TextField('Photo URL: ', validators=[validators.Required()])
class CreateUpdateContractForm(wtf.Form): """Form for Creating and Updating Contract types .. method:: CreateUpdateContractForm(name, hours, minutes, hoursDueDate, amount, duesDueDate, attendanceReq, attDueDate) :param name: Name of contract :type name: unicode :param hours: Hours needed to fulfill contract :type hours: int :param minutes: Minutes needed to fulfill contract :type minutes: int :param hoursDueDate: Date that all hours and minutes must be completed :type hoursDueDate: datetime.date :param amount: Dues owed :type amount: int :param duesDueDate: Date that dues must be paid by :type duesDueDate: datetime.date :param attendanceReq: Number of chapter meetings that must be attended :type attendanceReq: int :param attDueDate: Date that the required number of attended meetings must be met by :type attDueDate: datetime.date :rtype: Form instance """ name = wtf.TextField('Name: ', validators=[validators.Required()]) hours = wtf.TextField('Hours: ', validators=[validators.Required()]) min = wtf.TextField('Minutes: ', validators=[validators.Required()]) hoursDueDate = wtf.TextField('Hours Due Date: ', validators=[validators.Required()]) amount = wtf.TextField('Dues Amount: ', validators=[validators.Required()]) duesDueDate = wtf.TextField('Dues Due Date: ', validators=[validators.Required()]) attendanceReq = wtf.TextField('Attendance Requirements: ', validators=[validators.Required()]) attDueDate = wtf.TextField('Attendance Due Date: ', validators=[validators.Required()])
class ConfigUpdateForm(wtf.Form): analytics_id = wtf.TextField('Analytics ID', filters=[util.strip_filter]) announcement_html = wtf.TextAreaField('Announcement HTML', filters=[util.strip_filter]) announcement_type = wtf.SelectField( 'Announcement Type', choices=[(t, t.title()) for t in model.Config.announcement_type._choices]) brand_name = wtf.TextField('Brand Name', [wtf.validators.required()], filters=[util.strip_filter]) facebook_app_id = wtf.TextField('Facebook App ID', filters=[util.strip_filter]) facebook_app_secret = wtf.TextField('Facebook App Secret', filters=[util.strip_filter]) feedback_email = wtf.TextField( 'Feedback Email', [wtf.validators.optional(), wtf.validators.email()], filters=[util.strip_filter]) flask_secret_key = wtf.TextField('Flask Secret Key', [wtf.validators.required()], filters=[util.strip_filter]) locale = wtf.SelectField('Default Locale', choices=config.LOCALE_SORTED) twitter_consumer_key = wtf.TextField('Twitter Consumer Key', filters=[util.strip_filter]) twitter_consumer_secret = wtf.TextField('Twitter Consumer Secret', filters=[util.strip_filter])
class OrganizePhotoForm(wtf.Form): """Form for adding a photo to a photo album .. method:: OrganizePhotoForm(albumName, photo) :param albumName: Name of photo album :type albumName: unicode :param photo: Photo URL :type photo: unicode :rtype: Form instance """ albumName = wtf.TextField('Album Name: ', validators=[validators.Required()]) photo = wtf.TextField('Photo URL: ', validators=[validators.Required()])
class CreateUpdateProfileForm(wtf.Form): """Form for Creating and Updating User Profiles .. method:: CreateUpdateProfileForm(fname, mname, lname, caseid, avatar, contract[, family, big]) :param fname: Brother's first name :type fname: unicode :param mname: Brother's middle name :type mname: unicode :param lname: Brother's last name :type lname: unicode :param caseid: Brother's Case ID :type caseid: unicode :param avatar: Brother's avatar URL :type avatar: unicode :param contract: Brother's signed contract type :type contract: application.model.Contract :param family: Brother's assigned family :type family: application.model.Family :param big: Brother's assigned big :type big: unicode :rtype: Form instance """ fname = wtf.TextField('First Name: ', validators=[validators.Required()]) mname = wtf.TextField('Middle Name: ', validators=[validators.Optional()]) lname = wtf.TextField('Last Name: ', validators=[validators.Required()]) caseid = wtf.TextField('Case ID: ', validators=[validators.Required()]) contract = wtf.TextField('Contract type: ', validators=[validators.Optional()]) family = wtf.TextField('Family: ', validators=[validators.Optional()]) big = wtf.TextField('Big: ', validators=[validators.Optional()]) avatar = wtf.TextField('Gravatar Email: ', validators=[validators.Optional()]) password = wtf.PasswordField('Password: ', validators=[validators.Optional()])
class CreditCardForm(wtf.Form): number = wtf.TextField('Credit Card Number') exp_month = wtf.SelectField('', choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8'), ('9', '9'), ('10', '10'), ('11', '11'), ('12', '12')]) exp_year = wtf.SelectField('', choices=[('2012', '2012'), ('2013', '2013'), ('2014', '2014'), ('2015', '2015'), ('2016', '2016'), ('2017', '2017'), ('2018', '2018')]) cvc = wtf.TextField('CVC')
class VenueForm(wtf.Form): postcode = wtf.TextField('Postcode', validators=[validators.Required()]) city = wtf.TextField('City', validators=[validators.Required()]) name = wtf.TextField('Name', validators=[validators.Required()]) description = wtf.TextField('Description', validators=[validators.Required()]) venueId = wtf.TextField('VenueId', validators=[validators.Required()]) street = wtf.TextField('Street', validators=[validators.Required()]) number = wtf.TextField('Number', validators=[validators.Required()]) lat = wtf.TextField('Lat', validators=[validators.Required()]) long = wtf.TextField('Long', validators=[validators.Required()])
class PostcardForm(wtf.Form): username = wtf.TextField('username', validators=[wtf.Length(max=20), wtf.Required()]) origin = wtf.TextField('origin', validators=[wtf.Required()]) date = wtf.DateField('date of postmark', format='%m/%d/%Y', default=datetime.date.today()) origin_country = wtf.HiddenField() origin_latitude = wtf.DecimalField() origin_longitude = wtf.DecimalField() front = wtf.TextField('front of card') back = wtf.TextField('back of card') tags = wtf.TextField('tags (comma-delimited)')
class NewPostForm(wtf.Form): """ Create a new blog post """ title = wtf.TextField('Title*', [validators.Required()]) text = wtf.TextAreaField('Text*', [validators.Required()])
class SecurityGroupRuleAdd(wtf.Form): ip_protocol = wtf.SelectField( 'IP Protocol', choices=[('tcp', 'TCP'), ('udp', 'UDP'), ('icmp', 'ICMP')]) from_port = wtf.IntegerField( "From Port", validators=[wtf.NumberRange(min=-1, max=65536)]) to_port = wtf.IntegerField( "To Port", validators=[wtf.NumberRange(min=-1, max=65536)]) group_id = wtf.SelectField('Source Group', choices=[]) cidr = wtf.TextField( "CIDR", default="0.0.0.0/0") def __init__(self, *args, **kwargs): security_group_id = kwargs.pop('security_group_id') super(SecurityGroupRuleAdd, self).__init__(*args, **kwargs) security_groups = (clients.user_clients(flask.g.tenant_id).compute. security_groups.list()) self.group_id.choices = [('<None>', '')] + [(str(sg.id), sg.name) for sg in security_groups if str(sg.id) != str(security_group_id)]
class RegistrationForm(wtf.Form): email = wtf.TextField('Email Address', [validators.Required()]) password = wtf.PasswordField('New Password', [ validators.Required(), validators.EqualTo('confirm', message='Passwords must match') ]) confirm = wtf.PasswordField('Repeat Password')
class ApplicationForm(wtf.Form): title = wtf.TextField('Application title', validators=[wtf.Required(), wtf.Length(2, 100)]) url = wtf.html5.URLField('Application website', validators=[wtf.Required()]) description = wtf.TextAreaField('Description', validators=[wtf.Required()]) submit = wtf.SubmitField('Create application')
class FeedbackForm(wtf.Form): subject = wtf.TextField( _('Subject'), [wtf.validators.required()], filters=[util.strip_filter], ) message = wtf.TextAreaField( _('Message'), [wtf.validators.required()], filters=[util.strip_filter], ) email = wtf.TextField( _('Email (optional)'), [wtf.validators.optional(), wtf.validators.email()], filters=[util.strip_filter], )
class ProfileUpdateForm(wtf.Form): name = wtf.TextField( _('Name'), [wtf.validators.required()], filters=[util.strip_filter], ) email = wtf.TextField( _('Email'), [wtf.validators.optional(), wtf.validators.email()], filters=[util.strip_filter], ) locale = wtf.SelectField( _('Language'), choices=config.LOCALE_SORTED, filters=[util.strip_filter], )