Skip to content

Commit

Permalink
Setup-Wizard-Viewscript: Fix that progress bar is not shown correctly
Browse files Browse the repository at this point in the history
fixes #13735
  • Loading branch information
N-o-X committed Jan 13, 2017
1 parent 116672d commit 9578c9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/setup/application/views/scripts/index/index.phtml
Expand Up @@ -4,7 +4,7 @@ use Icinga\Web\Notification;

$pages = $wizard->getPages();
$finished = isset($success);
$configPages = array_slice($pages, 3, count($pages) - 1, true);
$configPages = array_slice($pages, 3, count($pages) - 4, true);
$currentPos = array_search($wizard->getCurrentPage(), $pages, true);
list($configPagesLeft, $configPagesRight) = array_chunk($configPages, count($configPages) / 2, true);

Expand Down Expand Up @@ -134,7 +134,7 @@ if ($notifications->hasMessages()) {
</div>
<div class="step" style="width: 10%;">
<h1><?= $this->translate('Finish', 'setup.progress'); ?></h1>
<?php $stateClass = $finished ? ' active' : ''; ?>
<?php $stateClass = $finished ? ' complete' : ($pages[$currentPos] === end($pages) ? ' active' : ''); ?>
<table><tbody><tr>
<td class="left"><div class="line left<?= $stateClass; ?>"></div></td>
<td class="middle"><div class="bubble<?= $stateClass; ?>"></div></td>
Expand Down

0 comments on commit 9578c9f

Please sign in to comment.