mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Fix some bugs in the handling of creation/modification forms (Trac #131)
SVN:trunk[468]
This commit is contained in:
@@ -920,9 +920,8 @@ try
|
||||
else
|
||||
{
|
||||
$oObj = MetaModel::NewObject($sClass);
|
||||
foreach(MetaModel::GetZListItems($sClass, 'details') as $sAttCode)
|
||||
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
|
||||
{
|
||||
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
|
||||
if ($oAttDef->IsLinkSet())
|
||||
{
|
||||
// Link set, the data is a set of link objects, encoded in JSON
|
||||
|
||||
@@ -121,7 +121,8 @@ switch($operation)
|
||||
$displayValue = $oObj->GetEditValue($sAttCode);
|
||||
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
|
||||
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $value, $displayValue, $sId, '', 0, array('this' => $oObj));
|
||||
|
||||
// Make sure that we immediatly validate the field when we reload it
|
||||
$oPage->add_ready_script("$('#$sId').trigger('validate');");
|
||||
$oWizardHelper->SetAllowedValuesHtml($sAttCode, $sHTMLValue);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user