Commit 0c1f2753 authored by Jérome Perrin's avatar Jérome Perrin

make "cell_index" available in TALES for matrixbox editable fields


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37278 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2c433fa9
......@@ -181,8 +181,14 @@ class TALESValue(StaticValue):
kw['cell'] = request.cell
else:
kw['cell'] = request
if 'cell_index' not in kw and\
getattr(request, 'cell_index', None) is not None:
kw['cell_index'] = request.cell_index
elif getattr(REQUEST, 'cell', None) is not None:
kw['cell'] = REQUEST.cell
if 'cell_index' not in kw and \
getattr(REQUEST, 'cell_index', None) is not None:
kw['cell_index'] = REQUEST.cell_index
# on Zope 2.12, only path expressions can access the CONTEXTS name
# but ERP5 has many python expressions that try to access CONTEXTS, so
# we try to keep backward compatibility
......
......@@ -362,6 +362,7 @@ class MatrixBoxWidget(Widget.Widget):
kwd['base_id'] = cell_base_id
cell = cell_getter_method(*kw, **kwd)
REQUEST['cell'] = cell
REQUEST['cell_index'] = kw
cell_body = ''
cell_url = None
......
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