|
|
@ -23,6 +23,7 @@ def user_create(domain_name):
|
|
|
|
return flask.redirect(
|
|
|
|
return flask.redirect(
|
|
|
|
flask.url_for('.user_list', domain_name=domain.name))
|
|
|
|
flask.url_for('.user_list', domain_name=domain.name))
|
|
|
|
form = forms.UserForm()
|
|
|
|
form = forms.UserForm()
|
|
|
|
|
|
|
|
form.pw.validators = [wtforms.validators.DataRequired()]
|
|
|
|
if domain.max_quota_bytes:
|
|
|
|
if domain.max_quota_bytes:
|
|
|
|
form.quota_bytes.validators = [
|
|
|
|
form.quota_bytes.validators = [
|
|
|
|
wtforms.validators.NumberRange(max=domain.max_quota_bytes)]
|
|
|
|
wtforms.validators.NumberRange(max=domain.max_quota_bytes)]
|
|
|
@ -54,7 +55,6 @@ def user_edit(user_email):
|
|
|
|
# Create the form
|
|
|
|
# Create the form
|
|
|
|
form = forms.UserForm(obj=user)
|
|
|
|
form = forms.UserForm(obj=user)
|
|
|
|
wtforms_components.read_only(form.localpart)
|
|
|
|
wtforms_components.read_only(form.localpart)
|
|
|
|
form.pw.validators = []
|
|
|
|
|
|
|
|
form.localpart.validators = []
|
|
|
|
form.localpart.validators = []
|
|
|
|
if max_quota_bytes:
|
|
|
|
if max_quota_bytes:
|
|
|
|
form.quota_bytes.validators = [
|
|
|
|
form.quota_bytes.validators = [
|
|
|
|