dsfr4drupal-1.x-dev/templates/form/form-element-label.html.twig

templates/form/form-element-label.html.twig
{% set classes = [
  title_display == 'after' ? 'option',
  title_display == 'invisible' ? 'visually-hidden',
  required ? 'js-form-required',
  required ? 'form-required',
  'fr-label',
] %}
{% if title is not empty or required -%}
  <label{{ attributes.addClass(classes) }}>{{ title }}
    {% if description.content %}
      {% if description_tooltip %}
        {{ include('dsfr4drupal:tooltip', {
          'title': tooltip_title|default('Help text'|t),
          'tooltip': description.content,
        }, with_context=false) }}
      {% else %}
        <span{{ description.attributes.addClass('fr-hint-text') }}>{{ description.content }}</span>
      {% endif %}
    {% endif %}
  </label>
{%- endif %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc