{% load allauth %} {% comment %} One field outside a whole form. The fieldset gives its help text the id `-field-description` and its errors `-field-errors`, and the control points at both. The textarea's `value` slot has no surrounding whitespace, which would be copied with the codes. `readonly`, `disabled` and `checked` pick the branch because `checked="False"` still ticks the box. A radio or a checkbox sits inside its label. Every other control has its label above it. {% endcomment %} {% if attrs.type == "textarea" %} {% slot label %} {% endslot %} {% if attrs.readonly %} {% slot value %}{% endslot %} {% else %} {% slot value %}{% endslot %} {% endif %} {% elif attrs.type == "radio" %} {% if attrs.checked %} {% else %} {% endif %} {% slot label %} {% endslot %} {% elif attrs.type == "checkbox" %} {% if attrs.checked %} {% else %} {% endif %} {% slot label %} {% endslot %} {% else %} {% slot label %} {% endslot %} {% if attrs.disabled %} {% else %} {% endif %} {% endif %} {% if slots.help_text %} {% slot help_text %} {% endslot %} {% endif %}