Commit 9a0c8c65 authored by Romain Courteaud's avatar Romain Courteaud

ERP5Form/GadgetField: generate the absolute url for xhtml style

parent 11471866
......@@ -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')))
}
......
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