Commit 2e3f28c5 authored by Julien Muchembled's avatar Julien Muchembled

Workflow_statusModify: allow to redirect to another document even in case of ValidationFailed

parent 31aad8c9
...@@ -118,10 +118,11 @@ except ValidationFailed, error_message:\n ...@@ -118,10 +118,11 @@ except ValidationFailed, error_message:\n
# that would become an error.\n # that would become an error.\n
log("Status message has been truncated")\n log("Status message has been truncated")\n
message = "%s ..." % message[:(2000 - 4)]\n message = "%s ..." % message[:(2000 - 4)]\n
return context.Base_redirect(form_id,\n else:\n
keep_items={\'portal_status_message\': message}, **kw)\n message = request.get(\'portal_status_message\')\n
\n if message is None:\n
portal_status_message = request.get(\'portal_status_message\', translateString(\'Status changed.\'))\n message = translateString(\'Status changed.\')\n
kw.clear() # useful ?\n
\n \n
# Allow to redirect to another document\n # Allow to redirect to another document\n
redirect_document_path = request.get(\'redirect_document_path\', None)\n redirect_document_path = request.get(\'redirect_document_path\', None)\n
...@@ -132,7 +133,7 @@ else:\n ...@@ -132,7 +133,7 @@ else:\n
redirect_document = context\n redirect_document = context\n
\n \n
return redirect_document.Base_redirect(form_id,\n return redirect_document.Base_redirect(form_id,\n
keep_items={\'portal_status_message\': portal_status_message})\n keep_items={\'portal_status_message\': message}, **kw)\n
]]></string> </value> ]]></string> </value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment