[TASK] Allow overriding the confirmation message finisher 05/57005/4
authorBjörn Jacob <bjoern.jacob@tritum.de>
Fri, 18 May 2018 12:48:21 +0000 (14:48 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 18 May 2018 13:32:32 +0000 (15:32 +0200)
Since #80187 it is possible to use the confirmation message finisher
within the form editor. This patch adds the missing possibility to
override the finisher within the content element.

Resolves: #85047
Related: #80187
Releases: master
Change-Id: I55e91972e1eb5ce0b636a8286423f4af2202ca03
Reviewed-on: https://review.typo3.org/57005
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php
typo3/sysext/form/Configuration/Yaml/FormEngineSetup.yaml
typo3/sysext/form/Resources/Private/Language/Database.xlf

index c4dbeb9..afe6557 100644 (file)
@@ -91,9 +91,9 @@ class ConfirmationFinisher extends AbstractFinisher
      */
     protected function executeInternal()
     {
-        $contentElementUid = (int)$this->parseOption('contentElementUid');
+        $contentElementUid = $this->parseOption('contentElementUid');
         $typoscriptObjectPath = $this->parseOption('typoscriptObjectPath');
-        if ($contentElementUid > 0) {
+        if (!empty($contentElementUid)) {
             $pathSegments = GeneralUtility::trimExplode('.', $typoscriptObjectPath);
             $lastSegment = array_pop($pathSegments);
             $setup = $this->typoScriptSetup;
index 89221a1..c98d08f 100644 (file)
@@ -10,6 +10,26 @@ TYPO3:
 
           ### FINISHERS ###
           finishersDefinition:
+            Confirmation:
+              FormEngine:
+                label: 'tt_content.finishersDefinition.Confirmation.label'
+                elements:
+                  contentElementUid:
+                    label: 'tt_content.finishersDefinition.Confirmation.contentElementUid.label'
+                    config:
+                      type: 'group'
+                      internal_type: 'db'
+                      allowed: 'tt_content'
+                      size: 1
+                      maxitems: 1
+                      fieldWizard:
+                        recordsOverview:
+                          disabled: 1
+                  message:
+                    label: 'tt_content.finishersDefinition.Confirmation.message.label'
+                    config:
+                      type: 'text'
+
             EmailToSender:
               FormEngine:
                 __inheritances:
index 59490e4..f910bb9 100644 (file)
                 <source>Invalid configuration.</source>
             </trans-unit>
 
+            <trans-unit id="tt_content.finishersDefinition.Confirmation.label" xml:space="preserve">
+                <source>Confirmation</source>
+            </trans-unit>
+            <trans-unit id="tt_content.finishersDefinition.Confirmation.message.label" xml:space="preserve">
+                <source>Text</source>
+            </trans-unit>
+            <trans-unit id="tt_content.finishersDefinition.Confirmation.contentElementUid.label" xml:space="preserve">
+                <source>Record</source>
+            </trans-unit>
+
             <trans-unit id="tt_content.finishersDefinition.EmailToSender.label" xml:space="preserve">
                 <source>Email to sender (form submitter)</source>
             </trans-unit>