Also tidied forms.py a little by consolidating into widget and moving help text to template.
2 lines
345 B
HTML
2 lines
345 B
HTML
{# Custom <span> wrapper around the label to enable radio fields to be styled like buttons. #}
|
|
{% if widget.wrap_label %}<label onclick="click()"{% if widget.attrs.id %} for="{{ widget.attrs.id }}"{% endif %}>{% endif %}{% include "django/forms/widgets/input.html" %}{% if widget.wrap_label %} <span>{{ widget.label }}</span></label>{% endif %}
|