Commit dac5f058 authored by Jérome Perrin's avatar Jérome Perrin

Base_callDialogMethod: The current dialog in can be a python script that...

Base_callDialogMethod: The current dialog in can be a python script that returns a form, so if getattr(context, form_id) is not a form, call it to get the form.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17711 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40eb6a23
......@@ -155,6 +155,11 @@ if kw.has_key(\'pickle_string\'):\n
else:\n
form_context = context\n
form = getattr(form_context, dialog_id)\n
\n
# form can be a python script that returns the form\n
if not hasattr(form, \'validate_all_to_request\'):\n
form = form()\n
\n
# Validate the form\n
try:\n
# It is necessary to force editable_mode before validating\n
......@@ -351,6 +356,7 @@ return context.REQUEST.RESPONSE.redirect(redirect_url)\n
<string>form_context</string>
<string>getattr</string>
<string>form</string>
<string>hasattr</string>
<string>request</string>
<string>editable_mode</string>
<string>validation_errors</string>
......@@ -363,7 +369,6 @@ return context.REQUEST.RESPONSE.redirect(redirect_url)\n
<string>field</string>
<string>k</string>
<string>v</string>
<string>hasattr</string>
<string>splitted</string>
<string>len</string>
<string>_write_</string>
......
577
\ No newline at end of file
579
\ 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