Ticket #8426: wrap_help_text_in_css_class.diff

File wrap_help_text_in_css_class.diff, 1.1 KB (added by mrts, 16 years ago)
  • django/forms/forms.py

     
    187187
    188188    def as_table(self):
    189189        "Returns this form rendered as HTML <tr>s -- excluding the <table></table>."
    190         return self._html_output(u'<tr><th>%(label)s</th><td>%(errors)s%(field)s%(help_text)s</td></tr>', u'<tr><td colspan="2">%s</td></tr>', '</td></tr>', u'<br />%s', False)
     190        return self._html_output(u'<tr><th>%(label)s</th><td>%(errors)s%(field)s%(help_text)s</td></tr>', u'<tr><td colspan="2">%s</td></tr>', '</td></tr>', u'<br /><span class="helptext">%s</span>', False)
    191191
    192192    def as_ul(self):
    193193        "Returns this form rendered as HTML <li>s -- excluding the <ul></ul>."
    194         return self._html_output(u'<li>%(errors)s%(label)s %(field)s%(help_text)s</li>', u'<li>%s</li>', '</li>', u' %s', False)
     194        return self._html_output(u'<li>%(errors)s%(label)s %(field)s%(help_text)s</li>', u'<li>%s</li>', '</li>', u' <span class="helptext">%s</span>', False)
    195195
    196196    def as_p(self):
    197197        "Returns this form rendered as HTML <p>s."
Back to Top