datetime-wrapper.html.twig in Drupal 10
Same filename in this branch
- 10 core/themes/claro/templates/datetime-wrapper.html.twig
- 10 core/themes/olivero/templates/datetime-wrapper.html.twig
- 10 core/modules/system/templates/datetime-wrapper.html.twig
- 10 core/themes/starterkit_theme/templates/form/datetime-wrapper.html.twig
- 10 core/themes/classy/templates/form/datetime-wrapper.html.twig
- 10 core/themes/stable9/templates/form/datetime-wrapper.html.twig
- 10 core/themes/stable/templates/form/datetime-wrapper.html.twig
- 10 core/themes/seven/templates/classy/form/datetime-wrapper.html.twig
- 10 core/themes/bartik/templates/classy/form/datetime-wrapper.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/classy/form/datetime-wrapper.html.twig
Same filename and directory in other branches
Theme override of a datetime form wrapper.
@todo Refactor when https://www.drupal.org/node/3010558 is fixed.
See also
File
core/themes/claro/templates/datetime-wrapper.html.twigView source
- {#
- /**
- * @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 title_classes = [
- 'form-item__label',
- required ? 'js-form-required',
- required ? 'form-required',
- errors ? 'has-error',
- ]
- %}
- <div class="form-item form-datetime-wrapper">
- {% if title %}
- <h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
- {% endif %}
- {{ content }}
- {% if errors %}
- <div class="form-item__error-message">
- {{ errors }}
- </div>
- {% endif %}
- {% if description %}
- <div{{ description_attributes.addClass('form-item__description') }}>
- {{ description }}
- </div>
- {% endif %}
- </div>