Update translations strings, add setting datetime and improve DC login flow
This commit is contained in:
parent
ed8723ee6b
commit
410f1b7913
11 changed files with 151 additions and 702 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from flask_wtf import FlaskForm
|
||||
from flask_wtf.file import FileAllowed, FileRequired
|
||||
from wtforms import StringField, PasswordField, SubmitField, BooleanField, FileField, RadioField
|
||||
from wtforms import StringField, PasswordField, SubmitField, BooleanField, FileField, RadioField, DateTimeField
|
||||
from wtforms.validators import DataRequired, ValidationError, Length
|
||||
from flask_babel import lazy_gettext as _l
|
||||
import re
|
||||
|
|
@ -32,8 +32,10 @@ class Step1Form(FlaskForm):
|
|||
|
||||
class Step2Form(FlaskForm):
|
||||
butterbox_name = StringField(_l('Butterbox Name'), validators=[DataRequired()])
|
||||
butterbox_logo = FileField((_l('Butterbox Logo')), validators=[FileAllowed(['jpg', 'png', 'svg'], 'Images only!')])
|
||||
butterbox_logo = FileField((_l('Butterbox Logo')), validators=[FileAllowed(['jpg', 'png', 'svg'], _l('Images only!'))])
|
||||
butterbox_hostname = StringField(_l('Butterbox Hostname'), validators=[DataRequired(), Length(1, 64), hostname_check])
|
||||
butterbox_date = DateTimeField(_l('Butterbox Date'), format='%d/%m/%Y, %H:%M:%S')
|
||||
|
||||
submit = SubmitField(_l('Next'))
|
||||
|
||||
class Step3Form(FlaskForm):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue