Obey the 80 chars limit in the comments view.
svn path=/plone.app.discussion/trunk/; revision=39332
This commit is contained in:
parent
785b006394
commit
dc160f9d5e
@ -112,7 +112,8 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
|||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
portal_membership = getToolByName(self.context, 'portal_membership')
|
portal_membership = getToolByName(self.context, 'portal_membership')
|
||||||
if settings.captcha != 'disabled' and portal_membership.isAnonymousUser():
|
if settings.captcha != 'disabled' and \
|
||||||
|
portal_membership.isAnonymousUser():
|
||||||
if not 'captcha' in data:
|
if not 'captcha' in data:
|
||||||
data['captcha'] = u""
|
data['captcha'] = u""
|
||||||
captcha = CaptchaValidator(self.context,
|
captcha = CaptchaValidator(self.context,
|
||||||
@ -306,7 +307,8 @@ class CommentsViewlet(ViewletBase):
|
|||||||
portal_membership = getToolByName(self.context,
|
portal_membership = getToolByName(self.context,
|
||||||
'portal_membership',
|
'portal_membership',
|
||||||
None)
|
None)
|
||||||
return portal_membership.getPersonalPortrait(username).absolute_url();
|
return portal_membership.getPersonalPortrait(username)\
|
||||||
|
.absolute_url()
|
||||||
|
|
||||||
def anonymous_discussion_allowed(self):
|
def anonymous_discussion_allowed(self):
|
||||||
# Check if anonymous comments are allowed in the registry
|
# Check if anonymous comments are allowed in the registry
|
||||||
@ -327,7 +329,8 @@ class CommentsViewlet(ViewletBase):
|
|||||||
return portal_membership.isAnonymousUser()
|
return portal_membership.isAnonymousUser()
|
||||||
|
|
||||||
def login_action(self):
|
def login_action(self):
|
||||||
return '%s/login_form?came_from=%s' % (self.navigation_root_url,
|
return '%s/login_form?came_from=%s' % \
|
||||||
|
(self.navigation_root_url,
|
||||||
url_quote(self.request.get('URL', '')),)
|
url_quote(self.request.get('URL', '')),)
|
||||||
|
|
||||||
def format_time(self, time):
|
def format_time(self, time):
|
||||||
|
Loading…
Reference in New Issue
Block a user