You are here

webform-message.html.twig in Webform 8.5

Same filename and directory in other branches
  1. 6.x templates/webform-message.html.twig

Default theme implementation of a Webform message container.

Available variables:

  • attributes: HTML attributes for the containing element.
  • message: The rendered status_messages elements.
  • has_parent: A flag to indicate that the container has one or more parent containers.
  • closed: A flag to indicate that the message has been been closed and should not be displayed.

File

templates/webform-message.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a Webform message container.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes for the containing element.
  8. * - message: The rendered status_messages elements.
  9. * - has_parent: A flag to indicate that the container has one or more parent
  10. * containers.
  11. * - closed: A flag to indicate that the message has been been closed and should
  12. * not be displayed.
  13. *
  14. * @see template_preprocess_webform_message()
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. {%
  20. set classes = [
  21. has_parent ? 'js-form-wrapper',
  22. has_parent ? 'form-wrapper',
  23. ]
  24. %}
  25. {% if not closed %}
  26. <div{{ attributes.addClass(classes) }}>{{ message }}</div>
  27. {% endif %}