Commit c478fa42 authored by Lu Xu's avatar Lu Xu 👀

ImageField: add title

parent daeb5225
...@@ -104,6 +104,7 @@ class ImageFieldWidget(Widget.TextWidget): ...@@ -104,6 +104,7 @@ class ImageFieldWidget(Widget.TextWidget):
image = value image = value
alt = field.get_value('description') or \ alt = field.get_value('description') or \
field.get_value('title') field.get_value('title')
title = field.get_value('title')
css_class = field.get_value('css_class') css_class = field.get_value('css_class')
extra = field.get_value('extra') extra = field.get_value('extra')
options = {} options = {}
...@@ -122,6 +123,7 @@ class ImageFieldWidget(Widget.TextWidget): ...@@ -122,6 +123,7 @@ class ImageFieldWidget(Widget.TextWidget):
return Widget.render_element( return Widget.render_element(
"img", "img",
alt=alt, alt=alt,
title=title,
src=image, src=image,
css_class=css_class, css_class=css_class,
extra=extra, extra=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