You are here

webform-progress.html.twig in Webform 8.5

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

Default theme implementation for webform wizard progress.

Available variables:

  • webform: A webform.
  • pages: Array of wizard pages.
  • current_page: Current wizard page.
  • index: Index of the current page.
  • total: Total number of pages.
  • summary: Summary of progress.
  • percentage: Percentage completed.
  • bar: A progress bar.

File

templates/webform-progress.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for webform wizard progress.
  5. *
  6. * Available variables:
  7. * - webform: A webform.
  8. * - pages: Array of wizard pages.
  9. * - current_page: Current wizard page.
  10. * - index: Index of the current page.
  11. * - total: Total number of pages.
  12. * - summary: Summary of progress.
  13. * - percentage: Percentage completed.
  14. * - bar: A progress bar.
  15. *
  16. * @see template_preprocess_webform_progress()
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. {{ attach_library('webform/webform.progress') }}
  22. <div class="webform-progress">
  23. {{ bar }}
  24. {% if summary or percentage %}
  25. <div class="webform-progress__status">
  26. {% if summary %}
  27. <span class="webform-progress__summary" data-webform-progress-summary>{{ summary }}</span>
  28. {% if percentage %}
  29. <span class="webform-progress__percentage">(<span data-webform-progress-percentage>{{ percentage }}</span>)</span>
  30. {% endif %}
  31. {% else %}
  32. <span class="webform-progress__percentage" data-webform-progress-percentage>{{ percentage }}</span>
  33. {% endif %}
  34. </div>
  35. {% endif %}
  36. </div>