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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Papa Tamsir Kane
erp5
Commits
d6405425
Commit
d6405425
authored
Aug 11, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[renderjs_ui] Disable FormBoxes for different context than their parent
parent
1724a5b5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
15 deletions
+33
-15
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+18
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.html
...m/web_page_module/rjs_gadget_erp5_field_formbox_html.html
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.xml
...em/web_page_module/rjs_gadget_erp5_field_formbox_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.js
...eItem/web_page_module/rjs_gadget_erp5_field_formbox_js.js
+8
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.xml
...Item/web_page_module/rjs_gadget_erp5_field_formbox_js.xml
+2
-2
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
d6405425
...
...
@@ -459,6 +459,13 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t
context_method_id
=
field
.
get_value
(
'context_method_id'
)
or
None
if
context_method_id
is
not
None
:
formbox_context
=
getattr
(
traversed_document
,
context_method_id
)()
result
=
{
"type"
:
meta_type
,
"_debug"
:
"FormBox with different Portal Type than its parent are not supported"
,
"title"
:
Base_translateString
(
field
.
get_value
(
"title"
)),
"key"
:
key
,
}
else
:
result
=
{
'type'
:
meta_type
,
'title'
:
Base_translateString
(
field
.
get_value
(
"title"
)),
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.html
View file @
d6405425
<!DOCTYPE html>
<html>
<!--
data-i18n=This FormBox is not supported by the backend!
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.xml
View file @
d6405425
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
7539.6981.40567
</string>
</value>
<value>
<string>
961.
21935.29137.22101
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1502
265124.33
</float>
<float>
1502
445385.24
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.js
View file @
d6405425
...
...
@@ -37,6 +37,14 @@
erp5_embedded_document
:
field_json
.
_embedded
};
// this formbox is not yet supported by the backend
if
(
erp5_embedded_document
===
undefined
)
{
return
gadget
.
translate
(
"
This FormBox is not supported by the backend!
"
)
.
push
(
function
(
message
)
{
gadget
.
element
.
innerHTML
=
message
;
});
}
// prefer editability from the global context (form)
if
(
options
.
editable
!==
undefined
)
{
new_state
.
editable
=
options
.
editable
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.xml
View file @
d6405425
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.1
7832.13281.59733
</string>
</value>
<value>
<string>
961.1
9210.8471.60620
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
1502
199696.37
</float>
<float>
1502
444983.84
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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