[BUGFIX] Form: Confirmation value relies on label value
authorOliver Hader <oliver@typo3.org>
Thu, 3 Nov 2011 20:07:35 +0000 (21:07 +0100)
committerOliver Hader <oliver@typo3.org>
Tue, 29 Nov 2011 15:35:23 +0000 (16:35 +0100)
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
typo3/sysext/form/Classes/View/Confirmation/Confirmation.php

index f482111..2d2bbf2 100644 (file)
@@ -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;
                }
index cbc779d..373b0f8 100644 (file)
@@ -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>