## Script (Python) "script_task ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind state=state ##bind subpath=traverse_subpath ##title=Task stuff ## REQUEST=context.REQUEST action = REQUEST.get('action') if action=='copy': ans = context.answerTask(REQUEST) state.set( portal_status_message="Answered" ) return REQUEST.RESPONSE.redirect(ans.absolute_url()+'/task_view') elif action=='save': context.saveTask(REQUEST) state.set( portal_status_message="Answer saved" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/task_view') elif action=='accept': context.acceptAnswer() state.set( portal_status_message="Answer accepted" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/task_view') elif action=='comment': context.addComment(REQUEST) state.set( portal_status_message="Commented" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/task_view') else: return state.set( portal_status_message="Something is wrong with request" )