[PATCH] show subscribe button only when watchlist is enabled

3 views
Skip to first unread message

Denis

unread,
Nov 3, 2010, 6:31:54 PM11/3/10
to byteflow...@googlegroups.com
# HG changeset patch
# User Denis <denis@localhost>
# Date 1288737006 -3600
# Node ID 6464deecaf0e8978ad3f5ee07e55a8eaeb07c456
# Parent 53129849c8cf1a2b2e0223c473b3727e41780036
show subscribe button only when watchlist is enabled

diff -r 53129849c8cf -r 6464deecaf0e apps/discussion/forms.py
--- a/apps/discussion/forms.py Tue Nov 02 23:22:09 2010 +0100
+++ b/apps/discussion/forms.py Tue Nov 02 23:30:06 2010 +0100
@@ -16,7 +16,8 @@

class CommentForm(forms.Form):
body = CommentNode._meta.get_field('body').formfield()
- subscribe = forms.BooleanField(required=False, initial=True, label=_(u'Subscribe to comments'))
+ if appcheck.watchlist:
+ subscribe = forms.BooleanField(required=False, initial=True, label=_(u'Subscribe to comments'))
reply_to = forms.IntegerField(required=False, widget=forms.HiddenInput)

def __init__(self, *args, **kwargs):

Reply all
Reply to author
Forward
0 new messages