Skip to content

Commit

Permalink
MINOR: fixing completed class for current step
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Thaleikis committed Nov 30, 2015
1 parent d2780c4 commit 1b84a83
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/model/MultiForm.php
Expand Up @@ -574,12 +574,15 @@ public function getAllStepsLinear() {

$firstStep = DataObject::get_one(static::$start_step, "\"SessionID\" = {$this->session->ID}");
$firstStep->LinkingMode = ($firstStep->ID == $this->getCurrentStep()->ID) ? 'current' : 'link';
$firstStep->addExtraClass('completed');
$firstStep->setForm($this);
$stepsFound->push($firstStep);

// mark the further steps as non-completed if the first step is the current
if ($firstStep->ID == $this->getCurrentStep()->ID) $this->currentStepHasBeenFound = true;
if ($firstStep->ID == $this->getCurrentStep()->ID) {
$this->currentStepHasBeenFound = true;
} else {
$firstStep->addExtraClass('completed');
}

$this->getAllStepsRecursive($firstStep, $stepsFound);

Expand Down

0 comments on commit 1b84a83

Please sign in to comment.