Last change
on this file since 1059 was
822,
checked in by koval, 17 years ago
|
little change in member properties extraction
|
File size:
678 bytes
|
Rev | Line | |
---|
[822] | 1 | ## Controller Script Python "validate_reply" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind state=state |
---|
| 7 | ##bind subpath=traverse_subpath |
---|
| 8 | ##parameters= |
---|
| 9 | ##title=validates discussion_reply |
---|
| 10 | from Products.CMFPlone import MessageFactory |
---|
| 11 | _ = MessageFactory('quintagroup.plonecomments') |
---|
| 12 | |
---|
| 13 | if hasattr(context, 'review_state') and not context.review_state=="published": |
---|
| 14 | msg = _(u'Reply not allowed because the response is to a comment waiting to be\ |
---|
| 15 | approved. Please wait for the comment to be approved before replying.') |
---|
| 16 | |
---|
| 17 | state.set(status='failure', portal_status_message=msg) |
---|
| 18 | return state.set(status='failure') |
---|
| 19 | |
---|
| 20 | return state |
---|
Note: See
TracBrowser
for help on using the repository browser.