summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TWizard.php
diff options
context:
space:
mode:
authortof <>2008-04-17 17:18:25 +0000
committertof <>2008-04-17 17:18:25 +0000
commitb38c19252593b2fea1ad2597d587741fe48f1c67 (patch)
treec8d01a58a2404f432882472c79ffb73485eb5220 /framework/Web/UI/WebControls/TWizard.php
parent91dd9ff8da6a2f8260d184da167e9ed6b45a6b02 (diff)
Implemented #745
Diffstat (limited to 'framework/Web/UI/WebControls/TWizard.php')
-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;
}