Commit 0c188f1d authored by Romain Courteaud's avatar Romain Courteaud

ERP5Form: InputButtonField: src attribute is not allowed for submit type element

parent 0c011964
......@@ -71,18 +71,21 @@ class InputButtonWidget(Widget.Widget):
def render(self, field, key, value, REQUEST, render_prefix=None):
"""Render input button.
"""
render_kw = {
'name': field.get_value('name'),
'css_class': field.get_value('css_class'),
'value': field.get_value('default'),
'extra': field.get_value('extra')
}
image = field.get_value('image')
if image:
html_type = "image"
render_kw['src'] = image
else:
html_type = "submit"
return Widget.render_element('input',
type=html_type,
src=image,
name=field.get_value('name'),
css_class=field.get_value('css_class'),
value=field.get_value('default'),
extra=field.get_value('extra'))
**render_kw)
InputButtonWidgetInstance = InputButtonWidget()
......
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