public function createButton() { if ($this->button) { return FALSE; } /** @var Nette\Forms\Container $container */ $container = $this->control->lookup('Nette\\Forms\\Container'); $name = $this->control->getName() . self::$buttonSuffix; $this->button = new SubmitButton("Apply"); $this->button->setValidationScope(false); $container->addComponent($this->button, $name); $this->control->getControlPrototype()->addAttributes(array('data-apply-button' => $this->button->getHtmlId())); return TRUE; }