[Erp5-report] r36894 kazuhiko - /erp5/trunk/products/ERP5Form/FormBox.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 6 14:36:39 CEST 2010
Author: kazuhiko
Date: Tue Jul 6 14:36:38 2010
New Revision: 36894
URL: http://svn.erp5.org?rev=36894&view=rev
Log:
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.
Modified:
erp5/trunk/products/ERP5Form/FormBox.py
Modified: erp5/trunk/products/ERP5Form/FormBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/FormBox.py?rev=36894&r1=36893&r2=36894&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/FormBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/FormBox.py [utf8] Tue Jul 6 14:36:38 2010
@@ -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:
More information about the Erp5-report
mailing list