Commit 92721c0d authored by Vincent Pelletier's avatar Vincent Pelletier

Add layout support to base_edit : needed to edit objects from a "Web Site"...

Add layout support to base_edit : needed to edit objects from a "Web Site" object (see erp5_web business template).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6106 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d078c17d
......@@ -267,7 +267,9 @@ except FormValidationError, validation_errors:\n
\n
else:\n
message = N_("Data+Updated.")\n
if not selection_index:\n
if not(ignore_layout) and context.getApplicableLayout() :\n
redirect_url = \'%s?editable_mode=1\' % context.WebSite_getDocumentUrl()\n
elif not selection_index:\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( context.absolute_url()\n
, form_id\n
, message\n
......@@ -307,7 +309,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id, selection_index=0, selection_name=\'\',dialog_id=\'\'</string> </value>
<value> <string>form_id, selection_index=0, selection_name=\'\', dialog_id=\'\', ignore_layout=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -327,7 +329,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>4</int> </value>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -337,6 +339,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>selection_index</string>
<string>selection_name</string>
<string>dialog_id</string>
<string>ignore_layout</string>
<string>Products.Formulator.Errors</string>
<string>ValidationError</string>
<string>FormValidationError</string>
......@@ -414,6 +417,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<int>0</int>
<string></string>
<string></string>
<none/>
</tuple>
</value>
</item>
......
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