diff --git a/setup/wizardsteps/WizStepModulesChoice.php b/setup/wizardsteps/WizStepModulesChoice.php
index 1a20926a9..ea9396e2f 100644
--- a/setup/wizardsteps/WizStepModulesChoice.php
+++ b/setup/wizardsteps/WizStepModulesChoice.php
@@ -671,7 +671,7 @@ EOF
$oITopExtension = $this->oExtensionsMap->GetFromExtensionCode($aChoice['extension_code']);
//If the extension is missing from disk, it won't exist in the ExtensionsMap, thus returning null
$bCanBeUninstalled = isset($aChoice['uninstallable']) ? $aChoice['uninstallable'] === true || $aChoice['uninstallable'] === 'yes' : $oITopExtension->CanBeUninstalled();
- $bSelected = isset($aSelectedComponents[$sChoiceId]) && ($aSelectedComponents[$sChoiceId] == $sChoiceId);
+ $bSelected = isset($aSelectedComponents[$sChoiceId]) && ($aSelectedComponents[$sChoiceId] === $sChoiceId);
$bMissingFromDisk = isset($aChoice['missing']) && $aChoice['missing'] === true;
$bMandatory = (isset($aChoice['mandatory']) && $aChoice['mandatory']);
$bInstalled = $bMissingFromDisk || $oITopExtension->bInstalled;
@@ -745,7 +745,7 @@ EOF
');
*/
//$oPage->add('
'.$sHiddenInput.' ');
- $this->DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefaults, $sChoiceId, $aFlags);
+ $this->DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefaults, $sChoiceId, $sChoiceId, $aFlags);
//$oPage->add('
');
}
$sChoiceName = null;
@@ -780,17 +780,19 @@ EOF
$sChoiceId = $sParentId.self::$SEP.$index;
$sDataId = 'data-id="'.utils::EscapeHtml($aChoice['extension_code']).'"';
$sId = utils::EscapeHtml($aChoice['extension_code']);
- if ($sChoiceName == null) {
+ if ($sChoiceName === null) {
$sChoiceName = $sChoiceId; // All radios share the same name
}
$bIsDefault = array_key_exists($sChoiceName, $aDefaults) && ($aDefaults[$sChoiceName] == $sChoiceId);
- $bSelected = isset($aSelectedComponents[$sChoiceName]) && ($aSelectedComponents[$sChoiceName] == $sChoiceId);
+ $bSelected = isset($aSelectedComponents[$sChoiceName]) && ($aSelectedComponents[$sChoiceName] === $sChoiceId);
if (!isset($aSelectedComponents[$sChoiceName]) && ($sChoiceIdNone != null)) {
// No choice selected, select the "None" option
- $bSelected = ($sChoiceId == $sChoiceIdNone);
+ $bSelected = ($sChoiceId === $sChoiceIdNone);
}
$bMandatory = (isset($aChoice['mandatory']) && $aChoice['mandatory']) || ($this->bUpgrade && $bIsDefault);
-
+echo'
$aSelectedComponents = ';
+var_dump($aSelectedComponents);
+echo "Choice name is ".$sChoiceName."
";
if ($bSelected) {
$sAttributes = ' checked ';
}
@@ -800,15 +802,19 @@ EOF
$sHidden = '';
}
//$oPage->add(''.$sHidden.' ');
+
+
+
$aFlags = $this->ComputeChoiceFlags($aChoice, $sChoiceId, $aSelectedComponents, $bAllDisabled, $bDisableUninstallCheck, $this->bUpgrade);
$aFlags['disabled'] = $bDisabled;
+ $aFlags['checked'] = $bSelected;
var_dump($aFlags);
- $this->DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefaults, $sChoiceId, $aFlags, 'radio');
+ $this->DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefaults, $sChoiceName, $sChoiceId, $aFlags, 'radio');
//$oPage->add('
');
}
}
- protected function DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefaults, $sChoiceId, $aFlags, $sInputType = 'checkbox')
+ protected function DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefaults, $sChoiceName, $sChoiceId, $aFlags, $sInputType = 'checkbox')
{
$sMoreInfo = (isset($aChoice['more_info']) && ($aChoice['more_info'] != '')) ? 'More information' : '';
$sDescription = isset($aChoice['description']) ? utils::EscapeHtml($aChoice['description']) : '';
@@ -816,7 +822,7 @@ EOF
$sDataId = 'data-id="'.utils::EscapeHtml($aChoice['extension_code']).'"';
$sDisabled = $aFlags['disabled'] ? ' disabled data-disabled="disabled"' : '';
$sChecked = $aFlags['checked'] ? ' checked ' : '';
- $sHiddenInput = $aFlags['disabled'] && $aFlags['checked'] ? '' : '';
+ $sHiddenInput = $aFlags['disabled'] && $aFlags['checked'] ? '' : '';
$sTooltip = '';
if ($aFlags['missing']) {
@@ -834,15 +840,17 @@ EOF
$sTooltip .= 'cannot be uninstalled';
}
+ //width: 12px;
$sMetadata = '';
- if ($aChoice['version'] && $aChoice['source_label']) {
+ if (isset($aChoice['version']) && isset($aChoice['source_label'])) {
$sMetadata = 'v'.$aChoice['version'].''.$aChoice['source_label'].'';
}
$oPage->add('