mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
Merge pull request #52 from spekulatius/no-completed-for-current
MINOR: fixing completed class for current step
This commit is contained in:
commit
c99711da5d
@ -594,12 +594,15 @@ abstract class MultiForm extends Form {
|
||||
|
||||
$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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user