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
Léo-Paul Géneau
erp5
Commits
c487e3fc
Commit
c487e3fc
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
cc232102
Changes
1
Show 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 @
c487e3fc
...
...
@@ -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