- Improved (more interactive) validation of the forms.

SVN:trunk[460]
This commit is contained in:
Denis Flaven
2010-06-14 09:10:54 +00:00
parent f29217379e
commit 23c19c599e
9 changed files with 212 additions and 102 deletions

View File

@@ -39,12 +39,19 @@ class WizardHelper
*/
public function GetTargetObject($bReadUploadedFiles = false)
{
$oObj = MetaModel::NewObject($this->m_aData['m_sClass']);
if (isset($this->m_aData['m_oCurrentValues']['id']))
{
$oObj = MetaModel::GetObject($this->m_aData['m_sClass'], $this->m_aData['m_oCurrentValues']['id']);
}
else
{
$oObj = MetaModel::NewObject($this->m_aData['m_sClass']);
}
foreach($this->m_aData['m_oCurrentValues'] as $sAttCode => $value)
{
// Because this is stored in a Javascript array, unused indexes
// are filled with null values
if ( ($sAttCode !== false) && ($value !== null))
if ( ($sAttCode !='id') && ($sAttCode !== false) && ($value !== null))
{
$oAttDef = MetaModel::GetAttributeDef($this->m_aData['m_sClass'], $sAttCode);
if (($oAttDef->IsLinkSet()) && ($value != '') )