web/formfields.py
branchstable
changeset 2723 d38c2b01d766
parent 2362 f2409d5f2b75
child 2724 7966d87202d7
equal deleted inserted replaced
2714:4a8d93bd7c72 2723:d38c2b01d766
   281 
   281 
   282     def render(self, form, renderer):
   282     def render(self, form, renderer):
   283         format_field = self.get_format_field(form)
   283         format_field = self.get_format_field(form)
   284         if format_field:
   284         if format_field:
   285             # XXX we want both fields to remain vertically aligned
   285             # XXX we want both fields to remain vertically aligned
   286             format_field.widget.attrs['style'] = 'display: block'
   286             if format_field.is_visible():
       
   287                 format_field.widget.attrs['style'] = 'display: block'
   287             result = format_field.render(form, renderer)
   288             result = format_field.render(form, renderer)
   288         else:
   289         else:
   289             result = u''
   290             result = u''
   290         return result + self.get_widget(form).render(form, self)
   291         return result + self.get_widget(form).render(form, self)
   291 
   292