diff --git a/sources/application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php b/sources/application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php index e9071286e..869d4edd9 100644 --- a/sources/application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php +++ b/sources/application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php @@ -10,6 +10,7 @@ use Combodo\iTop\Application\UI\Base\Component\Input\RichText\RichText; use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock; use Combodo\iTop\Application\UI\Base\UIBlock; use DBObject; +use MetaModel; /** * Class CaseLogEntryForm @@ -103,6 +104,16 @@ class CaseLogEntryForm extends UIContentBlock return $this->sAttCode; } + /** + * @see static::$sAttCode + * @return string + * @throws \Exception + */ + public function GetAttLabel(): string + { + return MetaModel::GetLabel($this->GetObjectClass(), $this->GetAttCode()); + } + /** * @see $sSubmitMode * diff --git a/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig b/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig index 938076eab..715e534a7 100644 --- a/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig +++ b/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig @@ -5,6 +5,7 @@ data-object-class="{{ oUIBlock.GetObjectClass() }}" data-object-id="{{ oUIBlock.GetObjectId() }}" data-attribute-code="{{ oUIBlock.GetAttCode() }}" + data-attribute-label="{{ oUIBlock.GetAttLabel() }}" data-submit-mode="{{ oUIBlock.GetSubmitMode() }}" method="post">