Commit e5a7950d authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: add support for checkboxfield

parent f236958e
No related merge requests found
...@@ -185,6 +185,17 @@ def renderField(field, meta_type=None):\n ...@@ -185,6 +185,17 @@ def renderField(field, meta_type=None):\n
"title": field.get_value("title"),\n "title": field.get_value("title"),\n
"required": field.get_value("required"),\n "required": field.get_value("required"),\n
}\n }\n
elif meta_type == "CheckBoxField":\n
result = {\n
"type": meta_type,\n
"key": field.generate_field_key(),\n
"default": field.get_value("default"),\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
}\n
elif meta_type == "GadgetField":\n elif meta_type == "GadgetField":\n
result = {\n result = {\n
"type": meta_type,\n "type": meta_type,\n
......
...@@ -149,6 +149,8 @@ gadget_erp5_field_readonly.html\n ...@@ -149,6 +149,8 @@ gadget_erp5_field_readonly.html\n
gadget_erp5_field_readonly.js\n gadget_erp5_field_readonly.js\n
gadget_erp5_field_string.html\n gadget_erp5_field_string.html\n
gadget_erp5_field_string.js\n gadget_erp5_field_string.js\n
gadget_erp5_field_checkbox.html\n
gadget_erp5_field_checkbox.js\n
gadget_erp5_field_textarea.html\n gadget_erp5_field_textarea.html\n
gadget_erp5_field_textarea.js\n gadget_erp5_field_textarea.js\n
gadget_erp5_form.html\n gadget_erp5_form.html\n
...@@ -311,7 +313,7 @@ NETWORK:\n ...@@ -311,7 +313,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>romain</string> </value> <value> <string>xiaowu</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -325,7 +327,7 @@ NETWORK:\n ...@@ -325,7 +327,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.52129.46198.31044</string> </value> <value> <string>940.56086.25956.64870</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -343,8 +345,8 @@ NETWORK:\n ...@@ -343,8 +345,8 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1423236693.75</float> <float>1423560460.16</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
...@@ -217,6 +217,8 @@ ...@@ -217,6 +217,8 @@
// (renderered_field.type === \'ParallelListField\') ||\n // (renderered_field.type === \'ParallelListField\') ||\n
// (renderered_field.type === \'MultiListField\')) {\n // (renderered_field.type === \'MultiListField\')) {\n
field_url = \'gadget_erp5_field_list.html\';\n field_url = \'gadget_erp5_field_list.html\';\n
} else if (renderered_field.type === \'CheckBoxField\') {\n
field_url = \'gadget_erp5_field_checkbox.html\';\n
} else if (renderered_field.type === \'StringField\') {\n } else if (renderered_field.type === \'StringField\') {\n
field_url = \'gadget_erp5_field_string.html\';\n field_url = \'gadget_erp5_field_string.html\';\n
} else if (renderered_field.type === \'RelationStringField\') {\n } else if (renderered_field.type === \'RelationStringField\') {\n
...@@ -475,7 +477,7 @@ ...@@ -475,7 +477,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>romain</string> </value> <value> <string>xiaowu</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -489,7 +491,7 @@ ...@@ -489,7 +491,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.49210.11818.8857</string> </value> <value> <string>940.57523.59171.13568</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -507,8 +509,8 @@ ...@@ -507,8 +509,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1423153240.08</float> <float>1423560248.21</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </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