summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/WebControls/TWizard.php19
1 files changed, 17 insertions, 2 deletions
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;
}