From 26bca388e885cf8336fe531f1efc7bfa231da400 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 20 Aug 2013 15:20:44 +0200 Subject: [PATCH] Revert "Updated siteconfig layout to be more like modeladmin" This reverts commit afd9f282790ae426eb8c841d43e7485d4e1dc7d1. See https://github.com/silverstripe/silverstripe-cms/issues/830 --- code/controllers/CMSSettingsController.php | 3 +- .../Includes/CMSSettingsController_Content.ss | 7 ++- .../CMSSettingsController_EditForm.ss | 52 +++++++++---------- 3 files changed, 29 insertions(+), 33 deletions(-) diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index 986157c2..8b2404db 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -41,7 +41,8 @@ class CMSSettingsController extends LeftAndMain { $this, 'EditForm', $fields, $actions )->setHTMLID('Form_EditForm'); $form->setResponseNegotiator($this->getResponseNegotiator()); - $form->addExtraClass('cms-add-form cms-content center cms-edit-form'); + $form->addExtraClass('root-form'); + $form->addExtraClass('cms-edit-form cms-panel-padded center'); // don't add data-pjax-fragment=CurrentForm, its added in the content template instead if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); diff --git a/templates/Includes/CMSSettingsController_Content.ss b/templates/Includes/CMSSettingsController_Content.ss index c10e458e..900872c0 100644 --- a/templates/Includes/CMSSettingsController_Content.ss +++ b/templates/Includes/CMSSettingsController_Content.ss @@ -1,4 +1,4 @@ -
+
<% with $EditForm %> @@ -7,10 +7,9 @@ <% include CMSBreadcrumbs %> <% end_with %>
- <% if $Fields.hasTabset %> <% with $Fields.fieldByName('Root') %> -
+
    <% loop $Tabs %> class="$extraClass"<% end_if %>>$Title @@ -28,4 +27,4 @@
-
\ No newline at end of file +
diff --git a/templates/Includes/CMSSettingsController_EditForm.ss b/templates/Includes/CMSSettingsController_EditForm.ss index 6ffc7fc9..b7f5f3ca 100644 --- a/templates/Includes/CMSSettingsController_EditForm.ss +++ b/templates/Includes/CMSSettingsController_EditForm.ss @@ -1,33 +1,29 @@ -
+ -
- <% if $Message %> -

$Message

- <% else %> - - <% end_if %> + <% if $Message %> +

$Message

+ <% else %> + + <% end_if %> -
- <% if $Legend %>$Legend<% end_if %> - <% loop $Fields %> - $FieldHolder - <% end_loop %> -
-
-
+
+ <% if $Legend %>$Legend<% end_if %> + <% loop $Fields %> + $FieldHolder + <% end_loop %> +
+
-
- <% if $Actions %> -
- <% loop $Actions %> - $Field - <% end_loop %> - <% if $Controller.LinkPreview %> - - <% _t('LeftAndMain.PreviewButton', 'Preview') %> » - - <% end_if %> -
+ <% if $Actions %> +
+ <% loop $Actions %> + $Field + <% end_loop %> + <% if $Controller.LinkPreview %> + + <% _t('LeftAndMain.PreviewButton', 'Preview') %> » + <% end_if %>
- \ No newline at end of file + <% end_if %> +