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