mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 09:05:49 +00:00
MINOR: Make the form reference consistently available on form steps.
This commit is contained in:
parent
c73082e2ab
commit
65d1681331
@ -199,6 +199,8 @@ abstract class MultiForm extends Form {
|
||||
*/
|
||||
protected function setCurrentStep($step) {
|
||||
$this->session->CurrentStepID = $step->ID;
|
||||
$step->setForm($this);
|
||||
|
||||
return $this->session->write();
|
||||
}
|
||||
|
||||
|
@ -263,6 +263,8 @@ class MultiFormStep extends DataObject {
|
||||
$steps = DataObject::get('MultiFormStep', "\"SessionID\" = {$this->SessionID}", '"LastEdited" DESC');
|
||||
if($steps) {
|
||||
foreach($steps as $step) {
|
||||
$step->setForm($this->form);
|
||||
|
||||
if($step->getNextStep()) {
|
||||
if($step->getNextStep() == $this->class) {
|
||||
return $step->class;
|
||||
|
Loading…
x
Reference in New Issue
Block a user