Skip to content

Commit

Permalink
IMP: Call parent constructor when ready
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk committed Jul 20, 2015
1 parent f92411b commit 1d1e8b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class Form extends \Nette\Application\UI\Form
*/
public function __construct(IContainer $parent = null, $name = null)
{
// Call parent constructor with params
parent::__construct($parent, $name);

// Set bootstrap renderer and subscribe to onSuccess event handler
$this->setRenderer(new Bootstrap)->setLayout(Bootstrap::HORIZONTAL);
$this->onSuccess[] = function($form, $data) {
Expand All @@ -33,6 +30,9 @@ public function __construct(IContainer $parent = null, $name = null)

// Enable CSRF protection into each form of this app
$this->addProtection('Bezpečnostní klíč vypršel, odešlete prosím formulář znovu.');

// Call parent constructor with params
parent::__construct($parent, $name);
}


Expand Down

0 comments on commit 1d1e8b8

Please sign in to comment.