[BUGFIX] Fix close link in template module 21/34721/2
authorGeorg Ringer <georg.ringer@gmail.com>
Fri, 28 Nov 2014 04:21:48 +0000 (05:21 +0100)
committerFrans Saris <franssaris@gmail.com>
Fri, 28 Nov 2014 07:44:58 +0000 (08:44 +0100)
Sine restyling the backend, the close functionality for constants/setup
does not work anymore. As a solution replace it with a plain link to the
overview.

Change-Id: I006b5e6f59c3e582e1ec3d82fe3aa46e1f8b1b46
Resolves: #63385
Releases: master
Reviewed-on: http://review.typo3.org/34721
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index e3046fe..764c73c 100644 (file)
@@ -236,7 +236,7 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
                        $theOutput .= $this->pObj->doc->spacer(10);
                        $numberOfRows = 35;
                        // If abort pressed, nothing should be edited:
-                       if ($POST['abort'] || MathUtility::canBeInterpretedAsInteger($POST['abort_x']) && MathUtility::canBeInterpretedAsInteger($POST['abort_y']) || $POST['saveclose'] || MathUtility::canBeInterpretedAsInteger($POST['saveclose_x']) && MathUtility::canBeInterpretedAsInteger($POST['saveclose_y'])) {
+                       if ($POST['saveclose'] || MathUtility::canBeInterpretedAsInteger($POST['saveclose_x']) && MathUtility::canBeInterpretedAsInteger($POST['saveclose_y'])) {
                                unset($e);
                        }
                        if (isset($e['constants'])) {
index 4c66fad..fea0701 100644 (file)
@@ -254,7 +254,7 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
                                        'createExtension' => 'new'
                                );
                                $buttons['new'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_ts', $urlParameters)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.pagetitle', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a>';
-                               if (!empty($this->e) && !GeneralUtility::_POST('abort') && !GeneralUtility::_POST('saveclose')) {
+                               if (!empty($this->e) && !GeneralUtility::_POST('saveclose')) {
                                        // no NEW-button while edit
                                        $buttons['new'] = '';
                                        // SAVE button
@@ -266,9 +266,8 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
                                                'html' => '<input type="image" class="c-inputButton" name="saveclose" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" ' . '/>'
                                        ));
                                        // CLOSE button
-                                       $buttons['close'] = IconUtility::getSpriteIcon('actions-document-close', array(
-                                               'html' => '<input type="image" class="c-inputButton" name="abort" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" ' . '/>'
-                                       ));
+                                       $url = BackendUtility::getModuleUrl('web_ts', array('id' => $this->id));
+                                       $buttons['close'] = '<a href="' . htmlspecialchars($url) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' .  IconUtility::getSpriteIcon('actions-document-close') .'</a>';
                                }
                        } elseif ($this->extClassConf['name'] == 'TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController' && count($this->MOD_MENU['constant_editor_cat'])) {
                                // SAVE button