Commit 6b4ae347 authored by Fabien Morin's avatar Fabien Morin

- use Base_redirect

- translate the portal_status_message

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29373 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 10dcb415
...@@ -53,33 +53,16 @@ ...@@ -53,33 +53,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>context.updateVariationCategoryList()\n
portal = context.getPortalObject()\n
import string \n Base_translateString = portal.Base_translateString\n
\n \n
request = context.REQUEST\n message = Base_translateString(\'%s Updated.\' % context.getPortalType())\n
\n return context.Base_redirect(form_id=form_id,\n
context.updateVariationCategoryList()\n selection_name=selection_name,\n
\n selection_index=selection_index,\n
portal_status_message = \'portal_status_message=\'+string.replace(context.getPortalType(), \' \', \'+\')+\'+Updated.\'\n keep_items={\'portal_status_message\': message})\n
\n </string> </value>
if not selection_index:\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
, form_id\n
, portal_status_message\n
)\n
else:\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&%s\' % ( context.absolute_url()\n
, form_id\n
, selection_index\n
, selection_name\n
, portal_status_message\n
)\n
\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -89,7 +72,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -89,7 +72,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>form_id, selection_index=0, selection_name=\'\'</string> </value> <value> <string>form_id=\'view\', selection_index=0, selection_name=\'\'</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -118,13 +101,11 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -118,13 +101,11 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>form_id</string> <string>form_id</string>
<string>selection_index</string> <string>selection_index</string>
<string>selection_name</string> <string>selection_name</string>
<string>string</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>portal</string>
<string>portal_status_message</string> <string>Base_translateString</string>
<string>redirect_url</string> <string>message</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -137,6 +118,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -137,6 +118,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple> <tuple>
<string>view</string>
<int>0</int> <int>0</int>
<string></string> <string></string>
</tuple> </tuple>
......
337 338
\ 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