Commit a48df1f1 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_hal_json_style: get extra configuration

parent 9cc087c6
......@@ -552,6 +552,9 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
"LinesField", "ImageField", "FileField", "IntegerField",
"PasswordField", "EditorField", "HyperLinkField", "LinkField"):
if meta_type in ("StringField", "EmailField"):
extra_dict = field.get_value("extra")
if extra_dict:
result.update(extra_dict)
result.update({
"maxlength": field.get_value("display_maxwidth"),
})
......@@ -590,6 +593,12 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
# thus trying to return it to the client, besides being useless, breaks
# the hal API
del result["default"]
if meta_type == "TextAreaField":
extra_dict = field.get_value("extra")
if extra_dict:
result.update(extra_dict)
return result
if meta_type == "DateTimeField":
......
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