class ProductForm(Form): name = fields.TextField(label=_('Name'), description=_('The name of the product'), validators=[validators.Required()]) description = fields.TextAreaField( label=_('Description'), description=_('A few words about the product'), validators=[validators.Required()]) price = fields.FloatField(label=_('Price'), description=_('The price of the product'), validators=[validators.Required()]) unit = fields.SelectField(label=_('Unit'), description=_('The unit of the product'), choices=[('piece', _('Piece')), ('gram', _('Gram')), ('pack', _('Pack'))], validators=[validators.Required()]) live = fields.BooleanField( label=_('Set live'), default=True, description=_('Live products will appear immediately')) tags = fields.TextField( label=_('Tags'), description=_('List of tags, separated by comma (,)')) language = fields.SelectField( label=_('Language'), description=_('The site language the product will appear'), choices=[('hu_HU', _('Magyar')), ('en_US', _('English'))], default='hu_HU', validators=[validators.Required()])
class RegistrationForm(Form): username = fields.TextField(_('Username'), validators=[REQUIRED]) password = fields.PasswordField(_('Password'), validators=[REQUIRED]) password_confirm = fields.PasswordField(_('Confirm the password'), validators=[REQUIRED]) email = fields.TextField(_('E-mail'), validators=[REQUIRED]) email_confirm = fields.TextField(_('E-mail confirmation'), validators=[REQUIRED])
class AddLinkForm(Form): name = fields.TextField('Site Name', validators=[REQUIRED]) href = fields.TextField('URL', validators=[validators.URL(), REQUIRED], widget=LinkWidget()) def save(self): new_link = Link(**self.data) new_link.status = 'submitted' new_link.put()
class OrderForm(Form): comment = fields.TextAreaField(_('Comment')) delivery_method = fields.RadioField(_('Delivery Method'), choices=[('pickup', _('Pick up')), ('box', _('Box delivery'))], validators=[REQUIRED]) delivery_address = fields.TextField(_('Address')) delivery_city = fields.TextField(_('City')) delivery_zip = fields.TextField(_('Zip Code')) delivery_info = fields.TextAreaField(_('Other Information'))
class FileForm(Form): title = fields.TextField(label=_('Title'), description=_('The title of the file'), validators=[validators.Required()]) file_data = fields.FileField(label=_('File to upload'), description=_('Select file to upload'), validators=[validators.Required()])
class BlogPostForm(Form): """Form class for Blog post validation""" title = fields.TextField(label=_('Title'), description=_('The title of your blog post'), validators=[validators.Required()]) lead = fields.TextAreaField( label=_('Lead'), description=_('A limited length lead text for your post'), validators=[validators.Required()]) content = fields.TextAreaField( label=_('Content'), description=_('The main text for your blog post'), validators=[validators.Required()]) live = fields.BooleanField( label=_('Set live'), description=_('Live posts will appear immediately')) tags = fields.TextField( label=_('Tags'), description=_('List of tags, separated by comma (,)')) language = fields.SelectField( label=_('Language'), description=_('The site language the product will appear'), choices=[('hu_HU', _('Magyar')), ('en_US', _('English'))], default='hu_HU', validators=[validators.Required()])
class PageForm(Form): title = fields.TextField(label=_('Title'), description=_('The title of the page'), validators=[validators.Required()]) content = fields.TextAreaField(label=_('Content'), description=_('Content of the page'), validators=[validators.Required()]) live = fields.BooleanField( label=_('Set live'), default=True, description=_('Live products will appear immediately')) language = fields.SelectField( label=_('Language'), description=_('The site language the page will appear'), choices=[('hu_HU', _('Magyar')), ('en_US', _('English'))], default='hu_HU', validators=[validators.Required()])
class SignupForm(Form): nickname = fields.TextField(_('Username'), validators=[REQUIRED])
class LoginForm(Form): username = fields.TextField(_('Username'), validators=[REQUIRED]) password = fields.PasswordField(_('Password'), validators=[REQUIRED]) remember = fields.BooleanField(_('Keep me signed in'))
class RegistrationForm(Form): username = fields.TextField('Username', validators=[REQUIRED]) password = fields.PasswordField('Password', validators=[REQUIRED]) password_confirm = fields.PasswordField('Confirm the password', validators=[REQUIRED])
class SignupForm(Form): nickname = fields.TextField('Nickname', validators=[REQUIRED])
class RequestAccountForm(Form): email = fields.TextField('Email Address', validators=[REQUIRED, EMAIL]) username = fields.TextField('Desired Username', validators=[REQUIRED]) companyname = fields.TextField('Company Name') message = fields.TextAreaField('Message')
class UserInfoForm(Form): username = fields.TextField("Username") email = fields.TextField("Email") password = fields.PasswordField('Password') password_confirm = fields.PasswordField('Confirm the password')
class RegistrationForm(Form): username = fields.TextField('Username', validators=[REQUIRED]) email = fields.TextField('Email') password = fields.PasswordField('Password', validators=[REQUIRED]) password_confirm = fields.PasswordField('Confirm the password', validators=[REQUIRED]) clients = fields.SelectField("Select the client to associate this user to<br />(None for brentwood printing staff)", choices=getClientChoices())