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