You are here

webform-composite-name.html.twig in Webform 6.x

Same filename and directory in other branches
  1. 8.5 templates/webform-composite-name.html.twig

Default theme implementation of a name composite webform element.

Available variables:

  • content: The name webform element to be output.
  • flexbox: Determines if Flexbox layout should be applied to the composite element.

File

templates/webform-composite-name.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a name composite webform element.
  5. *
  6. * Available variables:
  7. * - content: The name webform element to be output.
  8. * - flexbox: Determines if Flexbox layout should be applied to the composite
  9. * element.
  10. *
  11. * @see template_preprocess_webform_composite_name()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% if flexbox %}
  17. <div class="webform-name">
  18. <div class="webform-flexbox">
  19. {% if content.title %}
  20. <div class="webform-flex webform-flex--2 webform-name__title"><div class="webform-flex--container">{{ content.title }}</div></div>
  21. {% endif %}
  22. {% if content.first %}
  23. <div class="webform-flex webform-flex--3 webform-name__first"><div class="webform-flex--container">{{ content.first }}</div></div>
  24. {% endif %}
  25. {% if content.middle %}
  26. <div class="webform-flex webform-flex--2 webform-name__middle"><div class="webform-flex--container">{{ content.middle }}</div></div>
  27. {% endif %}
  28. {% if content.last %}
  29. <div class="webform-flex webform-flex--3 webform-name__last"><div class="webform-flex--container">{{ content.last }}</div></div>
  30. {% endif %}
  31. {% if content.suffix %}
  32. <div class="webform-flex webform-flex--1 webform-name__suffix"><div class="webform-flex--container">{{ content.suffix }}</div></div>
  33. {% endif %}
  34. {% if content.degree %}
  35. <div class="webform-flex webform-flex--1 webform-name__degree"><div class="webform-flex--container">{{ content.degree }}</div></div>
  36. {% endif %}
  37. </div>
  38. </div>
  39. {% else %}
  40. {{ content }}
  41. {% endif %}