Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
61b7c392
Commit
61b7c392
authored
Jul 02, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add support for multi checkbox field
parent
106703f1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
795 additions
and
3 deletions
+795
-3
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+14
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
...hTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
+5
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multicheckboxfield_html.xml
...b_page_module/rjs_gadget_erp5_multicheckboxfield_html.xml
+365
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multicheckboxfield_js.xml
...web_page_module/rjs_gadget_erp5_multicheckboxfield_js.xml
+411
-0
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
61b7c392
...
...
@@ -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
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
61b7c392
...
...
@@ -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>
143
4089456.97
</float>
<string>
UTC
</string>
<float>
143
5744171.38
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multicheckboxfield_html.xml
0 → 100644
View file @
61b7c392
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multicheckboxfield_js.xml
0 → 100644
View file @
61b7c392
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment