[BUGFIX] Installer: Show correct value for boolean options 81/25681/9
authorMarkus Klein <klein.t3@mfc-linz.at>
Mon, 13 Jan 2014 20:45:14 +0000 (21:45 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 29 Jan 2014 19:54:34 +0000 (20:54 +0100)
Resolves: #53963
Releases: 6.2
Change-Id: I0dd51f2d256c153d6b6a1e247d86c69c5cfd7a7b
Reviewed-on: https://review.typo3.org/25681
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/install/Classes/Controller/Action/Tool/AllConfiguration.php
typo3/sysext/install/Resources/Private/Partials/Action/Tool/AllConfiguration/SubSection.html

index 2d1ed9b..7a85b0f 100644 (file)
@@ -101,8 +101,8 @@ class AllConfiguration extends Action\AbstractAction implements Action\ActionInt
                                                $itemData['value'] = str_replace(array('\'.chr(10).\'', '\' . LF . \''), array(LF, LF), $value);
                                        } elseif (preg_match('/^(<.*?>)?boolean/i', $description)) {
                                                $itemData['type'] = 'checkbox';
                                                $itemData['value'] = str_replace(array('\'.chr(10).\'', '\' . LF . \''), array(LF, LF), $value);
                                        } elseif (preg_match('/^(<.*?>)?boolean/i', $description)) {
                                                $itemData['type'] = 'checkbox';
-                                               $itemData['value'] = !empty($value) ? $value : 1;
-                                               $itemData['checked'] = $value ? TRUE : FALSE;
+                                               $itemData['value'] = $value ? '1' : '0';
+                                               $itemData['checked'] = (boolean)$value;
                                        } else {
                                                $itemData['type'] = 'input';
                                                $itemData['value'] = $value;
                                        } else {
                                                $itemData['type'] = 'input';
                                                $itemData['value'] = $value;
index 35583bf..39ab0dc 100644 (file)
@@ -9,8 +9,15 @@
                <f:for each="{sectionData}" as="item">
                        <div class="item">
                                <strong>[{sectionName}][{item.key}] </strong>
                <f:for each="{sectionData}" as="item">
                        <div class="item">
                                <strong>[{sectionName}][{item.key}] </strong>
-                               <f:if condition="{item.value}">
-                                       = {item.value -> i:format.crop(maxCharacters: 40)}
+                               <f:if condition="{item.type} == 'checkbox'">
+                                       <f:then>
+                                               = {item.value}
+                                       </f:then>
+                                       <f:else>
+                                               <f:if condition="{item.value}">
+                                                       = {item.value -> i:format.crop(maxCharacters: 40)}
+                                               </f:if>
+                                       </f:else>
                                </f:if>
                                <div class="item-description">
                                        {item.description -> f:format.raw()}
                                </f:if>
                                <div class="item-description">
                                        {item.description -> f:format.raw()}
@@ -32,7 +39,7 @@
                                                />
                                                <input
                                                        type="checkbox"
                                                />
                                                <input
                                                        type="checkbox"
-                                                       value="{item.value}"
+                                                       value="1"
                                                        name="install[values][{sectionName}][{item.key}]"
                                                        {f:if(condition: item.checked, then:'checked="checked"')}
                                                />
                                                        name="install[values][{sectionName}][{item.key}]"
                                                        {f:if(condition: item.checked, then:'checked="checked"')}
                                                />