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

	if ($wizard->IsNextButtonClick())
	{
		$siteID = $package->siteID;

		if ($siteID != "" && array_key_exists($siteID, $package->arSites))
		{
			if ($package->_InitSubStep("select", $package->arSites[$siteID], false))
			{
				$wizard->SetCurrentStep($package->__obFirstStep->GetStepID());
				$package->__obFirstStep->SetPrevStep(BX_WIZARD_SELECT_SITE_ID);
			}
			else
			{
				if ($package->groupExists && $package->templateExists)
					$wizard->SetCurrentStep(BX_WIZARD_SELECT_GROUP_ID);
				elseif ($package->templateExists)
					$wizard->SetCurrentStep(BX_WIZARD_SELECT_TEMPLATE_ID);
				elseif ($package->serviceExists)
					$wizard->SetCurrentStep(BX_WIZARD_SELECT_SERVICE_ID);
				elseif ($package->structureExists)
					$wizard->SetCurrentStep(BX_WIZARD_SELECT_STRUCTURE_ID);
				else
					$wizard->SetCurrentStep(BX_WIZARD_START_INSTALL_ID);
			}
		}
		else
			$this->SetError(GetMessage("MAIN_WIZARD_ERROR_WRONG_SITE"), "__siteID");
	}
}