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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
9a0c8c65
Commit
9a0c8c65
authored
Jan 31, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Form/GadgetField: generate the absolute url for xhtml style
parent
11471866
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
product/ERP5Form/GadgetField.py
product/ERP5Form/GadgetField.py
+4
-1
No files found.
product/ERP5Form/GadgetField.py
View file @
9a0c8c65
...
...
@@ -6,6 +6,7 @@ from zLOG import LOG, ERROR
from
cStringIO
import
StringIO
from
json
import
dumps
from
Acquisition
import
aq_base
from
urlparse
import
urljoin
class
GadgetWidget
(
Widget
.
Widget
):
"""
...
...
@@ -42,7 +43,9 @@ class GadgetWidget(Widget.Widget):
def
render_view
(
self
,
field
,
value
,
REQUEST
=
None
,
render_prefix
=
None
,
key
=
None
):
kw
=
{
'data-gadget-sandbox'
:
field
.
get_value
(
'js_sandbox'
),
'data-gadget-url'
:
field
.
get_value
(
'gadget_url'
),
# Duplicate the absolute url logic of xhtml style
'data-gadget-url'
:
urljoin
(
field
.
getPortalObject
().
absolute_url
()
+
'/'
,
field
.
get_value
(
'gadget_url'
)),
'data-gadget-value'
:
value
,
'data-gadget-renderjs-extra'
:
dumps
(
dict
(
field
.
get_value
(
'renderjs_extra'
)))
}
...
...
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