function ShowStep() { $wizard =& $this->GetWizard(); $arFeaturesSys = CBXFeatures::GetFeaturesList(); $arFeatureSys = $arFeaturesSys["Holding"]; $isEnabled = $this->TestEnabledFeatures($this->arBXFeaturesPrintable["Holding"]); $this->content .= '<table width="100%" cellspacing="2" cellpadding="0">'; if ($arFeatureSys["TYPE"] != "F") { $this->content .= '<tr><td>'; if ($arFeatureSys["TYPE"] != "D") { $this->content .= '<input type="button" name="test_feature" id="id_test_feature" value="' . GetMessage("IFS_BUTTON_TEST") . '" onclick="EditionChange()">'; } else { $this->content .= '<input type="button" name="test_feature" value="' . ($arFeatureSys["EXPIRED"] ? GetMessage("IFS_DEMO_MESSAGE1") : str_replace("#TIME#", $arFeatureSys["TRY_DAYS_COUNT"], GetMessage("IFS_DEMO_MESSAGE2"))) . '" disabled>'; } $this->content .= '<input type="hidden" name="test_feature_on" id="id_test_feature_on" value="N">'; $this->content .= ' <input type="button" name="buy_feature" value="' . GetMessage("IFS_BUTTON_BUY") . '" onclick="window.open(\'' . GetMessage("IFS_BUTTON_BUY_URL") . '\', \'BUYINFO\')">'; $this->content .= '</td></tr>'; $this->content .= '<tr><td><br></td></tr>'; } $this->content .= '<tr>'; $this->content .= '<td>'; $this->content .= '<input type="checkbox" name="turn_holding_on" id="id_turn_holding_on" value="Y"'; if ($isEnabled) { $this->content .= ' checked'; } $this->content .= ' onclick="TurnOnChange(this.checked)">'; $this->content .= '<label for="id_turn_holding_on"><b>' . GetMessage('IFS_E_Holding') . '</b></label></td>'; $this->content .= '</tr>'; $this->content .= $this->PrintFeatures($this->arBXFeaturesPrintable["Holding"]); $this->content .= '</table>'; $this->content .= ' <script type="text/javascript">'; $arAllFeatures = $this->ExtractFeatures($this->arBXFeaturesPrintable["Holding"]); if ($arFeatureSys["TYPE"] != "D" && $arFeatureSys["TYPE"] != "F" || $arFeatureSys["TYPE"] == "D" && $arFeatureSys["EXPIRED"] || !$isEnabled) { foreach ($arAllFeatures as $f) { $this->content .= 'document.getElementById("id_f_' . $f . '").disabled = true;'; } } if ($arFeatureSys["TYPE"] != "D" && $arFeatureSys["TYPE"] != "F" || $arFeatureSys["TYPE"] == "D" && $arFeatureSys["EXPIRED"]) { $this->content .= 'document.getElementById("id_turn_holding_on").disabled = true;'; } $this->content .= ' function TurnOnChange(val) {'; foreach ($arAllFeatures as $f) { $this->content .= 'document.getElementById("id_f_' . $f . '").disabled = !val;'; if (!in_array($f, array("Analytics", "Controller"))) { $this->content .= 'document.getElementById("id_f_' . $f . '").checked = val;'; } } $this->content .= ' }'; $this->content .= ' function EditionChange() {'; foreach ($arAllFeatures as $f) { $this->content .= 'document.getElementById("id_f_' . $f . '").disabled = false;'; } $this->content .= 'document.getElementById("id_test_feature").disabled = true; document.getElementById("id_test_feature_on").value = "Y"; document.getElementById("id_turn_holding_on").disabled = false; document.getElementById("id_turn_holding_on").value = "Y"; } </script>'; }