Ticket #5216: label_tag.3.patch
File label_tag.3.patch, 585 bytes (added by , 17 years ago) |
---|
-
newforms/forms.py
304 304 """ 305 305 contents = contents or escape(self.label) 306 306 widget = self.field.widget 307 id_ = widget.attrs.get('id') or self.auto_id307 id_ = smart_unicode(widget.attrs.get('id', '')) or self.auto_id 308 308 if id_: 309 309 attrs = attrs and flatatt(attrs) or '' 310 310 contents = '<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, contents)