Commit e606dad4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

revert a part of r31835 and set 'cell' same as 'here' if 'cell' is undefined,...

revert a part of r31835 and set 'cell' same as 'here' if 'cell' is undefined, so that we can use the same formbox for both ListBox and non-ListBox using 'cell' parameter.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36894 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 41e351eb
......@@ -88,11 +88,12 @@ class FormBoxWidget(Widget.Widget):
"""
Render a form in a field
"""
# If FormBox is inside ListBox, we want use REQUEST['cell'] as
# 'here'.
# XXX REQUEST['cell'] will remain after ListBox rendering. We need a
# way to check if it is inside ListBox or not correctly.
here = REQUEST.get('cell', REQUEST['here'])
here = REQUEST['here']
# If 'cell' is not defined, we define 'cell' just same as 'here', so
# that we can use the same formbox for both ListBox and non-ListBox
# using 'cell' parameter.
if not REQUEST.has_key('cell'):
REQUEST.set('cell', here)
try:
form = getattr(here, field.get_value('formbox_target_id'))
except AttributeError:
......
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