diff --git a/CHANGES.rst b/CHANGES.rst index 2608f3a..1a0e008 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -22,6 +22,8 @@ Bug fixes: Bug fixes: +- Cleaned code from flake8 errors. [maurits] + - Reset the required setting of the author_email widget each time. Otherwise, the email field might get set to required when an anonymous user visits, and then remain required when an diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index 300b7a6..bf6671b 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -37,8 +37,8 @@ author_home_url python:view.get_commenter_home_url(username=reply.author_username); has_author_link python:author_home_url and not isAnon; portrait_url python:view.get_commenter_portrait(reply.author_username); - review_state python:wtool.getInfoFor(reply, 'review_state', 'none'); - canEdit python:view.can_edit(reply); + review_state python:wtool.getInfoFor(reply, 'review_state', 'none'); + canEdit python:view.can_edit(reply); canDelete python:view.can_delete(reply)" tal:attributes="class python:'comment replyTreeLevel'+str(depth)+' state-'+str(review_state); id string:${reply/getId}" @@ -92,9 +92,9 @@ action="" method="post" class="commentactionsform" - tal:condition="python:not canDelete and isDeleteOwnCommentAllowed and view.could_delete_own(reply)" + tal:condition="python:not canDelete and isDeleteOwnCommentAllowed and view.could_delete_own(reply)" tal:attributes="action string:${reply/absolute_url}/@@delete-own-comment; - style python:view.can_delete_own(reply) and 'display: inline' or 'display: none'"> + style python:view.can_delete_own(reply) and 'display: inline' or 'display: none'"> *' - }); - } + if($.fn.prepOverlay){ + $('form[name="edit"]').prepOverlay({ + cssclass: 'overlay-edit-comment', + width: '60%', + subtype: 'ajax', + filter: '#content>*' + }); + } /********************************************************************** * Delete a comment and its answers. diff --git a/plone/app/discussion/contentrules.py b/plone/app/discussion/contentrules.py index 390178b..c8f602a 100644 --- a/plone/app/discussion/contentrules.py +++ b/plone/app/discussion/contentrules.py @@ -17,7 +17,8 @@ except ImportError: try: from plone.app.contentrules.handlers import execute except ImportError: - execute = lambda context, event: False + def execute(context, event): + return False def execute_comment(event): diff --git a/plone/app/discussion/profiles/default/registry.xml b/plone/app/discussion/profiles/default/registry.xml index bd6aa5b..1e0d535 100644 --- a/plone/app/discussion/profiles/default/registry.xml +++ b/plone/app/discussion/profiles/default/registry.xml @@ -1,7 +1,7 @@ - - False - False - + + False + False + diff --git a/plone/app/discussion/profiles/default/rolemap.xml b/plone/app/discussion/profiles/default/rolemap.xml index 0410b29..e63aae6 100644 --- a/plone/app/discussion/profiles/default/rolemap.xml +++ b/plone/app/discussion/profiles/default/rolemap.xml @@ -22,7 +22,7 @@ - +