Commit 0a982252 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hal_json_style] Add compatibility with forms checking if user

clicked on the update button
parent a59b7868
...@@ -43,6 +43,13 @@ def isFieldType(field, type_name): ...@@ -43,6 +43,13 @@ def isFieldType(field, type_name):
# Well, REQUEST from arguments is a different instance than container.REQUEST so it will create problems... # Well, REQUEST from arguments is a different instance than container.REQUEST so it will create problems...
request = kw.get('REQUEST', None) or container.REQUEST request = kw.get('REQUEST', None) or container.REQUEST
# Add compatiblity with forms checking if user clicked on update/validate with `request.has_key('Base_callDialogMethod')`
# See simulation divergence resolve dialog
if dialog_method == update_method:
request.set('Base_showUpdateDialog', '')
else:
request.set('Base_callDialogMethod', '')
# request.form holds POST data thus containing 'field_' + field.id items # request.form holds POST data thus containing 'field_' + field.id items
# such as 'field_your_some_field' # such as 'field_your_some_field'
request_form = request.form request_form = request.form
......
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