{# /** * @file * Default theme implementation for webform wizard progress bar. * * Available variables: * - webform: A webform. * - pages: Associative array of wizard pages. * - progress: Array of wizard progress containing page titles. * - current_page: Current wizard page key. * - current_index: The current wizard page index. * - max_pages: Maximum number of pages to be displayed. * * @see template_preprocess_webform_progress_bar() * * @ingroup themeable */ #} {{ attach_library('webform/webform.progress.bar') }} {% apply spaceless %} {% if progress|length < max_pages %}
    {% for index, page in progress %} {% set classes = [ 'webform-progress-bar__page', index < current_index ? 'webform-progress-bar__page--done', index == current_index ? 'webform-progress-bar__page--current', ] %} {{ page.title }}{% if (loop.first or loop.last) %}{% endif %} {% endfor %}
{% endif %} {% endapply %}