diff --git a/admin/freeposte/forms.py b/admin/freeposte/forms.py
index 2e1a72cc..5103819d 100644
--- a/admin/freeposte/forms.py
+++ b/admin/freeposte/forms.py
@@ -27,7 +27,7 @@ class UserCreateForm(Form):
class UserEditForm(Form):
- quota = fields.IntegerField('Quota')
+ quota_bytes = fields.IntegerField('Quota')
submit = fields.SubmitField('Create')
diff --git a/admin/freeposte/models.py b/admin/freeposte/models.py
index da0c46f7..b0eca45a 100644
--- a/admin/freeposte/models.py
+++ b/admin/freeposte/models.py
@@ -64,7 +64,7 @@ class User(Address):
# Filters
forward = db.Column(db.String(160), nullable=True, default=None)
- reply_topic = db.Column(db.String(255), nullable=True, default=None)
+ reply_subject = db.Column(db.String(255), nullable=True, default=None)
reply_body = db.Column(db.Text(), nullable=True, default=None)
# Settings
diff --git a/admin/freeposte/templates/user/list.html b/admin/freeposte/templates/user/list.html
index dc300d56..084a1f7d 100644
--- a/admin/freeposte/templates/user/list.html
+++ b/admin/freeposte/templates/user/list.html
@@ -27,7 +27,7 @@ User list
-
+
diff --git a/admin/freeposte/views/users.py b/admin/freeposte/views/users.py
index 6aec6451..c7dc9171 100644
--- a/admin/freeposte/views/users.py
+++ b/admin/freeposte/views/users.py
@@ -41,9 +41,9 @@ def user_create(domain_name):
@flask_login.login_required
def user_edit(user_email):
user = utils.get_user(user_email, True)
- form = forms.UserEditForm()
+ form = forms.UserEditForm(obj=user)
if form.validate_on_submit():
- user.quota_bytes = form.quota.data
+ user.quota_bytes = form.quota_bytes.data
db.session.add(user)
db.session.commit()
flask.flash('User %s updated' % user)
@@ -67,7 +67,7 @@ def user_delete(user_email):
@flask_login.login_required
def user_settings(user_email):
user = utils.get_user(user_email)
- form = forms.UserSettingsForm()
+ form = forms.UserSettingsForm(obj=user)
if form.validate_on_submit():
user.displayed_name = form.displayed_name.data
user.spam_enabled = form.spam_enabled.data
@@ -106,7 +106,7 @@ def user_password(user_email):
@flask_login.login_required
def user_forward(user_email):
user = utils.get_user(user_email)
- form = forms.UserForwardForm()
+ form = forms.UserForwardForm(obj=user)
if form.validate_on_submit():
user.forward = form.forward.data
db.session.add(user)
@@ -123,7 +123,7 @@ def user_forward(user_email):
@flask_login.login_required
def user_reply(user_email):
user = utils.get_user(user_email)
- form = forms.UserReplyForm()
+ form = forms.UserReplyForm(obj=user)
if form.validate_on_submit():
user.reply_subject = form.reply_subject.data
user.reply_body = form.reply_body.data