New attribute: ImageAttribute

SVN:trunk[4129]
This commit is contained in:
Romain Quetiez
2016-05-24 15:29:44 +00:00
parent 2299d23099
commit 1e719b97d8
20 changed files with 730 additions and 15 deletions

View File

@@ -109,6 +109,20 @@ class WizardHelper
$oObj->Set($sAttCode, $oDocument);
}
}
else if ( $oAttDef->GetEditClass() == 'Image' )
{
if ($bReadUploadedFiles)
{
$oDocument = utils::ReadPostedDocument('attr_'.$sAttCode, 'fcontents');
$oObj->Set($sAttCode, $oDocument);
}
else
{
// Create a new empty document, just for displaying the file name
$oDocument = new ormDocument(null, '', $value);
$oObj->Set($sAttCode, $oDocument);
}
}
else if (($oAttDef->IsExternalKey()) && (!empty($value)) && ($value > 0) )
{
// For external keys: load the target object so that external fields