From 3e9d0d8ca73aa27156c7a183f0e9e819eec7dcaf Mon Sep 17 00:00:00 2001 From: Garvin Hicking <gh@faktor-e.de> Date: Wed, 23 Aug 2023 08:54:33 +0200 Subject: [PATCH] [BUGFIX] Render fieldControl in UuidElement The 'uuid' FormEngine TCA element misses the call to render registered field controls. Add it and merge it into rendered HTML. Resolves: #101740 Related: #101703 Related: #100171 Releases: main, 12.4 Change-Id: I18983883d2ae4460929a40aa3ccee1a7c261ab63 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80656 Tested-by: core-ci <typo3@b13.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../backend/Classes/Form/Element/UuidElement.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/typo3/sysext/backend/Classes/Form/Element/UuidElement.php b/typo3/sysext/backend/Classes/Form/Element/UuidElement.php index 390f39f9d753..33e50b718721 100644 --- a/typo3/sysext/backend/Classes/Form/Element/UuidElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/UuidElement.php @@ -104,6 +104,10 @@ class UuidElement extends AbstractFormElement $resultArray['javaScriptModules'][] = JavaScriptModuleInstruction::create('@typo3/backend/copy-to-clipboard.js'); } + $fieldControlResult = $this->renderFieldControl(); + $fieldControlHtml = $fieldControlResult['html']; + $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $fieldControlResult, false); + $html = []; $html[] = $this->renderLabel($fieldId); $html[] = '<div class="formengine-field-item t3js-formengine-field-item">'; @@ -113,6 +117,15 @@ class UuidElement extends AbstractFormElement $html[] = '<div class="form-wizards-element">'; $html[] = $uuidElement; $html[] = '</div>'; + + if (!empty($fieldControlHtml)) { + $html[] = '<div class="form-wizards-items-aside form-wizards-items-aside--field-control">'; + $html[] = '<div class="btn-group">'; + $html[] = $fieldControlHtml; + $html[] = '</div>'; + $html[] = '</div>'; + } + $html[] = '</div>'; $html[] = '</div>'; $html[] = '</div>'; -- GitLab