Ticket #8426: wrap_help_text_in_css_class.diff
File wrap_help_text_in_css_class.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/forms/forms.py
187 187 188 188 def as_table(self): 189 189 "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) 191 191 192 192 def as_ul(self): 193 193 "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) 195 195 196 196 def as_p(self): 197 197 "Returns this form rendered as HTML <p>s."