Commit 61b7c392 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: add support for multi checkbox field

parent 106703f1
......@@ -287,6 +287,20 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t
"title": field.get_value("title")\n
}\n
result["default"] = getFieldDefault(traversed_document, field, result["key"], value)\n
elif meta_type == "MultiCheckBoxField":\n
result = {\n
"type": meta_type,\n
"key": key,\n
"editable": field.get_value("editable"),\n
"css_class": field.get_value("css_class"),\n
"hidden": field.get_value("hidden"),\n
"description": field.get_value("description"),\n
"title": field.get_value("title"),\n
"required": field.get_value("required"),\n
# XXX Message can not be converted to json as is\n
"items": field.get_value("items"),\n
}\n
result["default"] = getFieldDefault(traversed_document, field, result["key"], value)\n
elif meta_type == "GadgetField":\n
result = {\n
"type": meta_type,\n
......
......@@ -121,6 +121,8 @@
field_url = \'gadget_erp5_field_multilist.html\';\n
} else if (type === \'CheckBoxField\') {\n
field_url = \'gadget_erp5_field_checkbox.html\';\n
} else if (type === \'MultiCheckBoxField\') {\n
field_url = \'gadget_erp5_field_multicheckbox.html\';\n
} else if (type === \'StringField\') {\n
field_url = \'gadget_erp5_field_string.html\';\n
} else if (type === \'RelationStringField\') {\n
......@@ -510,7 +512,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.40772.7493.11212</string> </value>
<value> <string>943.62898.42115.10666</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -528,8 +530,8 @@
</tuple>
<state>
<tuple>
<float>1434089456.97</float>
<string>UTC</string>
<float>1435744171.38</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
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