From 048f28d7232f3e60c7ba7e1b19214a18604c33d4 Mon Sep 17 00:00:00 2001
From: Thomas Kieslich <thomas.kieslich@gmail.com>
Date: Thu, 7 Sep 2017 17:04:00 +0200
Subject: [PATCH] [TASK] EXT:form - change naming and icon in new content
 element wizard

Change language labels and move them to ext:form locallang.xlf.
Change the icon to content-form.

Resolves: #81650
Releases: master, 8.7
Change-Id: I1c497b78da92dc589ad9d7a47dde35c5aeba488a
Reviewed-on: https://review.typo3.org/53957
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Daniel Lorenz <daniel.lorenz@extco.de>
Tested-by: Daniel Lorenz <daniel.lorenz@extco.de>
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
---
 typo3/sysext/form/Configuration/PageTS/modWizards.ts        | 6 +++---
 .../sysext/form/Configuration/TCA/Overrides/tt_content.php  | 5 ++++-
 typo3/sysext/form/Resources/Private/Language/locallang.xlf  | 6 ++++++
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/typo3/sysext/form/Configuration/PageTS/modWizards.ts b/typo3/sysext/form/Configuration/PageTS/modWizards.ts
index edcf2c89040a..61c7c7f680d2 100644
--- a/typo3/sysext/form/Configuration/PageTS/modWizards.ts
+++ b/typo3/sysext/form/Configuration/PageTS/modWizards.ts
@@ -2,9 +2,9 @@ mod.wizards.newContentElement.wizardItems.forms {
     show :=addToList(formframework)
     elements {
         formframework {
-            iconIdentifier = content-elements-mailform
-            title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:forms_mail_title
-            description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:forms_mail_description
+            iconIdentifier = content-form
+            title = LLL:EXT:form/Resources/Private/Language/locallang.xlf:form_new_wizard_title
+            description = LLL:EXT:form/Resources/Private/Language/locallang:form_new_wizard_description
             tt_content_defValues {
                 CType = form_formframework
             }
diff --git a/typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
index c04d725308d6..8680fffe7e15 100644
--- a/typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
+++ b/typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
@@ -9,6 +9,8 @@ call_user_func(function () {
         'form_formframework'
     );
 
+    $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['form_formframework'] = 'content-form';
+
     $GLOBALS['TCA']['tt_content']['types']['form_formframework']['showitem'] = '
         --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
             --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
@@ -33,6 +35,7 @@ call_user_func(function () {
     \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
         'TYPO3.CMS.Form',
         'Formframework',
-        'Form'
+        'Form',
+        'content-form'
     );
 });
diff --git a/typo3/sysext/form/Resources/Private/Language/locallang.xlf b/typo3/sysext/form/Resources/Private/Language/locallang.xlf
index b852a42e5111..e8db63fce393 100644
--- a/typo3/sysext/form/Resources/Private/Language/locallang.xlf
+++ b/typo3/sysext/form/Resources/Private/Language/locallang.xlf
@@ -82,6 +82,12 @@
             <trans-unit id="validation.error.1476396435" xml:space="preserve">
                 <source>Do not fill this field</source>
             </trans-unit>
+            <trans-unit id="form_new_wizard_title" xml:space="preserve">
+                <source>Form</source>
+            </trans-unit>
+            <trans-unit id="form_new_wizard_description" xml:space="preserve">
+                <source>A form allowing website users to submit messages.</source>
+            </trans-unit>
         </body>
     </file>
 </xliff>
-- 
GitLab