Skip to content

Commit

Permalink
wagtail-react-streamfield compatibility
Browse files Browse the repository at this point in the history
Fixes labd#117
  • Loading branch information
Alexey Yushin committed Oct 26, 2020
1 parent 623fb26 commit b3aa256
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions wagtailstreamforms/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@


class InfoBlock(blocks.CharBlock):
def render_form(self, value, prefix="", errors=None):
field = self.field
shown_value = value if value else field.help_text
return mark_safe(
'<div style="margin-top:5px;padding:0.9em 1.2em;">%s</div>' % shown_value
)
def render_form(self, value, **kwargs):
return super().render_form(value if value else self.field.help_text, **kwargs)


class FormChooserBlock(blocks.ChooserBlock):
Expand Down

0 comments on commit b3aa256

Please sign in to comment.