template->in_wizard = true; return parent::beforeRender(); } public function MetadataSubmit(Nette\Application\UI\Form $form, $values = '') { if(!$this->id) { $uid = $this->user->id; $user = $this->database->get_user($uid); $this->id = $this->database->create_mailing([ 'user' => $user, 'usergroup' => $user->primarygroup, ])->primary; } return parent::MetadataSubmit($form, $values); } public function MetadataRedirect(Nette\Application\UI\Form $form, $values = '') { $this->redirect('MailingAddresslist:default'); } }