Changeset 546
- Timestamp:
- 09/28/06 07:06:55
- Files:
-
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_publish_comment.py (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply.cpy (modified) (4 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply_form.cpt (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_publish_comment.py (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_reply_form.cpt (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_comments_setup_form.cpt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_publish_comment.py
r545 r546 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.1/discussion_reply.cpy
r545 r546 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') … … 20 20 isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 21 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 = dtool.getDiscussionFor(context) 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 # return to the discussable object. qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply_form.cpt
r545 r546 109 109 </div> 110 110 </div> 111 <div class="field" 112 tal:define="property_id string:require_email; 113 props_sheet here/portal_properties/qPloneComments" 114 tal:condition="python:props_sheet.getProperty(property_id) and isAnon"> 115 116 <label for="user_email" i18n:translate="label_discussion-manager_email">Please enter your email:</label> 117 <span class="fieldRequired" title="Required" 118 i18n:attributes="title title_required;" 119 i18n:translate="label_required">(Required) 120 </span> 121 <div tal:content="string:">Validation error output</div> 122 123 <input name="user_email" 124 value="" 125 size="40" 126 tabindex="" 127 tal:attributes="tabindex tabindex/next;" /> 128 </div> 129 111 130 </div> 112 131 qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_publish_comment.py
r545 r546 10 10 from Products.CMFPlone import transaction_note 11 11 from Products.CMFCore.utils import getToolByName 12 from Products.qPloneComments.utils import publishDiscussion ,12 from Products.qPloneComments.utils import publishDiscussion 13 13 14 14 if obj is None: … … 25 25 publishDiscussion(reply) 26 26 27 28 27 portal_status_message='Comment+successfully+published' 29 28 qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_reply_form.cpt
r545 r546 120 120 i18n:translate="label_required">(Required) 121 121 </span> 122 <div tal:content="string:">Validation error output</div>122 <div tal:content="string:">Validation error output</div> 123 123 124 124 <input name="user_email" … … 127 127 tabindex="" 128 128 tal:attributes="tabindex tabindex/next;" /> 129 </div>129 </div> 130 130 </div> 131 131 qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_comments_setup_form.cpt
r545 r546 258 258 </div> 259 259 260 <div class="field"261 tal:define="property_id string:enable_reply_user_notification;262 isReplyNotificationEnabled python:props_sheet.getProperty(property_id, False);"263 tal:condition="python:props_sheet.hasProperty(property_id)">264 265 <input type="checkbox"266 class="noborder"267 name="isReplyNotificationEnabled"268 id="isReplyNotificationEnabled"269 tabindex =""270 tal:attributes="name property_id;271 value isReplyNotificationEnabled;272 checked python:test(isReplyNotificationEnabled, 'True', '');273 tabindex tabindex/next;"/>274 275 <label i18n:translate="label_enable_approve_notification"276 for="isReplyNotificationEnabled">Enable Commentator notification on comment was replied.</label>277 </div>278 260 279 261 <div class="field"
