Changeset 613

Show
Ignore:
Timestamp:
10/27/06 11:03:44
Author:
crchemist
Message:

Copied from branches/plone-2.5.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneComments/trunk/Extensions/Install.py

    r612 r613  
    99 
    1010import string 
    11 try: 
    12     True 
    13 except: 
    14     True = 1 
    15     False = 0 
    1611 
    1712def setupSkin(self, out, layers): 
     
    3833            skinstool.addSkinSelection( skin, path ) 
    3934 
    40      
     35 
    4136def install(self): 
    4237    out=StringIO() 
     
    4944    elif plone_version.startswith('2.0'): 
    5045        plone_version = '2.0.5' 
     46    elif plone_version.startswith('2.5'): 
     47        plone_version = '2.5' 
    5148    else: 
    52         raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-2.1.2") 
     49        raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-2.5") 
    5350 
    5451    product_path = package_home(GLOBALS) 
     
    6663        out.write("Adding %s property sheet to portal_properies\n" % 'qPloneComments' ) 
    6764    props_sheet = pp['qPloneComments'] 
    68     updateProperty(props_sheet, id="enable_moderation", value="True", property_type='boolean', out=out) 
    69     updateProperty(props_sheet, id="enable_anonymous_commenting", value="True", property_type='boolean', out=out) 
    70     updateProperty(props_sheet, id="enable_published_notification", value="True", property_type='boolean', out=out) 
    71     updateProperty(props_sheet, id="enable_approve_notification", value="True", property_type='boolean', out=out) 
    72     updateProperty(props_sheet, id="email_discussion_manager", value="", property_type='string', out=out) 
    73     updateProperty(props_sheet, id="email_subject_prefix", value="", property_type='string', out=out) 
     65    updateProperties(props_sheet, out, PROPERTIES) 
    7466    # Tern on Anonymous commenting 
    7567    self.manage_permission(ReplyToItem, ['Anonymous','Manager','Member'], 1) 
     
    8577 
    8678    # Add DiscussionManager role to Portal 
    87     roles = list(self.__ac_roles__) 
    88     if not 'DiscussionManager' in roles: 
    89         roles.append( 'DiscussionManager' ) 
    90         roles = tuple(roles) 
    91         self.__ac_roles__ = roles 
    92         out.write("Added DiscussionManager role top portal.\n") 
     79    if plone_version == '2.5': 
     80        uf = getToolByName(self, 'acl_users') 
     81        rmanager = uf.portal_role_manager 
     82        existing = rmanager.listRoleIds() 
     83        if not 'DiscussionManager' in existing: 
     84            rmanager.addRole('DiscussionManager') 
     85            out.write("Added DiscussionManager role top portal.\n") 
     86    else: 
     87        roles = list(self.__ac_roles__) 
     88        if not 'DiscussionManager' in roles: 
     89            roles.append('DiscussionManager') 
     90            roles = tuple(roles) 
     91            self.__ac_roles__ = roles 
     92            out.write("Added DiscussionManager role top portal.\n") 
    9393 
    9494    self.manage_permission('Moderate Discussion', ['DiscussionManager', 'Manager']) 
    9595    #  Add 'DiscussionManagers' group 
    96     portal_groups = getToolByName(self, 'portal_groups') 
    97     if not 'DiscussionManager' in portal_groups.listGroupIds(): 
    98         portal_groups.addGroup('DiscussionManager', roles=['DiscussionManager']) 
     96    gtool = getToolByName(self, 'portal_groups') 
     97    existing = gtool.listGroupIds() 
     98    if not 'DiscussionManager' in existing: 
     99        gtool.addGroup('DiscussionManager', roles=['DiscussionManager']) 
    99100        out.write("Added DiscussionManager group to portal_groups with DiscussionManager role.\n") 
    100101 
     
    108109 
    109110 
    110 def updateProperty(pp_ps, id, value, property_type, out): 
    111     if not pp_ps.hasProperty(id): 
    112         pp_ps.manage_addProperty(id, value, property_type) 
    113         out.write("Adding %s property to %s property sheet\n" % (id, 'qPloneComments') ) 
    114  
     111def updateProperties(pp_ps, out, *args): 
     112    for prop in args: 
     113        for prop_id, prop_value, prop_type in prop: 
     114            if not pp_ps.hasProperty(prop_id): 
     115                pp_ps.manage_addProperty(prop_id, prop_value, prop_type) 
     116                out.write("Adding %s property to %s property sheet\n" % (prop_id, 'qPloneComments') ) 
    115117 
    116118def uninstall(self) : 
  • qPloneComments/trunk/Extensions/__init__.py

    r612 r613  
    11# this file is here to make Install.py importable. 
    2 # we need to make it non-zero size to make winzip cooperate 
  • qPloneComments/trunk/config.py

    r612 r613  
    88CONFIGLET_NAME = "qPloneComments setup" 
    99 
     10PROPERTIES = (('enable_approve_user_notification', 'True', 'boolean'), 
     11              ('enable_reply_user_notification', 'True', 'boolean'), 
     12              ('enable_rejected_user_notification', 'True', 'boolean'), 
     13              ('enable_moderation', 'True', 'boolean'), 
     14              ('require_email', 'False', 'boolean'), 
     15              ('enable_anonymous_commenting', 'True', 'boolean'), 
     16              ('enable_published_notification', 'True', 'boolean'), 
     17              ('enable_approve_notification', 'True', 'boolean'), 
     18              ('email_discussion_manager', '', 'string'), 
     19              ('email_subject_prefix', '', 'string')) 
  • qPloneComments/trunk/patch.py

    r612 r613  
    1010# Patching createReply method of  
    1111# Products.CMFDefault.DiscussionItem.DiscussionItemContainer 
    12 def createReply( self, title, text, Creator=None ): 
     12def createReply( self, title, text, Creator=None, email=''): 
    1313    """ 
    1414        Create a reply in the proper place 
     
    3131 
    3232    pm = getToolByName(self, 'portal_membership') 
    33     value = 0 
     33 
    3434    if pm.isAnonymousUser(): 
    35         value = 1 
    36     if item.hasProperty('isAnon'): 
    37         item.manage_changeProperties({'id':'isAnon','value':value}) 
     35        userid = 'anonym' 
    3836    else: 
    39         item.manage_addProperty(id='isAnon', value=value, type='boolean') 
     37        userid = pm.getAuthenticatedMember().getId() 
     38 
     39    item.manage_addProperty(id='userid', value=userid, type='string') 
     40    item.manage_addProperty(id='email', value=email, type='string') 
    4041 
    4142    item.review_state="private" 
  • qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_publish_comment.py

    r612 r613  
    1010from Products.CMFPlone import transaction_note 
    1111from Products.CMFCore.utils import getToolByName 
    12 from Products.qPloneComments.utils import publishDiscussion, send_email 
     12from Products.qPloneComments.utils import publishDiscussion 
    1313 
    1414if obj is None: 
     
    2525publishDiscussion(reply) 
    2626 
    27 send_notification_message = send_email(reply, container, state="published") 
    28  
    29 portal_status_message='Comment+successfully+published' 
     27portal_status_message='Comment+published' 
    3028 
    3129transaction_note('Published discussion item') 
  • qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_reply.cpy

    r612 r613  
    1111from Products.PythonScripts.standard import url_quote_plus 
    1212from Products.CMFCore.utils import getToolByName 
    13 from Products.qPloneComments.utils import send_email 
     13from Products.qPloneComments.utils import manage_mails 
    1414 
    1515mtool = getToolByName(context, 'portal_membership') 
     
    1919# Get properties 
    2020isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 
    21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None); 
     21ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) 
     22requireEmail = pp['qPloneComments'].getProperty('require_email', False) 
    2223 
    2324if username or password: 
     
    6263 
    6364tb = context.talkback 
    64 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 
     65 
     66if requireEmail: 
     67    if mtool.isAnonymousUser(): 
     68        email = req.get('user_email', '') 
     69    else: 
     70        email = mtool.getAuthenticatedMember().getProperty('email') 
     71 
     72    id = tb.createReply(title=subject, text=body_text, Creator=comment_creator, email=email) 
     73else: 
     74    id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 
     75 
    6576reply = tb.getReply(id) 
    6677 
     
    7283 
    7384# Send notification e-mail 
    74 send_notification_message = send_email(reply, context, state="approve"
     85manage_mails(reply, context, 'aproving'
    7586if not ifModerate: 
    76     send_notification_message += send_email(reply, context, state="published"
     87    manage_mails(reply, context, 'publishing'
    7788 
    7889from Products.CMFPlone import transaction_note 
    7990transaction_note('Added comment to %s at %s' % (parent.title_or_id(), reply.absolute_url())) 
    8091 
    81 portal_status_message='Comment successfully added.' 
     92portal_status_message='Comment published.' 
    8293 
    8394# Inform user about awaiting moderation 
    8495if ifModerate and reply: 
    85     portal_status_message='Your comment awaits moderation.' 
     96    portal_status_message=url_quote_plus('Currently, all comments require approval before being published. Please check back later.') 
    8697 
    8798target = '%s/%s?portal_status_message=%s' % (parent.absolute_url(), parent.getTypeInfo().getActionById('view'), portal_status_message) 
  • qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_reply_form.cpt

    r612 r613  
    3030 
    3131            <div class="field" 
    32                  tal:condition="isForAnonymous"> 
     32                 tal:condition="isForAnonymous" 
     33                 i18n:domain="plonecomments"> 
    3334 
    3435                <div class="field" 
     
    5657                               size="40" 
    5758                               tabindex="" 
    58                                i18n:attributes="title" 
     59                               i18n:attributes="alt title" 
    5960                               tal:attributes="tabindex tabindex/next; 
    6061                                               value python:test(isAnon, '', member.getUserName()); 
     
    6263 
    6364                    </div> 
     65 
     66                    <div class="field" 
     67                         tal:define="property_id string:require_email; 
     68                                     props_sheet here/portal_properties/qPloneComments" 
     69                         tal:condition="python:props_sheet.getProperty(property_id) and isAnon"> 
     70 
     71                        <label for="user_email" i18n:translate="label_discussion-manager_email">Please enter your email:</label> 
     72                        <span class="fieldRequired" title="Required" 
     73                              i18n:attributes="title title_required;" 
     74                              i18n:translate="label_required">(Required) 
     75                        </span> 
     76                        <div tal:content="string:">Validation error output</div> 
     77 
     78                        <input name="user_email" 
     79                               value="" 
     80                               size="40" 
     81                               tabindex="" 
     82                               tal:attributes="tabindex tabindex/next;" /> 
     83                    </div> 
     84 
    6485                </div> 
    6586            </div> 
  • qPloneComments/trunk/skins/qplonecomments/2.0.5/discussionitem_view.pt

    r612 r613  
    5151                  method="post" 
    5252                  style="display: inline;" 
    53                   tal:condition="python: checkPermission('Manage portal', here)" 
     53                  tal:condition="python: checkPermission('Moderate Discussion', here)" 
    5454                  tal:attributes="action string:${here/absolute_url}/deleteDiscussion"> 
    5555 
    5656                <input class="destructive" 
    5757                   type="submit" 
    58                    value="Remove This Reply" 
     58                   value="Remove this reply" 
    5959                   i18n:attributes="value" 
    6060                   /> 
     
    7070                <input class="standalone" 
    7171                       type="submit" 
    72                        value="Publish This Reply" 
     72                       value="Publish" 
     73                                          i18n:domain="plonecomments" 
    7374                       i18n:attributes="value" 
    7475                       /> 
     
    7677 
    7778            <div class="documentByLine" 
    78                  tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 
     79                 tal:condition="not:isPublished"> 
     80                                <span i18n:translate="text_no_reply_until_published">Until publishing this comment adding reply impossible.</span> 
     81                   </div> 
    7982 
    8083        </div> 
  • qPloneComments/trunk/skins/qplonecomments/2.0.5/validate_talkback.vpy

    r612 r613  
    2525        req = context.REQUEST 
    2626        if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 
    27             state.setError('Creator', 'Please enter your Name.', 'name_required') 
     27            state.setError('Creator', 'Please enter your name.', 'name_required') 
    2828 
    2929if state.getErrors(): 
  • qPloneComments/trunk/skins/qplonecomments/2.0.5/viewThreadsAtBottom.pt

    r612 r613  
    100100                        <input class="destructive" 
    101101                               type="submit" 
    102                                value="Remove This Discussion
     102                               value="Remove
    103103                               i18n:attributes="value" 
    104104                               /> 
     
    114114                        <input class="standalone" 
    115115                               type="submit" 
    116                                value="Publish This Discussion
     116                               value="Publish
    117117                               i18n:attributes="value" 
    118118                               /> 
     
    120120 
    121121                    <div class="documentByLine" 
    122                          tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 
     122                         i18n:translate="text_no_add_reply" 
     123                         tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div> 
    123124 
    124125                    <div tal:define="replies python:here.getReplyReplies(reply)" 
  • qPloneComments/trunk/skins/qplonecomments/2.1/discussion_publish_comment.py

    r612 r613  
    1010from Products.CMFPlone import transaction_note 
    1111from Products.CMFCore.utils import getToolByName 
    12 from Products.qPloneComments.utils import publishDiscussion, send_email 
     12from Products.qPloneComments.utils import publishDiscussion 
    1313 
    1414if obj is None: 
     
    2525publishDiscussion(reply) 
    2626 
    27 send_notification_message = send_email(reply, container, state="published") 
    28  
    29 portal_status_message='Comment+successfully+published' 
     27portal_status_message='Comment published.' 
    3028 
    3129putils = getToolByName(context, 'plone_utils') 
  • qPloneComments/trunk/skins/qplonecomments/2.1/discussion_reply.cpy

    r612 r613  
    1111from Products.PythonScripts.standard import url_quote_plus 
    1212from Products.CMFCore.utils import getToolByName 
    13 from Products.qPloneComments.utils import send_email 
     13from Products.qPloneComments.utils import manage_mails 
    1414 
    1515mtool = getToolByName(context, 'portal_membership') 
     
    1919# Get properties 
    2020isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 
    21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None); 
     21ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) 
     22requireEmail = pp['qPloneComments'].getProperty('require_email', False) 
    2223 
    2324if username or password: 
     
    6263 
    6364tb = dtool.getDiscussionFor(context) 
    64 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 
     65 
     66if requireEmail: 
     67    if mtool.isAnonymousUser(): 
     68        email = req.get('user_email', '') 
     69    else: 
     70        email = mtool.getAuthenticatedMember().getProperty('email') 
     71 
     72    id = tb.createReply(title=subject, text=body_text, Creator=comment_creator, email=email) 
     73else: 
     74    id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 
     75 
    6576reply = tb.getReply(id) 
    6677 
     
    7283 
    7384# Send notification e-mail 
    74 send_notification_message = send_email(reply, context, state="approve"
     85manage_mails(reply, context, 'aproving'
    7586if not ifModerate: 
    76     send_notification_message += send_email(reply, context, state="published"
     87    manage_mails(reply, context, 'publishing'
    7788 
    7889# return to the discussable object. 
     
    8293 
    8394# Inform user about awaiting moderation 
    84 portal_status_message='Comment+successfully+added
     95portal_status_message='Comment published.
    8596if ifModerate and reply: 
    86     portal_status_message='Your+comment+awaits+moderation' 
     97    portal_status_message=url_quote_plus('Currently, all comments require approval before being published. Please check back later.') 
    8798 
    8899from Products.CMFPlone.utils import transaction_note 
  • qPloneComments/trunk/skins/qplonecomments/2.1/discussion_reply_form.cpt

    r612 r613  
    7676 
    7777            <div class="field" 
    78                  tal:condition="isForAnonymous"> 
     78                 tal:condition="isForAnonymous" 
     79                 i18n:domain="plonecomments"> 
    7980 
    8081                <div class="field" 
     
    102103                               size="40" 
    103104                               tabindex="" 
    104                                i18n:attributes="title" 
     105                               i18n:attributes="alt title" 
    105106                               tal:attributes="tabindex tabindex/next; 
    106107                                               value python:test(isAnon, '', member.getUserName()); 
     
    109110                    </div> 
    110111                </div> 
     112              <div class="field" 
     113                     tal:define="property_id string:require_email; 
     114                                 props_sheet here/portal_properties/qPloneComments" 
     115                     tal:condition="python:props_sheet.getProperty(property_id) and isAnon"> 
     116 
     117                    <label for="user_email" i18n:translate="label_discussion-manager_email">Please enter your email:</label> 
     118                    <span class="fieldRequired" title="Required" 
     119                          i18n:attributes="title title_required;" 
     120                          i18n:translate="label_required">(Required) 
     121                    </span> 
     122                    <div tal:content="string:">Validation error output</div> 
     123 
     124                    <input name="user_email" 
     125                           value="" 
     126                           size="40" 
     127                           tabindex="" 
     128                           tal:attributes="tabindex tabindex/next;" /> 
     129                </div> 
     130 
    111131            </div> 
    112132 
  • qPloneComments/trunk/skins/qplonecomments/2.1/validate_talkback.vpy

    r612 r613  
    3333        req = context.REQUEST 
    3434        if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 
    35             state.setError('Creator', 'Please enter your Name.', 'name_required') 
     35            state.setError('Creator', 'Please enter your name.', 'name_required') 
    3636 
    3737if state.getErrors(): 
  • qPloneComments/trunk/skins/qplonecomments/2.1/viewThreadsAtBottom.pt

    r612 r613  
    112112                    <br/> 
    113113                    <div class="documentByLine" 
    114                          tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 
     114                         i18n:translate="text_no_add_reply" 
     115                         tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div> 
    115116 
    116117                </div> 
  • qPloneComments/trunk/skins/qplonecomments/approve_comment_template.pt

    r612 r613  
    1 <div i18n:domain="plone"  
     1<div i18n:domain="plonecomments" 
    22     tal:omit-tag="" 
    33     tal:define="charset here/portal_properties/site_properties/default_charset|string:utf-8; 
     
    66>To: <tal:x replace="options/mto"/> 
    77From: <tal:x replace="options/mfrom"/> 
    8 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/>New comment awaits moderation 
     8Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="approvemail_subject">New comment awaits moderation</tal:subject> 
    99 
    10 <tal:x define="obj nocall:options/obj"> 
    11 New comment added to page "<tal:x replace="obj/Title"/>" at: 
    12 <tal:x replace="obj/absolute_url"/> 
    13 </tal:x> 
     10<tal:new_comment define="obj nocall:options/obj"  
     11       i18n:translate="approvemail_new_comment_link"> 
     12       Please review new comment added to the following page "<tal:x replace="obj/Title" i18n:name="title"/>": 
     13       <tal:link replace="obj/absolute_url" i18n:name="link"/> 
     14</tal:new_comment> 
    1415 
    1516-- 
    16 <tal:x condition="organization_name" replace="string:$organization_name "/>Support Team. 
    17  
     17<tal:signature i18n:translate="signature"> 
     18    <tal:organization_name condition="organization_name" 
     19                           replace="string:$organization_name" 
     20                           i18n:name="organization_name"/> 
     21Support Team 
     22</tal:signature> 
    1823</div> 
  • qPloneComments/trunk/skins/qplonecomments/prefs_comments_setup.cpy

    r612 r613  
    1010from Products.CMFCore.utils import getToolByName 
    1111from Products.qPloneComments.utils import setAnonymCommenting 
    12 #from AccessControl.Permission import Permission 
     12 
    1313form = context.REQUEST.form 
    1414pp = getToolByName(context, 'portal_properties') 
  • qPloneComments/trunk/skins/qplonecomments/prefs_comments_setup_form.cpt

    r612 r613  
    22      xml:lang="en" 
    33      lang="en" 
    4       i18n:domain="plone
     4      i18n:domain="plonecomments
    55      metal:use-macro="here/prefs_main_template/macros/master"> 
    66        <!--      metal:use-macro="here/main_template/macros/master" --> 
     
    1010     tal:define="errors python:request.get('controller_state', None).getErrors();"> 
    1111 
    12     <div metal:define-macro="main" i18n:domain="plone"> 
     12    <div metal:define-macro="main" i18n:domain="plonecomments"> 
    1313    <div class="configlet"> 
    1414    <div class="documentEditable"> 
    1515 
    16     <!-- simulating views --> 
     16    <!-- simulating views on the configure/comments pages until we have real objects. --> 
    1717    <ul class="contentViews" 
    1818       tal:define="tabs python:('Configure qPloneComments','prefs_comments_setup_form'), ('Recent comments moderation','prefs_recent_comments_form'),; 
     
    3030    <div class="contentActions"> 
    3131    &nbsp; 
    32     </div>         
     32    </div> 
    3333    <!-- End of tabs --> 
    3434    <div class="documentContent" metal:define-slot="prefs_content"> 
    35         <h1 i18n:translate="qpc_setup">qPloneComments Setup</h1> 
     35        <h1 i18n:translate="heading_comments_setup">Plone Comments Setup</h1> 
    3636 
    3737        <a href="" 
    3838           class="link-parent" 
    3939           tal:attributes="href string: $portal_url/plone_control_panel" 
    40            i18n:translate="label_up_to_plone_setup"> 
     40           i18n:translate="label_up_to_plone_setup" 
     41           i18n:domain="plone"> 
    4142           Up to Plone Setup 
    4243        </a> 
     
    5152 
    5253            <fieldset> 
    53                 <legend i18n:translate="legend_qpc_notification_legend">qPloneComments setup Details</legend> 
     54                <legend i18n:translate="legend_setup_options">qPloneComments setup options</legend> 
    5455 
    5556                <div class="field" 
     
    7071                    <label i18n:translate="label_enable_moderation"  
    7172                           for="isEnabledModeration">Enable moderation.</label> 
    72                      
     73 
     74                </div> 
     75 
     76                <div class="field" 
     77                     tal:define="property_id string:require_email; 
     78                                 requireEmail python:props_sheet.getProperty(property_id, False);" 
     79                     tal:condition="python:props_sheet.hasProperty(property_id)"> 
     80 
     81                    <input type="checkbox"  
     82                           class="noborder" 
     83                           name="requireEmail" 
     84                           id="requireEmail" 
     85                           tabindex ="" 
     86                           tal:attributes="name property_id; 
     87                                           value requireEmail; 
     88                                           checked python:test(requireEmail, 'True', ''); 
     89                                           tabindex tabindex/next;"/> 
     90 
     91                    <label i18n:translate="label_require_anonym_email"  
     92                           for="requireEmail">Require Anonym Email.</label> 
     93 
    7394                </div> 
    7495 
     
    89110 
    90111                    <label i18n:translate="label_anonymous_commenting"  
    91                            for="isEnabledAnonymousCommenting">Enable anonymous comenting.</label> 
    92                      
    93                 </div> 
    94  
    95                 <div class="field" 
    96                      tal:define="property_id string:enable_published_notification; 
    97                                  isEnabledPublishedNotification python:props_sheet.getProperty(property_id, False);" 
    98                      tal:condition="python:props_sheet.hasProperty(property_id)"> 
    99  
    100                     <input type="checkbox"  
    101                            class="noborder" 
    102                            name="isEnabledPublishedNotification" 
    103                            id="isEnabledPublishedNotification" 
    104                            tabindex ="" 
    105                            tal:attributes="name property_id; 
    106                                            value isEnabledPublishedNotification; 
    107                                            checked python:test(isEnabledPublishedNotification, 'True', ''); 
    108                                            tabindex tabindex/next;"/> 
    109  
    110                     <label i18n:translate="label_enable_published_notification"  
    111                            for="isEnabledPublishedNotification">Enable Document Owner notification on new comments.</label> 
    112                 </div> 
    113  
    114                 <div class="field" 
    115                      tal:define="property_id string:enable_approve_notification; 
    116                                  isEnableApproveNotification python:props_sheet.getProperty(property_id, False);" 
    117                      tal:condition="python:props_sheet.hasProperty(property_id)"> 
    118  
    119                     <input type="checkbox"  
    120                            class="noborder" 
    121                            name="isEnableApproveNotification" 
    122                            id="isEnableApproveNotification" 
    123                            tabindex ="" 
    124                            tal:attributes="name property_id; 
    125                                            value isEnableApproveNotification; 
    126                                            checked python:test(isEnableApproveNotification, 'True', ''); 
    127                                            tabindex tabindex/next;"/> 
    128  
    129                     <label i18n:translate="label_enable_approve_notification" 
    130                            for="isEnableApproveNotification">Enable Discussion Manager notification on new comments.</label> 
     112                           for="isEnabledAnonymousCommenting">Enable anonymous commenting.</label> 
    131113                </div> 
    132114 
     
    140122                           tabindex ="" 
    141123                           tal:attributes="value isEnabledManagerModeration; 
    142                                           checked python:test(isEnabledManagerModeration, 'True', ''); 
     124                                           checked python:test(isEnabledManagerModeration, 'True', ''); 
    143125                                           tabindex tabindex/next;"/> 
    144126 
     
    160142                        The e-mail address where notifications about adding new comments will be sent. 
    161143                    </div> 
    162                      
     144 
    163145                    <div tal:content="error">Validation error output</div> 
    164146 
     
    176158                                 organization_name python:props_sheet.getProperty(property_id, '');" 
    177159                     tal:condition="python:props_sheet.hasProperty(property_id)"> 
    178          
     160 
    179161                    <label i18n:translate="label_organization_name">Email subject prefix (organization name)</label> 
    180          
     162 
    181163                    <div class="formHelp" id="organization_name_help" 
    182164                         i18n:translate="help_organization_name"> 
    183165                        You can change notification message templates customizing 'approve_comment_template' and 'published_comment_template' from qplonecomments skin. 
    184166                    </div> 
    185                      
     167 
    186168                    <input name="organization_name" 
    187169                           value="" 
     
    193175                </div> 
    194176 
    195                 <div class="formControls"> 
    196                     <input type="hidden" name="form.submitted" value="1" /> 
    197  
    198                     <input class="context" 
    199                            tabindex="" 
    200                            type="submit" 
    201                            name="form.button.form_submit" 
    202                            value="Save" 
    203                            i18n:attributes="value" 
    204                            tal:attributes="tabindex tabindex/next;" 
    205                            /> 
    206                 </div> 
    207             </fieldset>   
     177            </fieldset> 
     178 
     179 
     180 
     181 
     182            <fieldset> 
     183                <legend i18n:translate="legend_qpc_notification_legend">Notification tuning</legend> 
     184 
     185                <div class="field" 
     186                     tal:define="property_id string:enable_published_notification; 
     187                                 isEnabledPublishedNotification python:props_sheet.getProperty(property_id, False);" 
     188                     tal:condition="python:props_sheet.hasProperty(property_id)"> 
     189 
     190                    <input type="checkbox"  
     191                           class="noborder" 
     192                           name="isEnabledPublishedNotification" 
     193                           id="isEnabledPublishedNotification" 
     194                           tabindex ="" 
     195                           tal:attributes="name property_id; 
     196                                           value isEnabledPublishedNotification; 
     197                                           checked python:test(isEnabledPublishedNotification, 'True', ''); 
     198                                           tabindex tabindex/next;"/> 
     199 
     200                    <label i18n:translate="label_enable_published_notification"  
     201                           for="isEnabledPublishedNotification">Enable Document Owner notification on new comments.</label> 
     202                </div> 
     203 
     204                <div class="field" 
     205                     tal:define="property_id string:enable_approve_notification; 
     206                                 isEnableApproveNotifica