[TASK] Remove usage of setForm from TableController 49/44449/2
authorJan Helke <typo3@helke.de>
Sat, 31 Oct 2015 17:01:39 +0000 (18:01 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 31 Oct 2015 18:04:18 +0000 (19:04 +0100)
Resolves: #71209
Releases: master
Change-Id: I7c04b709f223e2264d758828a46d29e366f468a2
Reviewed-on: https://review.typo3.org/44449
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php

index b55ca7a..2520748 100644 (file)
@@ -133,9 +133,6 @@ class TableController extends AbstractWizardController
         $this->inputStyle = isset($this->TABLECFG['textFields']) ? (bool)$this->TABLECFG['textFields'] : true;
         // Setting form tag:
         list($rUri) = explode('#', GeneralUtility::getIndpEnv('REQUEST_URI'));
-        $this->moduleTemplate->setForm(
-            '<form action="' . htmlspecialchars($rUri) . '" method="post" name="wizardForm">'
-        );
         $this->tableParsing_delimiter = '|';
         $this->tableParsing_quote = '';
     }
@@ -162,6 +159,7 @@ class TableController extends AbstractWizardController
      */
     public function main()
     {
+        $this->content .= '<form action="' . htmlspecialchars($rUri) . '" method="post" id="TableController" name="wizardForm">';
         if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
             $this->content .= $this->moduleTemplate->section(
                 $this->getLanguageService()->getLL('table_title'),
@@ -177,6 +175,7 @@ class TableController extends AbstractWizardController
                 1
             );
         }
+        $this->content .= '</form>';
         // Setting up the buttons and markers for docHeader
         $this->getButtons();
         // Build the <body> for the module
@@ -217,12 +216,14 @@ class TableController extends AbstractWizardController
             $saveButton = $buttonBar->makeInputButton()
                 ->setName('_savedok')
                 ->setValue('1')
+                ->setForm('TableController')
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL))
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', true));
             // Save & Close
             $saveAndCloseButton = $buttonBar->makeInputButton()
                 ->setName('_saveandclosedok')
                 ->setValue('1')
+                ->setForm('TableController')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', true))
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
                     'actions-document-save-close',
@@ -237,6 +238,7 @@ class TableController extends AbstractWizardController
             $reloadButton = $buttonBar->makeInputButton()
                 ->setName('_refresh')
                 ->setValue('1')
+                ->setForm('TableController')
                 ->setTitle($this->getLanguageService()->getLL('forms_refresh', true))
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-refresh', Icon::SIZE_SMALL));
             $buttonBar->addButton($reloadButton);