mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX Blog profile summary field is always inserted before the profile image field
This commit is contained in:
parent
17ed46cddd
commit
233a5e6397
@ -7,6 +7,7 @@ use SilverStripe\Blog\Forms\GridField\GridFieldConfigBlogPost;
|
|||||||
use SilverStripe\Forms\FieldList;
|
use SilverStripe\Forms\FieldList;
|
||||||
use SilverStripe\Forms\GridField\GridField;
|
use SilverStripe\Forms\GridField\GridField;
|
||||||
use SilverStripe\Forms\Tab;
|
use SilverStripe\Forms\Tab;
|
||||||
|
use SilverStripe\Forms\TextareaField;
|
||||||
use SilverStripe\ORM\DataExtension;
|
use SilverStripe\ORM\DataExtension;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
use SilverStripe\View\Parsers\URLSegmentFilter;
|
use SilverStripe\View\Parsers\URLSegmentFilter;
|
||||||
@ -107,7 +108,6 @@ class BlogMemberExtension extends DataExtension
|
|||||||
$fields->removeByName('URLSegment');
|
$fields->removeByName('URLSegment');
|
||||||
|
|
||||||
// Remove the automatically-generated posts tab.
|
// Remove the automatically-generated posts tab.
|
||||||
|
|
||||||
$fields->removeFieldFromTab('Root', 'BlogPosts');
|
$fields->removeFieldFromTab('Root', 'BlogPosts');
|
||||||
|
|
||||||
// Construct a better posts tab.
|
// Construct a better posts tab.
|
||||||
@ -127,6 +127,13 @@ class BlogMemberExtension extends DataExtension
|
|||||||
|
|
||||||
$fields->addFieldToTab('Root', $tab);
|
$fields->addFieldToTab('Root', $tab);
|
||||||
|
|
||||||
|
// Ensure blog fields are added after defaults
|
||||||
|
$fields->addFieldToTab(
|
||||||
|
'Root.Main',
|
||||||
|
TextareaField::create('BlogProfileSummary'),
|
||||||
|
'BlogProfileImage'
|
||||||
|
);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user