netclock/countdown/forms.py

13 lines
672 B
Python
Raw 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.fields import html5
from wtforms.validators import Optional
2020-09-12 10:58:38 +00:00
class CountdownAdminForm(FlaskForm):
2020-09-13 18:04:03 +00:00
hours = fields.IntegerField("Hours", [Optional()],
render_kw = {"min":0, "max":999, "placeholder": "00", "autocomplete": "off"})
minutes = fields.IntegerField("Minutes", [Optional()],
render_kw = {"min":0, "max":59, "placeholder": "00", "autocomplete": "off"})
seconds = fields.IntegerField("Seconds", [Optional()],
render_kw = {"min":0, "max":59, "placeholder": "00", "autocomplete": "off"})