BUGFIX: Return a RootForm for AssetAdmin so Form get the correct Fields on POST

Solves issues with GridField and uploading on the root folder (/assets/)
This commit is contained in:
Stig Lindqvist 2012-01-10 14:01:25 +13:00
parent d4e5e23e42
commit 1f190eb698

View File

@ -85,6 +85,15 @@ JS
CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder'); CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder');
} }
/**
* Return the root 'asset' folder CMSFields
*
* @return FieldList
*/
public function RootForm() {
return $this->getEditForm(singleton('Folder'));
}
/** /**
* Show the content of the upload iframe. The form is specified by a template. * Show the content of the upload iframe. The form is specified by a template.
*/ */