Problem/Motivation
The variables announced in the template file webform-progress.html.twig are not all defined. These variables need to be made available or be removed from the template documentation. When the theme is called is pass only current_page.
{#
/**
* @file
* Default theme implementation for webform wizard progress.
*
* Available variables:
* - webform: A webform.
* - 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.
*
* @see template_preprocess_webform_progress()
*
* @ingroup themeable
*/
#} $form['progress'] = [
'#theme' => 'webform_progress',
'#webform' => $this->getWebform(),
'#webform_submission' => $webform_submission,
'#current_page' => $current_page,
'#operation' => $this->operation,
'#weight' => -20,
];
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | screenshot-webform.png | 38.39 KB | phjou |
Issue fork webform-3214745
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jrockowitz commentedThe variables are set via template_preprocess_webform_progress()
Any patch that improves documentation is always welcomed
Comment #3
phjouThanks.
So it seems this is just the total_pages that is wrong. The other variables seems there. I made a merge request.
And I also added the index one in the documentation which can be pretty useful.
Comment #6
jrockowitz commented