diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml index 037b57bef79102ce386dd509aab305cfc4d2ba2c..f3636084872366b44a69cd46ad0124583a310e10 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml @@ -68,23 +68,54 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>def isValid(value_name):\n + <value> <string># XXX: This file contains many duplicated loops when filtering, this is done on purpose :\n +# Each loop contains variable names which concern a certain hidden field generator (listbox, xhtml style,...).\n +# Above each loop is said wether it is normal or shoul dbe fixed.\n +\n +def isValid(value_name):\n """\n Return true when the given field name can be propagated, false otherwise.\n \n FIXME: _select should be a prefix, not a sufix, to avoid potential collisions with property names.\n """\n - if not value_name.startswith(\'field_\') \\\n - and not value_name.startswith(\'subfield_\') \\\n - and not value_name.startswith(\'default_field\') \\\n - and not value_name.startswith(\'select_\') \\\n - or value_name == \'field_id\':\n + prefix = value_name.split(\'_\')[0]\n + if value_name == \'field_id\' \\\n + or prefix not in (\'field\', \'subfield\', \'default\', \'select\', \'search\'):\n + context.log(\'filter\', \'keeping %s\' % (value_name, ))\n return True\n return False\n \n -# Remove some special values\n -# FIXME: This list should be mostly empty, every variable not to propagate must have a distinct prefix and thus be handled by isValid.\n -for k in (\'-C\', \'SearchableText\', \'uids\', \'listbox_uid\', \'list_selection_name\', \'list_start\', \'portal_status_message\', \'update_action\', \'dialog_method\', \'cancel_method\', \'title\', \'description\', \'reset\', \'md5_object_uid_list\', \'id\', \'came_from\'):\n +# Remove a strange value. No idea on its meaning nor what it does here.\n +if parameter_list.has_key(\'-C\'):\n + del parameter_list[\'-C\']\n +\n +# erp5_xhtml_style special fields.\n +# This is normal.\n +for k in (\'came_from\', \'SearchableText\', \'portal_status_message\', \'reset\'):\n + if parameter_list.has_key(k):\n + del parameter_list[k]\n +\n +# erp5_xhtml_style special fields.\n +# XXX: This should not be needed.\n +for k in (\'update_action\', \'dialog_method\', \'cancel_method\'):\n + if parameter_list.has_key(k):\n + del parameter_list[k]\n +\n +# Listbox search fields special values\n +# XXX: This should not be needed.\n +# for k in (\'id\', \'title\', \'description\', \'reporter\'):\n +# if parameter_list.has_key(k):\n +# del parameter_list[k]\n +\n +# Listbox special fields.\n +# XXX: This should not be needed.\n +for k in (\'list_start\', \'uids\', \'listbox_uid\', \'list_selection_name\', \'md5_object_uid_list\'):\n + if parameter_list.has_key(k):\n + del parameter_list[k]\n +\n +# Subversion special fields\n +# XXX: This should not be needed.\n +for k in (\'changelog\', \'added\', \'removed\', \'modified\'):\n if parameter_list.has_key(k):\n del parameter_list[k]\n \n @@ -137,10 +168,10 @@ return parameter_list\n <tuple> <string>parameter_list</string> <string>isValid</string> - <string>_getiter_</string> - <string>k</string> <string>_getattr_</string> <string>_write_</string> + <string>_getiter_</string> + <string>k</string> </tuple> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml index 7ff941b0044d99f464f2782d9516883ac2fa9ae1..105662b887332fe799fc1eb181b6154fc9e10c92 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml @@ -73,7 +73,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n -->\n </tal:block>\n <tal:block metal:define-macro="master">\n - <tal:block tal:define="form_action string:Base_doSelect:method;\n + <tal:block tal:define="form_action string:Base_doSelect;\n form_id form/id;\n list_mode python: True;\n listmode_default_listbox python: here.ERP5XhtmlStyle_getListbox(form=form);\n