Skip to content

Commit

Permalink
Form: calling setAction() bypasses creation of 'do' element [Closes #33]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 26, 2014
1 parent f6e5a09 commit 1db4745
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Application/UI/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ protected function attached($presenter)

if (!$this->getAction()) {
$this->setAction(new Link($presenter, 'this', array()));
$signal = new Nette\Forms\Controls\HiddenField($name . self::NAME_SEPARATOR . 'submit');
$signal->setOmitted()->setHtmlId(FALSE);
$this[Presenter::SIGNAL_KEY] = $signal;
}

if (iterator_count($this->getControls()) && $this->isSubmitted()) {
Expand All @@ -79,10 +82,6 @@ protected function attached($presenter)
}
}
}

$signal = new Nette\Forms\Controls\HiddenField($name . self::NAME_SEPARATOR . 'submit');
$signal->setOmitted()->setHtmlId(FALSE);
$this[Presenter::SIGNAL_KEY] = $signal;
}
parent::attached($presenter);
}
Expand Down

0 comments on commit 1db4745

Please sign in to comment.