public function contactFormOkClicked(\Nette\Forms\SubmitButton $button) {
		
		$values = $button->getForm()->getValues();
		
		$this->sendContactEmail($values);
		
	}
Beispiel #2
0
	/**
	 * Returns HTML name of control.
	 * @return string
	 */
	public function getHtmlName()
	{
		$name = parent::getHtmlName();
		return strpos($name, '[') === FALSE ? $name : $name . '[]';
	}
Beispiel #3
0
 /**
  * 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');
     }
 }