[BUGFIX] Checkbox values not shown in emails 21/7721/6
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:35:37 +0000 (13:35 +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/7721
Tested-by: Harry Glatz <glatz@analog.de>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
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 86284a0..0e9bc1b 100644 (file)
@@ -118,11 +118,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();