N°2313 - Markup extensibility: Add field label in its metadata

This commit is contained in:
Molkobain
2020-01-20 14:43:40 +01:00
parent 6aff09eaf7
commit 2fcea4d02e
3 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2019 Combodo SARL
* Copyright (C) 2013-2020 Combodo SARL
*
* This file is part of iTop.
*
@@ -1028,7 +1028,8 @@ abstract class AttributeDefinition
// Metadata
$oFormField->AddMetadata('attribute-code', $this->GetCode());
$oFormField->AddMetadata('attribute-type', get_class($this));
if($this::IsScalar())
$oFormField->AddMetadata('attribute-label', $this->GetLabel());
if ($this::IsScalar())
{
$oFormField->AddMetadata('value-raw', $oObject->Get($this->GetCode()));
}