protected function createComponentFormNew($name) { $form = new Form($this, $name); $form->addText('name', $this->translator->translate('new.name'))->addRule(Form::FILLED, $this->translator->translate('admin.form.isRequired')); $form->addText('link', $this->translator->translate('new.link')); $form->addUpload('image', $this->translator->translate('new.image')); $form->addTextArea('perex', $this->translator->translate('new.perex')); $form->addSpawEditor('text', $this->translator->translate('new.text')); $form->addSubmit('send', $this->translator->translate('admin.form.create')); $form->onSuccess[] = $this->submitFormNew; return $form; }