CheckDependencies()) { return true; } else { return false; } } public function UpdateWizardStateAndGetNextStep($bMoveForward = true): WizardState { return new WizardState(WizStepSummary::class); } public function CanComeBack() { return false; } public function Display(WebPage $oPage) { $aInstallParams = $this->BuildConfig(); $this->AddProgressBar($oPage, 'Progress of the verification'); $sJSONData = json_encode($aInstallParams); $oPage->add(''); $sAuthentToken = $this->oWizard->GetParameter('authent', ''); $oPage->add(''); if (!$this->CheckDependencies()) { $oPage->error($this->sDependencyIssue); $oPage->add_ready_script(<<add_ready_script(<<oWizard->GetParameter('removed_extensions', "[]"), true); $aHiddenRemovedExtensionInputs = ""; if (!is_array($aRemovedExtensions)) { IssueLog::Warning('Posted removed_extensions is not an array'); $aRemovedExtensions = []; } foreach ($aRemovedExtensions as $sExtCode => $sExtLabel) { $sSafeExtCode = utils::HtmlEntities($sExtCode); $aHiddenRemovedExtensionInputs .= << INPUT; } $oPage->add( << $aHiddenRemovedExtensionInputs HTML ); } protected function AddProgressErrorScript($oPage, $aRes) { if (isset($aRes['error_code']) && $aRes['error_code'] === DataAuditSequencer::DATA_AUDIT_FAILED) { $oPage->add_ready_script( <<'); $('.ibo-setup--wizard--buttons-container tr td:nth-child(2)').after(' '); $('#goto-data-feature-removal').on("click", function() { $('#goto-data-feature-removal').prop('disabled', true); $('#submit-wait').removeClass("ibo-is-hidden"); $('#data-feature-removal').submit(); }) $("#wiz_form").data("installation_status", "cleanup_needed"); $('#btn_next').hide(); EOF ); } } public function JSCanMoveForward() { return 'return ["completed", "cleanup_needed"].indexOf($("#wiz_form").data("installation_status")) !== -1;'; } public function JSCanMoveBackward() { return 'return ["not started", "error", "cleanup_needed"].indexOf($("#wiz_form").data("installation_status")) !== -1;'; } }