Commit 08b17d47 authored by Vincent Pelletier's avatar Vincent Pelletier

Add support for layouts when creating a new object.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6465 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1adfc44a
...@@ -103,10 +103,16 @@ elif doAction0 == \'add\':\n ...@@ -103,10 +103,16 @@ elif doAction0 == \'add\':\n
container=context,\n container=context,\n
id=str(new_id))\n id=str(new_id))\n
message = N_("Object+Created.")\n message = N_("Object+Created.")\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( \n if not(ignore_layout) and context.getApplicableLayout():\n
new_content.absolute_url() \n redirect_url = \'%s/%s?portal_status_message=%s&editable_mode=1\' % (\n
, \'view\'\n new_content.WebSite_getDocumentPhysicalPath()\n
, message)\n , \'view\'\n
, message)\n
else:\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( \n
new_content.absolute_url() \n
, \'view\'\n
, message)\n
return request.RESPONSE.redirect( redirect_url )\n return request.RESPONSE.redirect( redirect_url )\n
# Otherwise, check if this is an automatic menu (template)\n # Otherwise, check if this is an automatic menu (template)\n
elif doAction0 == \'template\':\n elif doAction0 == \'template\':\n
...@@ -152,7 +158,7 @@ return getattr(context,form_id)(request)\n ...@@ -152,7 +158,7 @@ return getattr(context,form_id)(request)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>action_select=None, form_id=\'\', selection_index=\'\', selection_name=\'\', uids=None, listbox_uid=None, md5_object_uid_list=None, is_list=0</string> </value> <value> <string>action_select=None, form_id=\'\', selection_index=\'\', selection_name=\'\', uids=None, listbox_uid=None, md5_object_uid_list=None, is_list=0, ignore_layout=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -172,7 +178,7 @@ return getattr(context,form_id)(request)\n ...@@ -172,7 +178,7 @@ return getattr(context,form_id)(request)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>8</int> </value> <value> <int>9</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -186,6 +192,7 @@ return getattr(context,form_id)(request)\n ...@@ -186,6 +192,7 @@ return getattr(context,form_id)(request)\n
<string>listbox_uid</string> <string>listbox_uid</string>
<string>md5_object_uid_list</string> <string>md5_object_uid_list</string>
<string>is_list</string> <string>is_list</string>
<string>ignore_layout</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
...@@ -229,6 +236,7 @@ return getattr(context,form_id)(request)\n ...@@ -229,6 +236,7 @@ return getattr(context,form_id)(request)\n
<none/> <none/>
<none/> <none/>
<int>0</int> <int>0</int>
<none/>
</tuple> </tuple>
</value> </value>
</item> </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