From 92e0f101d7cfb6e46de8aa48ed401405fee2ffe4 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 2 Sep 2020 17:58:04 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B03260=20-=20Fix=20rendering=20of=20an=20E?= =?UTF-8?q?xternalField=20on=20a=20Text=20with=20XML=20content=20(format?= =?UTF-8?q?=20transitivity)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/attributedef.class.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 90e6b4caa..d7cfbf370 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -18,6 +18,7 @@ */ use Combodo\iTop\Form\Field\LabelField; +use Combodo\iTop\Form\Field\TextAreaField; use Combodo\iTop\Form\Validator\NotEmptyExtKeyValidator; use Combodo\iTop\Form\Validator\Validator; @@ -7449,6 +7450,12 @@ class AttributeExternalField extends AttributeDefinition } } parent::MakeFormField($oObject, $oFormField); + if ($oFormField instanceof TextAreaField) { + if (method_exists($oRemoteAttDef, 'GetFormat')) { + /** @var \Combodo\iTop\Form\Field\TextAreaField $oFormField */ + $oFormField->SetFormat($oRemoteAttDef->GetFormat()); + } + } // Manually setting for remote ExternalKey, otherwise, the id would be displayed. if ($oRemoteAttDef instanceof AttributeExternalKey)