diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index c17dfa32..d2d130b4 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -235,10 +235,9 @@ JS )); $fields->setForm($form); - $form->addExtraClass('cms-edit-form'); $form->setTemplate($this->getTemplatesWithSuffix('_EditForm')); // TODO Can't merge $FormAttributes in template at the moment - $form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses()); + $form->addExtraClass('cms-edit-form cms-panel-padded center ' . $this->BaseCSSClasses()); $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); $this->extend('updateEditForm', $form); diff --git a/code/controllers/CMSFileAddController.php b/code/controllers/CMSFileAddController.php index 4d94051e..aa1a84cd 100644 --- a/code/controllers/CMSFileAddController.php +++ b/code/controllers/CMSFileAddController.php @@ -16,6 +16,11 @@ class CMSFileAddController extends AssetAdmin { // } // } + public function Content() { + // Disable AssetAdmin layout including the search panel + return $this->renderWith('LeftAndMain_Content'); + } + /** * @return Form * @todo what template is used here? AssetAdmin_UploadContent.ss doesn't seem to be used anymore @@ -45,7 +50,8 @@ class CMSFileAddController extends AssetAdmin { new FieldList() ); $form->addExtraClass('center cms-edit-form ' . $this->BaseCSSClasses()); - $form->setTemplate($this->getTemplatesWithSuffix('_EditForm')); + // Don't use AssetAdmin_EditForm, as it assumes a different panel structure + $form->setTemplate('LeftAndMain_EditForm'); $form->Fields()->push( new LiteralField( 'BackLink', @@ -61,6 +67,9 @@ class CMSFileAddController extends AssetAdmin { return $form; } + /** + * Disable AssetAdmin search panel + */ function Tools() { return false; } diff --git a/templates/Includes/AssetAdmin_Content.ss b/templates/Includes/AssetAdmin_Content.ss new file mode 100644 index 00000000..2f70a036 --- /dev/null +++ b/templates/Includes/AssetAdmin_Content.ss @@ -0,0 +1,41 @@ +