Commit 2db2ecd3 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hal_json_style] Add first_item parameter for ListField

parent d5d68cec
...@@ -111,6 +111,7 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t ...@@ -111,6 +111,7 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t
"required": field.get_value("required"), "required": field.get_value("required"),
# XXX Message can not be converted to json as is # XXX Message can not be converted to json as is
"items": field.get_value("items"), "items": field.get_value("items"),
"first_item": field.get_value("first_item")
} }
result["default"] = getFieldDefault(traversed_document, field, result["key"], value) result["default"] = getFieldDefault(traversed_document, field, result["key"], value)
elif meta_type == "RadioField": elif meta_type == "RadioField":
...@@ -140,6 +141,7 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t ...@@ -140,6 +141,7 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t
"required": field.get_value("required"), "required": field.get_value("required"),
# XXX Message can not be converted to json as is # XXX Message can not be converted to json as is
"items": field.get_value("items"), "items": field.get_value("items"),
"first_item": field.get_value("first_item")
} }
result["default"] = getFieldDefault(traversed_document, field, result["key"], value) result["default"] = getFieldDefault(traversed_document, field, result["key"], value)
result["sub_select_key"] = traversed_document.Field_getSubFieldKeyDict(field, 'default:list', key=result["key"]) result["sub_select_key"] = traversed_document.Field_getSubFieldKeyDict(field, 'default:list', key=result["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