diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml index 8c1d636f0e78038534249502fa840c4b14fff115..50c330bdd92319178a30d1757ac0c88ed7e5b672 100755 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml @@ -114,15 +114,18 @@ try:\n k = f.id\n v = getattr(request, k, MARKER)\n if v is not MARKER:\n - if k[0:3] == \'my_\':\n - k = k[3:]\n - kw[k] = v\n - if v in (None, [], ()) or hasattr(v, \'read\') :\n + for prefix in (\'my_\', \'your_\'):\n + if k.startswith(prefix):\n + k = k[len(prefix):]\n + kw[k] = v\n + if v in (None, [], ()) or hasattr(v, \'read\') :\n + must_redirect = 1\n + break\n + else:\n + if k in (\'import_file\', \'listbox\'):\n + if f.meta_type == \'ListBox\': has_listbox = 1\n must_redirect = 1\n - elif k in (\'import_file\', \'listbox\'):\n - if f.meta_type == \'ListBox\': has_listbox = 1\n - must_redirect = 1\n - kw[k] = v\n + kw[k] = v\n # Add some properties required by UI\n md5_object_uid_list = getattr(request,\'md5_object_uid_list\',None)\n kw[\'md5_object_uid_list\'] = md5_object_uid_list\n @@ -253,7 +256,9 @@ return request.RESPONSE.redirect( redirect_url )\n <string>f</string> <string>k</string> <string>v</string> + <string>prefix</string> <string>_getitem_</string> + <string>len</string> <string>_write_</string> <string>hasattr</string> <string>md5_object_uid_list</string> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callViewDialogMethod.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callViewDialogMethod.xml index a5aae0da531925897a51cab995add02104a472d3..5321359cc1627423ef585bd61f65b10b1c3011f1 100755 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callViewDialogMethod.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callViewDialogMethod.xml @@ -118,12 +118,18 @@ try:\n k = f.id\n v = getattr(request,k, MARKER)\n if v is not MARKER:\n - if k[0:3] == \'my_\':\n - k = k[3:]\n - kw[k] = v\n - elif k in (\'import_file\', \'listbox\'):\n - if f.meta_type == \'ListBox\': has_listbox = 1\n - kw[k] = v\n + for prefix in (\'my_\', \'your_\'):\n + if k.startswith(prefix):\n + k = k[len(prefix):]\n + kw[k] = v\n + if v in (None, [], ()) or hasattr(v, \'read\') :\n + must_redirect = 1\n + break\n + else:\n + if k in (\'import_file\', \'listbox\'):\n + if f.meta_type == \'ListBox\': has_listbox = 1\n + must_redirect = 1\n + kw[k] = v\n # Add some properties required by UI\n kw[\'cancel_url\'] = cancel_url\n # Redirect if possible, or call directly else\n @@ -247,8 +253,12 @@ return request.RESPONSE.redirect( redirect_url )\n <string>f</string> <string>k</string> <string>v</string> + <string>prefix</string> <string>_getitem_</string> + <string>len</string> <string>_write_</string> + <string>hasattr</string> + <string>must_redirect</string> <string>import_file</string> <string>_apply_</string> <string>listbox_line_list</string>