netclock/countdown/forms.py

13 lines
643 B
Python
Raw Permalink Normal View History

2020-09-12 17:51:47 +00:00
from flask_wtf import FlaskForm
2020-09-13 13:07:11 +00:00
from wtforms import fields
from wtforms.validators import Optional
2020-09-12 10:58:38 +00:00
2020-10-26 10:07:42 +00:00
2020-09-12 10:58:38 +00:00
class CountdownAdminForm(FlaskForm):
2020-09-13 18:04:03 +00:00
hours = fields.IntegerField("Hours", [Optional()],
2020-10-26 10:07:42 +00:00
render_kw={"min": 0, "max": 999, "placeholder": "00", "autocomplete": "off"})
2020-09-13 18:04:03 +00:00
minutes = fields.IntegerField("Minutes", [Optional()],
2020-10-26 10:07:42 +00:00
render_kw={"min": 0, "max": 59, "placeholder": "00", "autocomplete": "off"})
2020-09-13 18:04:03 +00:00
seconds = fields.IntegerField("Seconds", [Optional()],
2020-10-26 10:07:42 +00:00
render_kw={"min": 0, "max": 59, "placeholder": "00", "autocomplete": "off"})