+from django.forms.fields import CharField
+from django.forms.widgets import Textarea
from threadedcomments.forms import ThreadedCommentForm
from xerxes.tools.forms import ContextModelForm
from models import Influence, Character
# didn't get this to work yet.
#
class InfluenceCommentForm(ThreadedCommentForm):
+ # Force the textare to 80 columns. This is really a hack, we should
+ # rather create a template tag to do this at the template level.
+ comment = CharField(widget=Textarea(attrs={'cols' : 80}))
def __init__(self, *args, **kwargs):
super(InfluenceCommentForm, self).__init__(*args, **kwargs)
exclude = ('markup', )
class AdminInfluenceCommentForm(ThreadedCommentForm):
+ comment = CharField(widget=Textarea(attrs={'cols' : 80}))
def __init__(self, *args, **kwargs):
super(AdminInfluenceCommentForm, self).__init__(*args, **kwargs)
exclude = ('markup', )
class AdminPrivateInfluenceCommentForm(ThreadedCommentForm):
+ comment = CharField(widget=Textarea(attrs={'cols' : 80}))
def __init__(self, *args, **kwargs):
super(AdminPrivateInfluenceCommentForm, self).__init__(*args, **kwargs)
self.instance.is_public = False