luser; $template = $this->template; $template->id = $this->id; $template->addresslists = $luser->addresslists; } protected function createComponentSelect($action) { $form = new Nette\Application\UI\Form; $form->addHidden('addresslist'); $form->addProtection("protection token expired"); $form->onSuccess[] = [$this, 'selectFormOK']; return $form; } public function selectFormOK(Nette\Application\UI\Form $form) { $addresslist = $form->values['addresslist']; $luser = $this->luser; $mailing = $luser->get_mailing($this->id); $mailing->addresslist = $luser->get_addresslist($addresslist); $this->redirect($this->redirectTarget); } public function actionCancel() { $this->redirect($this->redirectTarget); } public function getRedirectTarget() { return 'Mailing:default'; } }