aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-08 15:07:07 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-20 08:10:50 -0700
commit93d805ad6b0e5324c515323d2fc0a4a7ea3f1dad (patch)
treeef393bce2e8f8d6cc587225a7c5733c125c9a914 /mediagoblin/edit
parent4a2aa93c6abeb4831a03a9e8bd7089d0a6f2470e (diff)
downloadmediagoblin-93d805ad6b0e5324c515323d2fc0a4a7ea3f1dad.tar.lz
mediagoblin-93d805ad6b0e5324c515323d2fc0a4a7ea3f1dad.tar.xz
mediagoblin-93d805ad6b0e5324c515323d2fc0a4a7ea3f1dad.zip
add user prefrence for insite notifications
Diffstat (limited to 'mediagoblin/edit')
-rw-r--r--mediagoblin/edit/forms.py2
-rw-r--r--mediagoblin/edit/views.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 85c243a0..5de1bf96 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -67,6 +67,8 @@ class EditAccountForm(wtforms.Form):
normalize_user_or_email_field(allow_user=False)])
wants_comment_notification = wtforms.BooleanField(
description=_("Email me when others comment on my media"))
+ wants_notifications = wtforms.BooleanField(
+ description=_("Enable/Disable insite notifications"))
license_preference = wtforms.SelectField(
_('License preference'),
[
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index 6aa2acd9..a11cb932 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -228,10 +228,12 @@ def edit_account(request):
user = request.user
form = forms.EditAccountForm(request.form,
wants_comment_notification=user.wants_comment_notification,
- license_preference=user.license_preference)
+ license_preference=user.license_preference,
+ wants_notifications=user.wants_notifications)
if request.method == 'POST' and form.validate():
user.wants_comment_notification = form.wants_comment_notification.data
+ user.wants_notifications = form.wants_notifications.data
user.license_preference = form.license_preference.data