Changeset 549
- Timestamp:
- 09/28/06 08:49:57
- Files:
-
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_publish_comment.py (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply.cpy (modified) (4 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply_form.cpt (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply.cpy (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_publish_comment.py
r548 r549 10 10 from Products.CMFPlone import transaction_note 11 11 from Products.CMFCore.utils import getToolByName 12 from Products.qPloneComments.utils import publishDiscussion , send_email12 from Products.qPloneComments.utils import publishDiscussion 13 13 14 14 if obj is None: … … 25 25 publishDiscussion(reply) 26 26 27 send_notification_message = send_email(reply, container, state="published")28 29 27 portal_status_message='Comment+successfully+published' 30 28 qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply.cpy
r548 r549 11 11 from Products.PythonScripts.standard import url_quote_plus 12 12 from Products.CMFCore.utils import getToolByName 13 from Products.qPloneComments.utils import send_email13 from Products.qPloneComments.utils import manage_mails 14 14 15 15 mtool = getToolByName(context, 'portal_membership') … … 19 19 # Get properties 20 20 isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None); 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) 22 requireEmail = pp['qPloneComments'].getProperty('require_email', False) 22 23 23 24 if username or password: … … 62 63 63 64 tb = context.talkback 64 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 65 66 if 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) 73 else: 74 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 75 65 76 reply = tb.getReply(id) 66 77 … … 72 83 73 84 # Send notification e-mail 74 send_notification_message = send_email(reply, context, state="approve")85 manage_mails(reply, context, 'aproving') 75 86 if not ifModerate: 76 send_notification_message += send_email(reply, context, state="published")87 manage_mails(reply, context, 'publishing') 77 88 78 89 from Products.CMFPlone import transaction_note qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply_form.cpt
r548 r549 62 62 63 63 </div> 64 65 <div class="field" 66 tal:define="property_id string:require_email; 67 props_sheet here/portal_properties/qPloneComments" 68 tal:condition="python:props_sheet.getProperty(property_id) and isAnon"> 69 70 <label for="user_email" i18n:translate="label_discussion-manager_email">Please enter your email:</label> 71 <span class="fieldRequired" title="Required" 72 i18n:attributes="title title_required;" 73 i18n:translate="label_required">(Required) 74 </span> 75 <div tal:content="string:">Validation error output</div> 76 77 <input name="user_email" 78 value="" 79 size="40" 80 tabindex="" 81 tal:attributes="tabindex tabindex/next;" /> 82 </div> 83 64 84 </div> 65 85 </div> qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply.cpy
r548 r549 19 19 # Get properties 20 20 isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) ;21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) 22 22 requireEmail = pp['qPloneComments'].getProperty('require_email', False) 23 23
