[TASK] Remove usage of setForm from RteController 48/44448/2
authorJan Helke <typo3@helke.de>
Sat, 31 Oct 2015 16:46:54 +0000 (17:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 31 Oct 2015 18:01:15 +0000 (19:01 +0100)
Resolves: #71208
Releases: master
Change-Id: I429fd2fca0fb48688b4938d0c9eabcdd000f33aa
Reviewed-on: https://review.typo3.org/44448
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/RteController.php

index 920200c..6c97a25 100644 (file)
@@ -95,12 +95,6 @@ class RteController extends AbstractWizardController
         $this->MCONF['name'] = 'wizard_rte';
         // Need to NOT have the page wrapped in DIV since if we do that we destroy
         // the feature that the RTE spans the whole height of the page!!!
-        $this->moduleTemplate->setForm(
-            '<form action="'
-            . htmlspecialchars(BackendUtility::getModuleUrl('tce_db'))
-            . '" method="post" enctype="multipart/form-data" name="editform" '
-            . ' onsubmit="return TBE_EDITOR.checkSubmit(1);">'
-        );
     }
 
     /**
@@ -126,6 +120,10 @@ class RteController extends AbstractWizardController
      */
     public function main()
     {
+        $this->content .= '<form action="'
+            . htmlspecialchars(BackendUtility::getModuleUrl('tce_db'))
+            . '" method="post" enctype="multipart/form-data" id="RteController" name="editform" '
+            . ' onsubmit="return TBE_EDITOR.checkSubmit(1);">';
         // Translate id to the workspace version:
         if ($versionedRecord = BackendUtility::getWorkspaceVersionOfRecord(
             $this->getBackendUserAuthentication()->workspace,
@@ -287,6 +285,7 @@ class RteController extends AbstractWizardController
             $saveButton = $buttonBar->makeInputButton()
                 ->setName('_savedok_x')
                 ->setValue('1')
+                ->setForm('RteController')
                 ->setOnClick('TBE_EDITOR.checkAndDoSubmit(1); return false;')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', true))
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL));
@@ -294,6 +293,7 @@ class RteController extends AbstractWizardController
             $saveAndViewButton = $buttonBar->makeInputButton()
                 ->setName('_savedokview_x')
                 ->setValue('1')
+                ->setForm('RteController')
                 ->setOnClick('document.editform.redirect.value+= '  . GeneralUtility::quoteJSvalue('&popView=1') . '; '
                     . ' TBE_EDITOR.checkAndDoSubmit(1); return false;')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', true))
@@ -305,6 +305,7 @@ class RteController extends AbstractWizardController
             $saveAndCloseButton = $buttonBar->makeInputButton()
                 ->setName('_saveandclosedok_x')
                 ->setValue('1')
+                ->setForm('RteController')
                 ->setOnClick('document.editform.redirect.value=' . GeneralUtility::quoteJSvalue($closeUrl)
                     . '; TBE_EDITOR.checkAndDoSubmit(1); return false;')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', true))