Commit 80af7a0a authored by Nicolas Delaby's avatar Nicolas Delaby

Add new Property on Relation Field to change Relation Form Dialog

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21464 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d3d92914
...@@ -62,7 +62,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -62,7 +62,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
local_property_names = ['update_method', 'jump_method', 'allow_jump', local_property_names = ['update_method', 'jump_method', 'allow_jump',
'base_category', 'portal_type', 'allow_creation', 'base_category', 'portal_type', 'allow_creation',
'container_getter_id', 'catalog_index', 'container_getter_id', 'catalog_index',
'relation_setter_id', 'columns', 'sort', 'relation_setter_id', 'relation_form_id', 'columns', 'sort',
'parameter_list','list_method', 'parameter_list','list_method',
'first_item', 'items', 'size', 'extra_item', 'first_item', 'items', 'size', 'extra_item',
] ]
...@@ -137,6 +137,13 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -137,6 +137,13 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
default="", default="",
required=0) required=0)
relation_form_id = fields.StringField('relation_form_id',
title='Relation Form',
description=(
"Form to display relation choices"),
default="",
required=0)
size = fields.IntegerField('size', size = fields.IntegerField('size',
title='Size', title='Size',
description=( description=(
......
...@@ -1064,8 +1064,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -1064,8 +1064,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
# Field found # Field found
field_key = field.generate_field_key() field_key = field.generate_field_key()
field_value = REQUEST.form[field_key] field_value = REQUEST.form[field_key]
# XXX Hardcoded form name dialog_id = field.get_value('relation_form_id') or 'Base_viewRelatedObjectList'
dialog_id = 'Base_viewRelatedObjectList'
redirect_form = getattr(o, dialog_id) redirect_form = getattr(o, dialog_id)
# XXX Hardcoded listbox field # XXX Hardcoded listbox field
selection_name = redirect_form.listbox.get_value('selection_name') selection_name = redirect_form.listbox.get_value('selection_name')
......
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