Commit 8703fdd2 authored by Jérome Perrin's avatar Jérome Perrin

redirect directly to the user preference (if any)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36694 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e8a5122f
...@@ -55,13 +55,14 @@ ...@@ -55,13 +55,14 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># make default CMF personalize_form redirect to the preference tool\n <value> <string># make default CMF personalize_form redirect to the preference tool\n
\n \n
from ZTUtils import make_query\n preference_tool = context.getPortalObject().portal_preferences\n
args = {}\n
if portal_status_message is not None :\n
args[\'portal_status_message\'] = portal_status_message\n
\n \n
context.REQUEST.RESPONSE.redirect(\n preference = preference_tool.getActivePreference()\n
"%s/portal_preferences/view?%s" % ( context.getPortalObject().absolute_url(), make_query(args)))\n \n
if preference is not None and preference.getPriority() == 3: # XXX: 3 is Priority.USER\n
return preference.Base_redirect(\'view\')\n
\n
return preference_tool.Base_redirect(\'view\')\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -72,7 +73,7 @@ context.REQUEST.RESPONSE.redirect(\n ...@@ -72,7 +73,7 @@ context.REQUEST.RESPONSE.redirect(\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>form=None, message=None, portal_status_message=None, **kw</string> </value> <value> <string>**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -92,23 +93,18 @@ context.REQUEST.RESPONSE.redirect(\n ...@@ -92,23 +93,18 @@ context.REQUEST.RESPONSE.redirect(\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>3</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>form</string>
<string>message</string>
<string>portal_status_message</string>
<string>kw</string> <string>kw</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>args</string>
<string>None</string>
<string>_write_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>preference_tool</string>
<string>preference</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -120,11 +116,7 @@ context.REQUEST.RESPONSE.redirect(\n ...@@ -120,11 +116,7 @@ context.REQUEST.RESPONSE.redirect(\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/>
<none/> <none/>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
1619 1622
\ 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