diff --git a/_config.php b/_config.php index 8dcb80d8..24634c9a 100644 --- a/_config.php +++ b/_config.php @@ -22,3 +22,5 @@ CMSMenu::remove_menu_item('CMSPageHistoryController'); CMSMenu::remove_menu_item('CMSPageReportsController'); CMSMenu::remove_menu_item('CMSPageAddController'); CMSMenu::remove_menu_item('CMSFileAddController'); + +CMSMenu::remove_menu_item("SiteConfigLeftAndMain"); \ No newline at end of file diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index a39b402f..49179b08 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -1,110 +1,10 @@ setCallback('CurrentForm', function() use(&$controller) { - return $controller->renderWith($controller->getTemplatesWithSuffix('_Content')); - }); - return $neg; - } - - /** - * @param null $id Not used. - * @param null $fields Not used. - * @return Form - */ - public function getEditForm($id = null, $fields = null) { - $siteConfig = SiteConfig::current_site_config(); - $fields = $siteConfig->getCMSFields(); - - // Tell the CMS what URL the preview should show - $fields->push(new HiddenField('PreviewURL', 'Preview URL', RootURLController::get_homepage_link())); - // Added in-line to the form, but plucked into different view by LeftAndMain.Preview.js upon load - $fields->push($navField = new LiteralField('SilverStripeNavigator', $this->getSilverStripeNavigator())); - $navField->setAllowHTML(true); - - $actions = $siteConfig->getCMSActions(); - $form = CMSForm::create( - $this, 'EditForm', $fields, $actions - )->setHTMLID('Form_EditForm'); - $form->setResponseNegotiator($this->getResponseNegotiator()); - $form->addExtraClass('cms-content center cms-edit-form'); - // don't add data-pjax-fragment=CurrentForm, its added in the content template instead - - if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); - $form->setHTMLID('Form_EditForm'); - $form->loadDataFrom($siteConfig); - $form->setTemplate($this->getTemplatesWithSuffix('_EditForm')); - - // Use