Commit ff14027c authored by Vincent Pelletier's avatar Vincent Pelletier

Allow caller to tweak edit behaviour for data coming from listboxes.

parent fa0158ad
......@@ -121,7 +121,10 @@ def editListBox(listbox_field, listbox):\n
for key, value in cleaned_v.items():\n
if value == \'\':\n
cleaned_v[key] = None\n
context.restrictedTraverse(url).edit(edit_order=edit_order, **cleaned_v)\n
if listbox_edit is None:\n
context.restrictedTraverse(url).edit(edit_order=edit_order, **cleaned_v)\n
else:\n
listbox_edit(url, edit_order, cleaned_v)\n
\n
def editMatrixBox(matrixbox_field, matrixbox):\n
""" Function called to edit a Matrix box\n
......@@ -328,7 +331,7 @@ return result\n
</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_\', key_prefix=None</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_\', key_prefix=None, listbox_edit=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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