• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/wizard_site_steps.php
  • Класс: CPackageSelectService
  • Вызов: CPackageSelectService::ShowStep
function ShowStep()
{
	$package = $this->package;
	$wizard = $this->GetWizard();

	$arServices = $package->GetServices(Array("SITE_ID" => $package->siteID));

	$i = 0;

	$this->ShowCheckboxField("__serviceID[]", null);
	$this->content .= $this->ShowHiddenField("__serviceID", "");

	$this->content .= '';

	foreach ($arServices as $serviceID => $arService)
	{
		$type = "checkbox";
		$group = "";

		if (array_key_exists("FORM", $arService) && is_array($arService["FORM"]))
		{
			if (array_key_exists("TYPE", $arService["FORM"]))
				$type = mb_strtolower($arService["FORM"]["TYPE"]);

			if (array_key_exists("GROUP", $arService["FORM"]))
				$group = mb_strtolower(preg_replace("~[^a-zA-Z0-9_]~i", "", $arService["FORM"]["GROUP"]));

			if (array_key_exists("DEFAULT", $arService["FORM"]) && $type != "required")
			{
				if ($group == "")
					$wizard->SetDefaultVar("__serviceID[".$i++."]", $serviceID);
				else
					$wizard->SetDefaultVar("__serviceID[".$group."][".$i++."]", $serviceID);
			}
		}

		if ($type == "radio")
		{
			$this->content .= '';
			$this->content .= '';

			$this->content .= '';

			$this->content .= '';

			$this->content .= '';
		}
		elseif ($type == "required")
		{
			$this->content .= '';
			$this->content .= '';

			$this->content .= '';

			$this->content .= '';

			$this->content .= '';
		}
		else
		{
			$this->content .= '';

			$this->content .= '';

			$this->content .= '';

			$this->content .= '';

			$this->content .= '';
		}
	}

	$this->content .= '
'.$this->ShowRadioField("__serviceID[".$group."]", $serviceID, Array("id" => $serviceID)).''; if (isset($arService["ICON"]) && $arService["ICON"] <> '') $this->content .= ''; $this->content .= ''; $this->content .= '
'; if (isset($arService["DESCRIPTION"]) && $arService["DESCRIPTION"] <> '') $this->content .= '
'; $this->content .= '
'; if (isset($arService["ICON"]) && $arService["ICON"] <> '') $this->content .= ''; $this->content .= ''; $this->content .= " ".$arService["NAME"].'
'; if (isset($arService["DESCRIPTION"]) && $arService["DESCRIPTION"] <> '') $this->content .= '
'.$arService["DESCRIPTION"].'
'; $this->content .= $this->ShowHiddenField("__serviceID[]", $serviceID); $this->content .= '
'.$this->ShowCheckboxField("__serviceID[]", $serviceID, Array("id" => $serviceID)).''; if (isset($arService["ICON"]) && $arService["ICON"] <> '') $this->content .= ''; $this->content .= ''; $this->content .= '
'; if (isset($arService["DESCRIPTION"]) && $arService["DESCRIPTION"] <> '') $this->content .= '
'; $this->content .= '
'; }