{# /** * @file * Theme override of a datetime form wrapper. * * @todo Refactor when https://www.drupal.org/node/3010558 is fixed. * * @see template_preprocess_form_element() */ #} {% set show_description_toggle = description_toggle and description %} {% set classes = [ 'form-item', 'form-datetime-wrapper', show_description_toggle ? 'help-icon__description-container', ] %} {% set title_classes = [ 'form-item__label', required ? 'js-form-required', required ? 'form-required', errors ? 'has-error', ] %} {% set description_classes = [ 'form-item__description', description_display == 'invisible' ? 'visually-hidden', ] %}
{% if show_description_toggle %}
{% endif %} {% if title %} {{ title }} {% endif %} {% if show_description_toggle %} {{ attach_library('gin/gin_description_toggle') }}
{% endif %} {{ content }} {% if errors %}
{{ errors }}
{% endif %} {% if description %} {{ description }}
{% endif %}