media-reference-help.html.twig
Same filename in this branch
Same filename in other branches
- 9 core/themes/stable9/templates/content/media-reference-help.html.twig
- 9 core/themes/stable/templates/content/media-reference-help.html.twig
- 9 core/modules/media/templates/media-reference-help.html.twig
- 8.9.x core/themes/stable/templates/content/media-reference-help.html.twig
- 8.9.x core/modules/media/templates/media-reference-help.html.twig
- 11.x core/themes/stable9/templates/content/media-reference-help.html.twig
- 11.x core/modules/media/templates/media-reference-help.html.twig
Theme override for media reference fields.
See also
template_preprocess_field_multiple_value_form()
File
-
core/
themes/ stable9/ templates/ content/ media-reference-help.html.twig
View source
- {#
- /**
- * @file
- * Theme override for media reference fields.
- *
- * @see template_preprocess_field_multiple_value_form()
- */
- #}
- {%
- set classes = [
- 'js-form-item',
- 'form-item',
- 'js-form-wrapper',
- 'form-wrapper',
- ]
- %}
- <fieldset{{ attributes.addClass(classes) }}>
- {%
- set legend_span_classes = [
- 'fieldset-legend',
- required ? 'js-form-required',
- required ? 'form-required',
- ]
- %}
- {# Always wrap fieldset legends in a <span> for CSS positioning. #}
- <legend{{ legend_attributes }}>
- <span{{ legend_span_attributes.addClass(legend_span_classes) }}>{{ original_label }}</span>
- </legend>
-
- <div class="js-form-item form-item">
- {% if media_add_help %}
- <h4{{ header_attributes.addClass('label') }}>
- {% trans %}
- Create new media
- {% endtrans %}
- </h4><br />
- <div class="description">
- {{ media_add_help }}
- </div>
- {% endif %}
-
- {% if multiple %}
- {{ table }}
- {% else %}
- {% for element in elements %}
- {{ element }}
- {% endfor %}
- {% endif %}
-
- <div{{ description.attributes.addClass('description') }}>
- {% if multiple and description.content %}
- <ul>
- <li>{{ media_list_help }} {{ media_list_link }} {{ allowed_types_help }}</li>
- <li>{{ description.content }}</li>
- </ul>
- {% else %}
- {{ media_list_help }} {{ media_list_link }} {{ allowed_types_help }}
- {% endif %}
- {% if multiple and button %}
- <div class="clearfix">{{ button }}</div>
- {% endif %}
- </div>
-
- </div>
- </fieldset>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.