From b38c19252593b2fea1ad2597d587741fe48f1c67 Mon Sep 17 00:00:00 2001 From: tof <> Date: Thu, 17 Apr 2008 17:18:25 +0000 Subject: Implemented #745 --- framework/Web/UI/WebControls/TWizard.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls') diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php index e8d6620d..e9c27708 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -1391,8 +1391,23 @@ class TWizard extends TWebControl implements INamingContainer else if(strcasecmp($command,self::CMD_MOVETO)===0) { if($this->_cancelNavigation) // may be set in onSideBarButtonClick - $navParam->setCancelNavigation(true); - $navParam->setNextStepIndex(TPropertyValue::ensureInteger($param->getCommandParameter())); + $navParam->setCancelNavigation(true); + $requestedStep=$param->getCommandParameter(); + if (!is_numeric($requestedStep)) + { + $requestedIndex=-1; + foreach ($this->getWizardSteps() as $index=>$step) + if ($step->getId()===$requestedStep) + { + $requestedIndex=$index; + break; + } + if ($requestedIndex<0) + throw new TConfigurationException('wizard_step_invalid'); + } + else + $requestedIndex=TPropertyValue::ensureInteger($requestedStep); + $navParam->setNextStepIndex($requestedIndex); $handled=true; } -- cgit v1.2.3