Commit d1c49cac authored by Alexandre Boeglin's avatar Alexandre Boeglin

Base_edit now passes the form's edit_order to edit()

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19608 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e12ee765
......@@ -100,6 +100,7 @@ if not silent_mode and not request.AUTHENTICATED_USER.has_permission(\'Modify po
\n
# Get the form\n
form = getattr(context,form_id)\n
edit_order = form.edit_order\n
\n
try:\n
# Validate\n
......@@ -129,7 +130,7 @@ def editListBox(listbox_field, listbox):\n
gv[k] = getattr(request, k, None)\n
for url, v in listbox.items():\n
v.update(gv)\n
context.restrictedTraverse(url).edit(**v)\n
context.restrictedTraverse(url).edit(edit_order=edit_order, **v)\n
\n
def editMatrixBox(matrixbox_field, matrixbox):\n
""" Function called to edit a Matrix box\n
......@@ -186,7 +187,7 @@ def editMatrixBox(matrixbox_field, matrixbox):\n
if matrix_context.hasInRange(*k, **kd):\n
c = matrix_context.newCell(*k, **kd)\n
if c is not None:\n
c.edit(**gv) # First update globals which include the def. of property_list\n
c.edit(edit_order=edit_order, **gv) # First update globals which include the def. of property_list\n
if v.has_key(\'variated_property\'):\n
# For Variated Properties\n
value = v[\'variated_property\']\n
......@@ -197,7 +198,7 @@ def editMatrixBox(matrixbox_field, matrixbox):\n
# XXX May require some changes with Sets\n
key = gv[\'mapped_value_property_list\'][0]\n
v[key] = value\n
c.edit(**v) # and update the cell specific values\n
c.edit(edit_order=edit_order, **v) # and update the cell specific values\n
else:\n
return "Could not create cell %s" % str(k)\n
else:\n
......@@ -254,7 +255,7 @@ try:\n
\n
# Maybe we should build a list of objects we need\n
# Update basic attributes\n
context.edit(REQUEST=request, **kw)\n
context.edit(REQUEST=request, edit_order=edit_order, **kw)\n
for encapsulated_editor in encapsulated_editor_list:\n
encapsulated_editor.edit(context)\n
except ActivityPendingError,e:\n
......@@ -299,6 +300,12 @@ return result\n
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id, selection_index=0, selection_name=\'\', dialog_id=\'\', ignore_layout=0, editable_mode=1, silent_mode=0, field_prefix=\'my_\'</string> </value>
......@@ -349,6 +356,7 @@ return result\n
<string>_getitem_</string>
<string>getattr</string>
<string>form</string>
<string>edit_order</string>
<string>validation_errors</string>
<string>field_errors</string>
<string>_getiter_</string>
......
716
\ No newline at end of file
717
\ No newline at end of file
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