DotaNoobs main site.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.1 KiB

  1. from flask_wtf import Form
  2. from wtforms import TextField, BooleanField, TextAreaField, PasswordField, SelectField, IntegerField, DateTimeField, validators
  3. from datetime import datetime
  4. class SettingsForm(Form):
  5. public = BooleanField('public', default=True)
  6. logo = BooleanField('biglogo', default=True)
  7. twitch = TextField('twitch')
  8. bio_text = TextAreaField('bio_text')
  9. class EnableStatsForm(Form):
  10. teamspeak_id = TextField('teamspeak_id')
  11. forum_username = TextField('forum_username')
  12. forum_password = PasswordField('forum_password')
  13. class EventForm(Form):
  14. name = TextField('name', [validators.Required()])
  15. desc = TextAreaField('desc', [validators.Required()])
  16. type = SelectField(u'Event Type', choices=[('coaching', 'Coaching'), ('inhouse', 'In-House'), ('tournament', 'Tournament'), ('other', 'Other')])
  17. start_time = DateTimeField('start_time', format='%d.%m.%Y %H:%M')
  18. end_time = DateTimeField('end_time', format='%d.%m.%Y %H:%M')
  19. points = IntegerField('points', [validators.Required()])
  20. reward_threshold = IntegerField('reward_threshold')