Permalink
Browse files

BUGFIX: Return a RootForm for AssetAdmin so Form get the correct Fiel…

…ds on POST

Solves issues with GridField and uploading on the root folder (/assets/)
  • Loading branch information...
1 parent d4e5e23 commit 1f190eb6989a2ab3b82d01908c26984b8101b80c @stojg stojg committed Jan 10, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 code/controllers/AssetAdmin.php
View
9 code/controllers/AssetAdmin.php
@@ -86,6 +86,15 @@ function init() {
}
/**
+ * 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.
*/
function uploadiframe() {

0 comments on commit 1f190eb

Please sign in to comment.