| @@ 500-514 (lines=15) @@ | ||
| 497 | $this->template->idPage = $idPage; |
|
| 498 | } |
|
| 499 | ||
| 500 | public function createComponentSeoForm() |
|
| 501 | { |
|
| 502 | $form = $this->createForm(); |
|
| 503 | ||
| 504 | $form->addText('slug', 'Seo url')->setAttribute('class', 'form-control'); |
|
| 505 | $form->addText('metaTitle', 'Seo title')->setAttribute('class', 'form-control'); |
|
| 506 | $form->addText('metaKeywords', 'Seo keywords')->setAttribute('class', 'form-control'); |
|
| 507 | $form->addText('metaDescription', 'Seo description')->setAttribute('class', 'form-control'); |
|
| 508 | $form->addSubmit('send', 'Save')->setAttribute('class', 'btn btn-success'); |
|
| 509 | $form->onSuccess[] = callback($this, 'seoFormSubmitted'); |
|
| 510 | ||
| 511 | $form->setDefaults($this->actualPage->toArray()); |
|
| 512 | ||
| 513 | return $form; |
|
| 514 | } |
|
| 515 | ||
| 516 | public function seoFormSubmitted($form) |
|
| 517 | { |
|
| @@ 315-328 (lines=14) @@ | ||
| 312 | $this->reloadModalContent(); |
|
| 313 | } |
|
| 314 | ||
| 315 | public function createComponentCreateModuleForm() |
|
| 316 | { |
|
| 317 | $form = $this->createForm(); |
|
| 318 | ||
| 319 | $form->addText('name', 'Name')->setAttribute('class', 'form-control'); |
|
| 320 | $form->addText('author', 'Author')->setAttribute('class', 'form-control'); |
|
| 321 | $form->addText('email', 'Author\'s email')->setAttribute('class', 'form-control'); |
|
| 322 | $form->addTextArea('description', 'Description')->setAttribute('class', 'form-control'); |
|
| 323 | ||
| 324 | $form->addSubmit('install', 'Create new module')->setAttribute('class', 'btn btn-primary'); |
|
| 325 | $form->onSuccess[] = callback($this, 'createModuleFormSubmitted'); |
|
| 326 | ||
| 327 | return $form; |
|
| 328 | } |
|
| 329 | ||
| 330 | public function createModuleFormSubmitted($form) |
|
| 331 | { |
|