I'm trying to add an additional field to the UploadField assets Edit section from SS3.0. The fields I've added are shown in the assets editor /site/admin/assets/EditForm/field/File/item/16/edit but they are not shown in the inline / iframe form of an UploadField /site/admin/pages/edit/EditForm/field/hibImages/item/16/edit.
Anyone any suggestions on what I'm missing?
Class:
class hibImage extends DataExtension {
static $belongs_many_many = array (
'HeaderImageBanners' => 'HeaderImageBanner'
);
function hibCroppedImage() {
return $this->owner->croppedImage(HeaderImageBanner::$hibWidth, HeaderImageBanner::$hibHeight);
}
function random() {
return rand();
}
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->push(new LiteralField("Literal", "<p>Test getCMSFields</p>"));
return $fields;
}
// Shown
public function updateFormFields(FieldList $fields) {
$fields->push(new LiteralField("Literal", "<p>Test updateFormFields</p>"));
return $fields;
}
public function updateCMSFields(FieldList $fields) {
$fields->push(new LiteralField("Literal", "<p>Test updateCMSFields</p>"));
return $fields;
}
public function updateFrontEndFields(FieldList $fields) {
$fields->push(new LiteralField("Literal", "<p>Test updateFrontEndFields</p>"));
return $fields;
}
}
Which is added to the mysite/_config.php with:
Object::add_extension('Image', 'hibImage');