From dff653b9229c290f9f027d08c45c6a5901333132 Mon Sep 17 00:00:00 2001
From: Oliver Hader <oliver@typo3.org>
Date: Thu, 3 Nov 2011 21:07:35 +0100
Subject: [PATCH] [BUGFIX] Form: Confirmation value relies on label value

The confirmation action (back to form or send mail) relies
only on the label value. To solve this, the confirmation-true
and confirmation-false arguments are introduced.

Change-Id: I6dbbb881396ccb1c215a89e7237766115dd03717
Fixes: #31560
Releases: 4.6, 4.7
Reviewed-on: http://review.typo3.org/6530
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
---
 typo3/sysext/form/Classes/Controller/Form.php               | 4 ++--
 .../sysext/form/Classes/View/Confirmation/Confirmation.php  | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/typo3/sysext/form/Classes/Controller/Form.php b/typo3/sysext/form/Classes/Controller/Form.php
index f48211107792..2d2bbf24e87b 100644
--- a/typo3/sysext/form/Classes/Controller/Form.php
+++ b/typo3/sysext/form/Classes/Controller/Form.php
@@ -196,7 +196,7 @@ class tx_form_Controller_Form {
 			(
 				!empty($submittedByPrefix) &&
 				$this->validate->isValid() &&
-				$this->requestHandler->getPost('confirmation') === $this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.donotconfirm')
+				$this->requestHandler->getPost('confirmation-false', NULL) !== NULL
 			)
 		) {
 			$show = TRUE;
@@ -237,7 +237,7 @@ class tx_form_Controller_Form {
 		if (
 			isset($this->typoscript['confirmation']) &&
 			$this->typoscript['confirmation'] == 1 &&
-			$this->requestHandler->getPost('confirmation') === NULL
+			$this->requestHandler->getPost('confirmation-true', NULL) === NULL
 		) {
 			$show = TRUE;
 		}
diff --git a/typo3/sysext/form/Classes/View/Confirmation/Confirmation.php b/typo3/sysext/form/Classes/View/Confirmation/Confirmation.php
index cbc779dad893..373b0f81791c 100644
--- a/typo3/sysext/form/Classes/View/Confirmation/Confirmation.php
+++ b/typo3/sysext/form/Classes/View/Confirmation/Confirmation.php
@@ -151,12 +151,12 @@ class tx_form_View_Confirmation extends tx_form_View_Confirmation_Element_Contai
 						<li class="csc-form-confirmation-false">
 							<input type="submit" value="' .
 								$this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.donotconfirm') .
-								'" name="' . $prefix . '[confirmation]" />
+								'" name="' . $prefix . '[confirmation-false]" />
 						</li>
-						<li class="csc-form-confirmation-false">
+						<li class="csc-form-confirmation-true">
 							<input type="submit" value="' .
 								$this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.confirm') .
-								'" name="' . $prefix . '[confirmation]" />
+								'" name="' . $prefix . '[confirmation-true]" />
 						</li>
 					</ol>
 				</fieldset>
-- 
GitLab