Commit 77bb7043 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: add support for radio field

parent dd8f8c89
......@@ -132,6 +132,21 @@ def renderField(field, form_relative_url, value=None, meta_type=None, key=None):
"items": field.get_value("items"),\n
}\n
result["default"] = getFieldDefault(field, result["key"], value)\n
elif meta_type == "RadioField":\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
"items": field.get_value("items"),\n
"select_first_item": field.get_value("first_item"),\n
"orientation": field.get_value("orientation"),\n
}\n
result["default"] = getFieldDefault(field, result["key"], value)\n
elif meta_type in ("ParallelListField", "MultiListField"):\n
result = {\n
"type": meta_type,\n
......
......@@ -143,6 +143,8 @@
// sandbox = \'iframe\';\n
} else if (type === \'GadgetField\') {\n
field_url = \'gadget_erp5_field_gadget.html\';\n
} else if (type === \'RadioField\') {\n
field_url = \'gadget_erp5_field_radio.html\';\n
}\n
return field_url;\n
}\n
......@@ -506,7 +508,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.19028.41746.46353</string> </value>
<value> <string>943.40750.19186.4829</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -524,7 +526,7 @@
</tuple>
<state>
<tuple>
<float>1433215002.43</float>
<float>1434006006.8</float>
<string>UTC</string>
</tuple>
</state>
......
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