[BUGFIX] Checkbox values not shown in emails 64/41664/2
authorSebastian Müller <sebastian.mueller@elementare-teilchen.de>
Tue, 27 Nov 2012 00:58:16 +0000 (01:58 +0100)
committerBenjamin Mack <benni@typo3.org>
Sat, 18 Jul 2015 11:36:33 +0000 (13:36 +0200)
Emails sent by FORM sysext do not show the values of checkboxes, in case
of they were checked.

Change-Id: Ie8df935932abb59d211e963776dcdf09c94618c6
Resolves: #33092
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/41664
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php

index b94a2de..e6a5d99 100644 (file)
@@ -115,11 +115,10 @@ abstract class AbstractElementView {
                                                        }
                                                        break;
                                                case 'inputvalue':
-                                                       if (array_key_exists('checked', $this->model->getAllowedAttributes())) {
-                                                               if (!$this->model->hasAttribute('checked')) {
-                                                                       $emptyElement = TRUE;
-                                                               }
-                                                       } elseif (array_key_exists('selected', $this->model->getAllowedAttributes()) && !$this->model->hasAttribute('selected')) {
+                                                       if (
+                                                               (array_key_exists('checked', $this->model->getAllowedAttributes()) && !$this->model->hasAttribute('checked'))
+                                                               || (array_key_exists('selected', $this->model->getAllowedAttributes()) && !$this->model->hasAttribute('selected'))
+                                                       ) {
                                                                $emptyElement = TRUE;
                                                        } else {
                                                                $inputValue = $this->getInputValue();