{% load allauth %} {% if attrs.type == "hidden" %} {% else %} {% setvar input_classes %} {% if attrs.type == "textarea" %} textarea {% if attrs.errors %}textarea-error{% endif %} {% if attrs.readonly %}resize-none{% endif %} w-full {% elif attrs.type == "select" %} select {% if attrs.errors %}select-error{% endif %} w-full {% elif attrs.type == "checkbox" %} checkbox {% if attrs.errors %}checkbox-error{% endif %} {% elif attrs.type == "radio" %} radio {% if attrs.errors %}radio-error{% endif %} {% else %} input {% if attrs.errors %}input-error{% endif %} w-full {% endif %} {% endsetvar %} {% setvar input %} {% if attrs.type == "textarea" %} {% elif attrs.type == "select" %} {% else %} {% endif %} {% endsetvar %}
{% if attrs.type == "checkbox" or attrs.type == "radio" %} {% elif attrs.unlabeled %} {% else %} {{ input }} {% endif %} {# If empty, "slots.help_text" is still a list of whitespace-containing strings #} {% with help_text_is_set=slots.help_text|join:''|slugify %} {% if attrs.errors or help_text_is_set %} {% endif %} {% endwith %}
{% endif %}