You are here

yamlform-progress.html.twig in YAML Form 8

Default theme implementation from form wizard progress.

Available variables:

  • yamlform: A form.
  • pages: Array of wizard pages.
  • current_page: Current wizard page.
  • total_pages: Current wizard page.
  • summary: Summary of progress.
  • percentage: Percentage completed.
  • bar: A progress bar.

File

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