[BUGFIX] DocumentEditController save broken 97/42297/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 5 Aug 2015 20:46:27 +0000 (22:46 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 5 Aug 2015 21:34:57 +0000 (23:34 +0200)
With changing the input type=image to input type=submit, the x/y
values are no longer transferred the EditDocumentController
checked for, and content is no longer saved.
Adapt the controller code for the new parameters.

Resolves: #68776
Releases: master
Change-Id: Id1f3ec59ec728b48583c8ef79020c2feede4fd54
Reviewed-on: http://review.typo3.org/42297
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Build/Resources/Public/Less/TYPO3/_element_docheader.less
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/t3skin/Resources/Public/Css/backend.css

index 501cca6..2a05044 100644 (file)
@@ -40,6 +40,8 @@
                .c-inputButton {
                        color: inherit;
                        padding: 0;
+               }
+               input.c-inputButton {
                        text-indent: -1000px;
                }
        }
index 3891aa2..ba62834 100644 (file)
@@ -507,7 +507,7 @@ class EditDocumentController {
         * @return bool TRUE, then save the document (data submitted)
         */
        public function doProcessData() {
-               $out = $this->doSave || isset($_POST['_savedok_x']) || isset($_POST['_saveandclosedok_x']) || isset($_POST['_savedokview_x']) || isset($_POST['_savedoknew_x']) || isset($_POST['_translation_savedok_x']) || isset($_POST['_translation_savedokclear_x']);
+               $out = $this->doSave || isset($_POST['_savedok']) || isset($_POST['_saveandclosedok']) || isset($_POST['_savedokview']) || isset($_POST['_savedoknew']) || isset($_POST['_translation_savedok_x']) || isset($_POST['_translation_savedokclear_x']);
                return $out;
        }
 
@@ -615,7 +615,7 @@ class EditDocumentController {
                                $this->fixWSversioningInEditConf($tce->autoVersionIdMap);
                        }
                        // If a document is saved and a new one is created right after.
-                       if (isset($_POST['_savedoknew_x']) && is_array($this->editconf)) {
+                       if (isset($_POST['_savedoknew']) && is_array($this->editconf)) {
                                // Finding the current table:
                                reset($this->editconf);
                                $nTable = key($this->editconf);
@@ -636,7 +636,7 @@ class EditDocumentController {
                                $this->compileStoreDat();
                        }
                        // If a preview is requested
-                       if (isset($_POST['_savedokview_x'])) {
+                       if (isset($_POST['_savedokview'])) {
                                // Get the first table and id of the data array from DataHandler
                                $table = reset(array_keys($this->data));
                                $id = reset(array_keys($this->data[$table]));
@@ -647,11 +647,11 @@ class EditDocumentController {
                                $this->previewData['table'] = $table;
                                $this->previewData['id'] = $id;
                        }
-                       $tce->printLogErrorMessages(isset($_POST['_saveandclosedok_x']) || isset($_POST['_translation_savedok_x']) ? $this->retUrl : $this->R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars));
+                       $tce->printLogErrorMessages(isset($_POST['_saveandclosedok']) || isset($_POST['_translation_savedok_x']) ? $this->retUrl : $this->R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars));
                }
                //  || count($tce->substNEWwithIDs)... If any new items has been save, the document is CLOSED
                // because if not, we just get that element re-listed as new. And we don't want that!
-               if (isset($_POST['_saveandclosedok_x']) || isset($_POST['_translation_savedok_x']) || $this->closeDoc < 0) {
+               if (isset($_POST['_saveandclosedok']) || isset($_POST['_translation_savedok_x']) || $this->closeDoc < 0) {
                        $this->closeDocument(abs($this->closeDoc));
                }
        }
@@ -734,7 +734,7 @@ class EditDocumentController {
                        }
                ';
 
-               $previewCode = isset($_POST['_savedokview_x']) && $this->popViewId ? $this->generatePreviewCode() : '';
+               $previewCode = isset($_POST['_savedokview']) && $this->popViewId ? $this->generatePreviewCode() : '';
 
                $this->doc->JScode = $this->doc->wrapScriptTags($javascript . $previewCode);
                // Setting up the context sensitive menu:
index 2613d42..26eaf75 100644 (file)
@@ -9067,6 +9067,8 @@ div#contentMenu1 {
 #typo3-docheader .buttongroup .c-inputButton {
   color: inherit;
   padding: 0;
+}
+#typo3-docheader .buttongroup input.c-inputButton {
   text-indent: -1000px;
 }
 #typo3-docheader select {