claro-8.x-1.x-dev/templates/text-format-wrapper.html.twig

templates/text-format-wrapper.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{#
/**
 * @file
 * Theme override for a text format-enabled form element.
 *
 * @todo Remove when https://www.drupal.org/node/3016346 and
 *
 * Available variables:
 * - children: Text format element children.
 * - description: Text format element description.
 * - attributes: HTML attributes for the containing element.
 * - aria_description: Flag for whether or not an ARIA description has been
 *   added to the description container.
 * - description_attributes: attributes for the description.
 * - disabled: An indicator for whether the associated form element is disabled,
 *   added by this theme.
 *
 * @see template_preprocess_text_format_wrapper()
 */
#}
{%
  set classes = [
    'js-form-item',
    'form-item',
  ]
%}
<div{{ attributes.addClass(classes) }}>
  {{ children }}
  {% if description %}
    {%
      set description_classes = [
        aria_description ? 'form-item__description',
        disabled ? 'is-disabled',
      ]
    %}
    <div{{ description_attributes.addClass(description_classes) }}>{{ description }}</div>
  {% endif %}
</div>

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

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