forked from Github-Mirrors/canaille
Bumped to wtforms 3.0.0a1
This commit is contained in:
parent
e7cc0b255a
commit
33ca7993d4
3 changed files with 12 additions and 13 deletions
|
@ -1,6 +1,5 @@
|
|||
import datetime
|
||||
import wtforms
|
||||
import wtforms.fields.html5
|
||||
from flask import Blueprint, render_template, request, flash, redirect, url_for
|
||||
from flask_wtf import FlaskForm
|
||||
from flask_babel import lazy_gettext as _
|
||||
|
@ -25,17 +24,17 @@ class ClientAdd(FlaskForm):
|
|||
validators=[wtforms.validators.DataRequired()],
|
||||
render_kw={"placeholder": "Client Name"},
|
||||
)
|
||||
oauthClientContact = wtforms.fields.html5.EmailField(
|
||||
oauthClientContact = wtforms.EmailField(
|
||||
_("Contact"),
|
||||
validators=[wtforms.validators.Optional()],
|
||||
render_kw={"placeholder": "admin@mydomain.tld"},
|
||||
)
|
||||
oauthClientURI = wtforms.fields.html5.URLField(
|
||||
oauthClientURI = wtforms.URLField(
|
||||
_("URI"),
|
||||
validators=[wtforms.validators.DataRequired()],
|
||||
render_kw={"placeholder": "https://mydomain.tld"},
|
||||
)
|
||||
oauthRedirectURIs = wtforms.fields.html5.URLField(
|
||||
oauthRedirectURIs = wtforms.URLField(
|
||||
_("Redirect URIs"),
|
||||
validators=[wtforms.validators.DataRequired()],
|
||||
render_kw={"placeholder": "https://mydomain.tld/callback"},
|
||||
|
@ -74,17 +73,17 @@ class ClientAdd(FlaskForm):
|
|||
],
|
||||
default="client_secret_basic",
|
||||
)
|
||||
oauthLogoURI = wtforms.fields.html5.URLField(
|
||||
oauthLogoURI = wtforms.URLField(
|
||||
_("Logo URI"),
|
||||
validators=[wtforms.validators.Optional()],
|
||||
render_kw={"placeholder": "https://mydomain.tld/logo.png"},
|
||||
)
|
||||
oauthTermsOfServiceURI = wtforms.fields.html5.URLField(
|
||||
oauthTermsOfServiceURI = wtforms.URLField(
|
||||
_("Terms of service URI"),
|
||||
validators=[wtforms.validators.Optional()],
|
||||
render_kw={"placeholder": "https://mydomain.tld/tos.html"},
|
||||
)
|
||||
oauthPolicyURI = wtforms.fields.html5.URLField(
|
||||
oauthPolicyURI = wtforms.URLField(
|
||||
_("Policy URI"),
|
||||
validators=[wtforms.validators.Optional()],
|
||||
render_kw={"placeholder": "https://mydomain.tld/policy.html"},
|
||||
|
@ -104,7 +103,7 @@ class ClientAdd(FlaskForm):
|
|||
validators=[wtforms.validators.Optional()],
|
||||
render_kw={"placeholder": ""},
|
||||
)
|
||||
oauthJWKURI = wtforms.fields.html5.URLField(
|
||||
oauthJWKURI = wtforms.URLField(
|
||||
_("JKW URI"),
|
||||
validators=[wtforms.validators.Optional()],
|
||||
render_kw={"placeholder": ""},
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import wtforms
|
||||
import wtforms.fields.html5
|
||||
from flask_babel import lazy_gettext as _
|
||||
from flask_wtf import FlaskForm
|
||||
|
||||
|
@ -72,10 +71,10 @@ class ProfileForm(FlaskForm):
|
|||
)
|
||||
# preferred_username = wtforms.StringField(_("Preferred username"))
|
||||
# gender = wtforms.StringField(_("Gender"))
|
||||
# birthdate = wtforms.fields.html5.DateField(_("Birth date"))
|
||||
# birthdate = wtforms.DateField(_("Birth date"))
|
||||
# zoneinfo = wtforms.StringField(_("Zoneinfo"))
|
||||
# locale = wtforms.StringField(_("Language"))
|
||||
email = wtforms.fields.html5.EmailField(
|
||||
email = wtforms.EmailField(
|
||||
_("Email address"),
|
||||
validators=[wtforms.validators.DataRequired(), wtforms.validators.Email()],
|
||||
render_kw={
|
||||
|
@ -85,11 +84,11 @@ class ProfileForm(FlaskForm):
|
|||
},
|
||||
)
|
||||
# address = wtforms.StringField(_("Address"))
|
||||
phone_number = wtforms.fields.html5.TelField(
|
||||
phone_number = wtforms.TelField(
|
||||
_("Phone number"), render_kw={"placeholder": _("555-000-555")}
|
||||
)
|
||||
# picture = wtforms.StringField(_("Photo"))
|
||||
# website = wtforms.fields.html5.URLField(_("Website"))
|
||||
# website = wtforms.URLField(_("Website"))
|
||||
|
||||
def validate_password2(self, field):
|
||||
if self.password1.data and self.password1.data != field.data:
|
||||
|
|
|
@ -34,6 +34,7 @@ install_requires =
|
|||
python-ldap
|
||||
sentry-sdk[flask]
|
||||
toml
|
||||
wtforms==3.0.0a1
|
||||
|
||||
[options.packages.find]
|
||||
exclude =
|
||||
|
|
Loading…
Reference in a new issue