forms: add empty span to checkbox widget, for custom CSS styles (#25978)

This commit is contained in:
Frédéric Péters 2018-08-30 22:32:17 +02:00
parent c5f786d222
commit fe84f8410c
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ def checkbox_render_content(self):
attrs.update(self.attrs)
return htmltag("input", xml_end=True, type="checkbox", name=self.name,
value="yes", checked=self.value and "checked" or None,
**attrs)
**attrs) + htmltext('<span></span>') # for custom style
CheckboxWidget.render_content = checkbox_render_content