[BUGFIX] TS-Editor: Save button in single edit mode doesn't save 62/42362/3
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 7 Aug 2015 10:31:58 +0000 (12:31 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 7 Aug 2015 10:51:10 +0000 (12:51 +0200)
Due to a change from type = image to a button the saving of
content was blocked by internal checks. Make check behave the same
like saving content in the EditDocumentController.

Resolves: #68816
Releases: master
Change-Id: Ic67782ca346589f58c97958148735e8667f30da4
Reviewed-on: http://review.typo3.org/42362
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/t3editor/Resources/Public/JavaScript/T3editor.js
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index 3be8140..51ed20f 100644 (file)
@@ -67,7 +67,7 @@ define('TYPO3/CMS/T3editor/T3editor', ['jquery'], function ($) {
         * Initializes editor events
         */
        T3editor.initializeEditorEvents = function(codemirror) {
-               $('input[type="submit"], input[type="image"]').on('click', function(e) {
+               $('input[type="submit"], button[type="submit"]').on('click', function(e) {
                        codemirror.options.originalTextarea.val(codemirror.editor.getCode());
                });
 
index 9118fc1..727cae1 100644 (file)
@@ -179,10 +179,8 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
                        // Update template ?
                        $POST = GeneralUtility::_POST();
                        if (
-                               $POST['submit']
-                               || MathUtility::canBeInterpretedAsInteger($POST['submit_x']) && MathUtility::canBeInterpretedAsInteger($POST['submit_y'])
-                               || $POST['saveclose']
-                               || MathUtility::canBeInterpretedAsInteger($POST['saveclose_x']) && MathUtility::canBeInterpretedAsInteger($POST['saveclose_y'])
+                               isset($POST['submit'])
+                               || isset($POST['saveclose'])
                        ) {
                                // Set the data to be saved
                                $recData = array();
@@ -239,7 +237,7 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
                        $theOutput .= $this->pObj->doc->spacer(10);
                        $numberOfRows = 35;
                        // If abort pressed, nothing should be edited:
-                       if ($POST['saveclose'] || MathUtility::canBeInterpretedAsInteger($POST['saveclose_x']) && MathUtility::canBeInterpretedAsInteger($POST['saveclose_y'])) {
+                       if (isset($POST['saveclose'])) {
                                unset($e);
                        }
                        if (isset($e['constants'])) {
index b36ec8a..ba1760b 100755 (executable)
@@ -297,7 +297,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
                                                . IconUtility::getSpriteIcon('actions-document-save', array('title' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE)))
                                                . '</button>';
                                        // SAVE AND CLOSE button
-                                       $buttons['save_close'] = '<button class="c-inputButton" name="saveclose">'
+                                       $buttons['save_close'] = '<button type="submit" class="c-inputButton" name="saveclose">'
                                                . IconUtility::getSpriteIcon('actions-document-save-close', array('title' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE)))
                                                . '</button>';
                                        // CLOSE button