Commit 4de60b0d authored by Ivan Tyagov's avatar Ivan Tyagov

Ignore form fields passed in REQUESt to this method.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21522 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66aa92b9
...@@ -139,9 +139,15 @@ else:\n ...@@ -139,9 +139,15 @@ else:\n
\n \n
# Change acquisition context of document, in order to get web section layout\n # Change acquisition context of document, in order to get web section layout\n
target = context.restrictedTraverse(target.getRelativeUrl())\n target = context.restrictedTraverse(target.getRelativeUrl())\n
target.REQUEST.set(\'editable_mode\', editable_mode)\n target_request = target.REQUEST\n
target.REQUEST.set(\'portal_status_message\', msg)\n target_request.set(\'editable_mode\', editable_mode)\n
return target.view()\n target_request.set(\'portal_status_message\', msg)\n
# clean up REQUEST as it is possible that this script is called\n
# on an another Document in an edit view (then fields will be passed in REQUEST \n
# overriding next form HTML generation in \'target.view()\' )\n
for key in target_request.form.keys():\n
if key.startswith(\'field_my_\'):\n
del target_request.form[key]\n
\n \n
# XXX Do not use redirect, as it leeds to conflict error with convertion process\n # XXX Do not use redirect, as it leeds to conflict error with convertion process\n
# return target.Base_redirect(\'view\',\n # return target.Base_redirect(\'view\',\n
...@@ -161,6 +167,12 @@ return target.view()\n ...@@ -161,6 +167,12 @@ return target.view()\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>contribute_file=None, contribute_classification=None, contribute_source_project=None, contribute_portal_type=None, **kw</string> </value> <value> <string>contribute_file=None, contribute_classification=None, contribute_source_project=None, contribute_portal_type=None, **kw</string> </value>
...@@ -218,6 +230,9 @@ return target.view()\n ...@@ -218,6 +230,9 @@ return target.view()\n
<string>AttributeError</string> <string>AttributeError</string>
<string>target</string> <string>target</string>
<string>dict</string> <string>dict</string>
<string>target_request</string>
<string>_getiter_</string>
<string>key</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
644 645
\ No newline at end of file \ No newline at end of file
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