-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX Update CMS fields now that they're being scaffolded #95
FIX Update CMS fields now that they're being scaffolded #95
Conversation
$fields->dataFieldByName('BottomContent')?->addExtraClass('stacked'); | ||
$fields->dataFieldByName('AlternateContent')?->addExtraClass('stacked'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally made these wider, because it was silly how much space was being wasted
$contentField = $fields->dataFieldByName('Content'); | ||
if ($contentField) { | ||
$fields->removeByName('Content'); | ||
$contentField->setTitle(_t(__CLASS__ . '.db_Content', 'Content (appears above iframe)')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fieldLabel()
only takes the class where the field is defined into account, not the class where it's being called from, so we can't just rely on $this->fieldLabel('Content')
here like we normally would.
23f0069
to
9413093
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See silverstripe/silverstripe-cms#2983 (comment) about translation strings.
Relies on changes to
SiteTree
in silverstripe/silverstripe-cms#2983Issue