> " button * @return string The label for the button */ public function GetNextButtonLabel() { return 'Continue'; } public function CanMoveForward() { if ($this->CheckDependencies()) { return true; } else { return false; } } public function UpdateWizardStateAndGetNextStep($bMoveForward = true): WizardState { return new WizardState(WizStepDone::class); } protected function AddProgressBar(WebPage $oPage) { $oPage->add('
Progress of the installation'); $oPage->add('
'); $oPage->LinkScriptFromAppRoot('setup/jquery.progression.js'); $oPage->add('

Ready to start...

0%
'); $oPage->add('
'); // progress_content $oPage->add('
'); $oPage->add("
"); } public function Display(WebPage $oPage) { $aInstallParams = $this->BuildConfig(); $this->AddProgressBar($oPage); $sJSONData = json_encode($aInstallParams); $oPage->add(''); $sAuthentToken = $this->oWizard->GetParameter('authent', ''); $oPage->add(''); if (!$this->CheckDependencies()) { $oPage->error($this->sDependencyIssue); } $oPage->add_ready_script( <<LoadFromHash(json_decode($sJSONParameters, true /* bAssoc */)); $oInstaller = new (static::SequencerClass)($oParameters); $aRes = $oInstaller->ExecuteStep($sStep); if (($aRes['status'] != $oInstaller::ERROR) && ($aRes['next-step'] != '')) { // Tell the web page to move the progress bar and to launch the next step $sMessage = addslashes(utils::EscapeHtml($aRes['next-step-label'])); $oPage->add_ready_script( <<{$aRes['next-step-label']}'); ExecuteStep('{$aRes['next-step']}'); EOF ); } elseif ($aRes['status'] != $oInstaller::ERROR) { // Installation complete, move to the next step of the wizard $oPage->add_ready_script( <<', $sMessage); $oPage->add_ready_script( <<AddProgressErrorScript($oPage, $aRes); } } protected function AddProgressErrorScript($oPage, $aRes) { } /** * Tells whether the "Next" button should be enabled interactively * @return string A piece of javascript code returning either true or false */ public function JSCanMoveForward() { return 'return $("#wiz_form").data("installation_status") === "completed";'; } /** * Tells whether the "Next" button should be enabled interactively * @return string A piece of javascript code returning either true or false */ public function JSCanMoveBackward() { return 'var sStatus = $("#wiz_form").data("installation_status"); return ((sStatus === "not started") || (sStatus === "error"));'; } }