[TASK] Change wording for User Settings reset button 28/44528/4
authorBenjamin Mack <benni@typo3.org>
Wed, 4 Nov 2015 05:50:10 +0000 (06:50 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 4 Nov 2015 13:10:53 +0000 (14:10 +0100)
Change the wording on the button in the user settings
to "Reset user settings to default state" and remove the
second "selective reset" button to only change certain options.

Resolves: #53681
Releases: master
Change-Id: I72afcdc3a8e84eb67840eb81b061f6e22867c9a8
Reviewed-on: https://review.typo3.org/44528
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Documentation/Changelog/master/Important-53681-ChangeWordingForUserSettingsResetConfigurationAndClearTemporaryData.rst [new file with mode: 0644]
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/setup/Resources/Private/Language/locallang.xlf
typo3/sysext/setup/ext_tables.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-53681-ChangeWordingForUserSettingsResetConfigurationAndClearTemporaryData.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-53681-ChangeWordingForUserSettingsResetConfigurationAndClearTemporaryData.rst
new file mode 100644 (file)
index 0000000..b914f89
--- /dev/null
@@ -0,0 +1,8 @@
+===================================================================================================
+Important: #53681 - Change wording for User Settings "Reset Configuration and Clear Temporary Data"
+===================================================================================================
+
+Description
+===========
+
+To simplify the user settings form, the button "Clear Temporary Data" has been removed. The button to reset the configuration and clear the temporary data has been renamed to "Reset user settings to default state".
\ No newline at end of file
index 40e613c..802784f 100644 (file)
@@ -132,11 +132,6 @@ class SetupModuleController extends AbstractModule
     /**
      * @var bool
      */
-    protected $tempDataIsCleared = false;
-
-    /**
-     * @var bool
-     */
     protected $settingsAreResetToDefault = false;
 
     /**
@@ -219,13 +214,6 @@ class SetupModuleController extends AbstractModule
                 // If every value should be default
                 $beUser->resetUC();
                 $this->settingsAreResetToDefault = true;
-            } elseif ($d['clearSessionVars']) {
-                foreach ($beUser->uc as $key => $value) {
-                    if (!isset($columns[$key])) {
-                        unset($beUser->uc[$key]);
-                    }
-                }
-                $this->tempDataIsCleared = true;
             } elseif ($d['save']) {
                 // Save all submitted values if they are no array (arrays are with table=be_users) and exists in $GLOBALS['TYPO3_USER_SETTINGS'][columns]
                 foreach ($columns as $field => $config) {
@@ -298,10 +286,6 @@ class SetupModuleController extends AbstractModule
                 $beUser->writelog(254, 1, 0, 1, 'Personal settings changed', array());
                 $this->setupIsUpdated = true;
             }
-            // If the temporary data has been cleared, lets make a log note about it
-            if ($this->tempDataIsCleared) {
-                $beUser->writelog(254, 1, 0, 1, $this->getLanguageService()->getLL('tempDataClearedLog'), array());
-            }
             // Persist data if something has changed:
             if (!empty($storeRec) && $this->saveData) {
                 // Make instance of TCE for storing the changes.
@@ -403,18 +387,12 @@ class SetupModuleController extends AbstractModule
         $this->loadModules->load($GLOBALS['TBE_MODULES']);
         $this->content .= $this->doc->header($this->getLanguageService()->getLL('UserSettings'));
         // Show if setup was saved
-        if ($this->setupIsUpdated && !$this->tempDataIsCleared && !$this->settingsAreResetToDefault) {
+        if ($this->setupIsUpdated && !$this->settingsAreResetToDefault) {
             $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('setupWasUpdated'), $this->getLanguageService()->getLL('UserSettings'));
             $this->content .= $flashMessage->render();
         }
 
         // Show if temporary data was cleared
-        if ($this->tempDataIsCleared) {
-            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('tempDataClearedFlashMessage'), $this->getLanguageService()->getLL('tempDataCleared'));
-            $this->content .= $flashMessage->render();
-        }
-
-        // Show if temporary data was cleared
         if ($this->settingsAreResetToDefault) {
             $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('settingsAreReset'), $this->getLanguageService()->getLL('resetConfiguration'));
             $this->content .= $flashMessage->render();
@@ -456,8 +434,7 @@ class SetupModuleController extends AbstractModule
         $this->content .= '<input type="hidden" name="simUser" value="' . $this->simUser . '" />
             <input type="hidden" name="formToken" value="' . $formToken . '" />
             <input type="hidden" value="1" name="data[save]" />
-            <input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />
-            <input type="hidden" name="data[clearSessionVars]" value="0" id="clearSessionVars" />';
+            <input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />';
         $this->content .= '</div>';
         // End of wrapper div
         $this->content .= '</div>';
index 565455b..017f1fc 100644 (file)
                        <trans-unit id="resetConfiguration">
                                <source>Reset Configuration and Clear Temporary Data</source>
                        </trans-unit>
-                       <trans-unit id="resetConfigurationShort">
-                               <source>Reset</source>
+                       <trans-unit id="resetConfigurationButton">
+                               <source>Reset user settings to default state</source>
                        </trans-unit>
                        <trans-unit id="setToStandardQuestion">
                                <source>Are you sure you want to reset all values to default?</source>
                        </trans-unit>
-                       <trans-unit id="clearSessionVars">
-                               <source>Clear Temporary Data</source>
-                       </trans-unit>
-                       <trans-unit id="clearSessionVarsShort">
-                               <source>Clear</source>
-                       </trans-unit>
-                       <trans-unit id="clearSessionVarsQuestion">
-                               <source>Are you sure you want to clear the temporary data?</source>
-                       </trans-unit>
                        <trans-unit id="functions">
                                <source>Advanced functions</source>
                        </trans-unit>
                        <trans-unit id="enableInstallTool.fileHasKeep">
                                <source>The Install Tool file has the content "KEEP_FILE" and can not be deleted!</source>
                        </trans-unit>
-                       <trans-unit id="tempDataCleared">
-                               <source>Temporary data cleared</source>
-                       </trans-unit>
-                       <trans-unit id="tempDataClearedFlashMessage">
-                               <source>The temporary data has been cleared.</source>
-                       </trans-unit>
-                       <trans-unit id="tempDataClearedLog">
-                               <source>Temporary data cleared</source>
-                       </trans-unit>
                        <trans-unit id="settingsAreReset">
                                <source>The user settings have been reset to default values and temporary data has been cleared.</source>
                        </trans-unit>
index fadfe03..1c2c5c0 100644 (file)
@@ -117,24 +117,13 @@ if (TYPO3_MODE === 'BE') {
             'resetConfiguration' => array(
                 'type' => 'button',
                 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfiguration',
-                'buttonlabel' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfigurationShort',
+                'buttonlabel' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfigurationButton',
                 'csh' => 'reset',
                 'onClick' => 'if (confirm(\'%s\')) { document.getElementById(\'setValuesToDefault\').value = 1; this.form.submit(); }',
                 'onClickLabels' => array(
                     'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:setToStandardQuestion'
                 )
             ),
-            'clearSessionVars' => array(
-                'type' => 'button',
-                'access' => 'admin',
-                'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:clearSessionVars',
-                'buttonlabel' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:clearSessionVarsShort',
-                'csh' => 'reset',
-                'onClick' => 'if (confirm(\'%s\')) { document.getElementById(\'clearSessionVars\').value = 1; this.form.submit(); }',
-                'onClickLabels' => array(
-                    'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:clearSessionVarsQuestion'
-                )
-            ),
             'resizeTextareas_Flexible' => array(
                 'type' => 'check',
                 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resizeTextareas_Flexible',
@@ -154,7 +143,7 @@ if (TYPO3_MODE === 'BE') {
         'showitem' => '--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:personal_data,realName,email,emailMeAtLogin,avatar,lang,
                                --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xml:passwordHeader,passwordCurrent,password,password2,
                                --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:opening,startModule,thumbnailsByDefault,titleLen,
-                               --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,edit_docModuleUpload,showHiddenFilesAndFolders,resizeTextareas_Flexible,resizeTextareas_MaxHeight,copyLevels,recursiveDelete,resetConfiguration,clearSessionVars,
+                               --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,edit_docModuleUpload,showHiddenFilesAndFolders,resizeTextareas_Flexible,resizeTextareas_MaxHeight,copyLevels,recursiveDelete,resetConfiguration,
                                --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:adminFunctions,debugInWindow'
     );
 }