From 463748b6dac6e0159a64f0445a77632c5bb987f3 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Wed, 17 Oct 2012 14:05:10 +0000 Subject: [PATCH] Properly handle all types of fields when entering values via the state transition "wizard" screen SVN:1.2[2279] --- pages/UI.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/UI.php b/pages/UI.php index 9a5e22bc6..4f689676d 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -1737,13 +1737,13 @@ EOF { $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode); $aErrors[] = Dict::Format('UI:AttemptingToSetASlaveAttribute_Name', $oAttDef->GetLabel()); - } - else - { - $oObj->Set($sAttCode, $paramValue); + unset($aExpectedAttributes[$sAttCode]); } } } + + $oObj->UpdateObjectFromPostedForm('', array_keys($aExpectedAttributes), $sTargetState); + if (count($aErrors) == 0) { if ($oObj->ApplyStimulus($sStimulus)) @@ -1980,13 +1980,13 @@ EOF { $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode); $aErrors[] = Dict::Format('UI:AttemptingToChangeASlaveAttribute_Name', $oAttDef->GetLabel()); + unset($aExpectedAttributes[$sAttCode]); } - else - { - $oObj->Set($sAttCode, $paramValue); } } - } + + $oObj->UpdateObjectFromPostedForm('', array_keys($aExpectedAttributes), $sTargetState); + if (count($aErrors) == 0) { if ($oObj->ApplyStimulus($sStimulus))