Form field descriptions are displayed as tooltips

This commit is contained in:
Éloi Rivard 2023-03-16 17:00:45 +01:00
parent 93e159c6cb
commit 7e7a1427e5

View file

@ -20,9 +20,6 @@ display=true
{% if field_visible and label_visible %} {% if field_visible and label_visible %}
{{ field.label() }} {{ field.label() }}
{% if field.description %}
<div>{{ field.description }}</div>
{% endif %}
{% endif %} {% endif %}
@ -36,10 +33,12 @@ display=true
{%- if corner_indicator %} corner{% endif -%} {%- if corner_indicator %} corner{% endif -%}
{%- if labeled %} labeled{% endif -%} {%- if labeled %} labeled{% endif -%}
{%- if icon %} left icon{% endif -%} {%- if icon %} left icon{% endif -%}
{%- if field.description %} left icon{% endif -%}
{%- if field.type not in ("BooleanField", "RadioField") %} input{% endif -%} {%- if field.type not in ("BooleanField", "RadioField") %} input{% endif -%}
"> ">
{% endif %} {% endif %}
{% if icon %}<i class="{{ icon }} icon"></i>{% endif %} {% if icon %}<i class="{{ icon }} icon"></i>{% endif %}
{% if field.description %}<i class="question circle link icon" title="{{ field.description }}"></i>{% endif %}
{% if field.type not in ("SelectField", "SelectMultipleField") %} {% if field.type not in ("SelectField", "SelectMultipleField") %}
{{ field(**kwargs) }} {{ field(**kwargs) }}