[TASK] Remove usage of modTmpl->setForm from SetupModuleController 59/44459/2
authorJan Helke <typo3@helke.de>
Sat, 31 Oct 2015 18:53:55 +0000 (19:53 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 31 Oct 2015 19:15:57 +0000 (20:15 +0100)
Resolves: #71220
Releases: master
Change-Id: I3a9aaeeb77f9b0ecfcc0f73f73f31affa48c0031
Reviewed-on: https://review.typo3.org/44459
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Gernot Schulmeister <gernotschulmeister@gmx.at>
Tested-by: Gernot Schulmeister <gernotschulmeister@gmx.at>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index 76f3bd4..40e613c 100644 (file)
@@ -354,9 +354,6 @@ class SetupModuleController extends AbstractModule
         }
         // Create instance of object for output of data
         $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
-        $this->moduleTemplate->setForm(
-            '<form action="' . BackendUtility::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="multipart/form-data">'
-        );
     }
 
     /**
@@ -383,6 +380,7 @@ class SetupModuleController extends AbstractModule
      */
     public function main()
     {
+        $this->content .= '<form action="' . BackendUtility::getModuleUrl('user_setup') . '" method="post" id="SetupModuleController" name="usersetup" enctype="multipart/form-data">';
         if ($this->languageUpdate) {
             $this->moduleTemplate->addJavaScriptCode('languageUpdate', '
                 if (top.refreshMenu) {
@@ -468,6 +466,7 @@ class SetupModuleController extends AbstractModule
         // Build the <body> for the module
         // Renders the module page
         $this->moduleTemplate->setContent($this->content);
+        $this->content .= '</form>';
     }
 
 
@@ -518,6 +517,7 @@ class SetupModuleController extends AbstractModule
             ->setName('data[save]')
             ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', true))
             ->setValue('1')
+            ->setForm('SetupModuleController')
             ->setShowLabelText(true)
             ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL));