public function contactFormOkClicked(\Nette\Forms\SubmitButton $button) { $values = $button->getForm()->getValues(); $this->sendContactEmail($values); }
/** * Returns HTML name of control. * @return string */ public function getHtmlName() { $name = parent::getHtmlName(); return strpos($name, '[') === FALSE ? $name : $name . '[]'; }
/** * Confirm NO clicked * @param \Nette\Forms\SubmitButton $button */ public function cancelClicked($button) { $form = $button->getForm(TRUE); $values = $form->getValues(); if (isset($this->session->{$values['token']})) { unset($this->session->{$values['token']}); } $this->show = FALSE; $this->invalidateControl(); if (!$this->presenter->isAjax()) { $this->presenter->redirect('this'); } }