From 0ee82093091edb67d10c1285eaa12a51a0a805a0 Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 7 Oct 2024 15:32:28 +1300 Subject: [PATCH] update form positioning --- src/Extensions/SeoAIExtension.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Extensions/SeoAIExtension.php b/src/Extensions/SeoAIExtension.php index 6b9ce1f..26b1462 100644 --- a/src/Extensions/SeoAIExtension.php +++ b/src/Extensions/SeoAIExtension.php @@ -4,12 +4,16 @@ use SilverStripe\Forms\FieldList; use SilverStripe\ORM\DataExtension; +use SilverStripe\Forms\CompositeField; use LeKoala\CmsActions\CmsInlineFormAction; class SeoAIExtension extends DataExtension { public function updateCMSFields(FieldList $fields) { - $fields->addFieldToTab('Root.Main', CmsInlineFormAction::create('generateTags', 'Generate SEO Tags')); + $fields->insertAfter('SocialImage', CompositeField::create( + CmsInlineFormAction::create('generateTags', 'Generate SEO Tags') + )->setDescription('Generate SEO tags using AI (this may take several seconds)') + ); } } \ No newline at end of file