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.

24 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. hitbox = TextField('hitbox')
  9. bio_text = TextAreaField('bio_text')
  10. class EnableStatsForm(Form):
  11. teamspeak_id = TextField('teamspeak_id')
  12. forum_username = TextField('forum_username')
  13. forum_password = PasswordField('forum_password')
  14. class EventForm(Form):
  15. name = TextField('name', [validators.Required()])
  16. desc = TextAreaField('desc', [validators.Required()])
  17. type = SelectField(u'Event Type', choices=[('coaching', 'Coaching'), ('inhouse', 'In-House'), ('tournament', 'Tournament'), ('other', 'Other')])
  18. start_time = DateTimeField('start_time', format='%d.%m.%Y %H:%M')
  19. end_time = DateTimeField('end_time', format='%d.%m.%Y %H:%M')
  20. points = IntegerField('points', [validators.Required()])
  21. reward_threshold = IntegerField('reward_threshold')