From afd9f282790ae426eb8c841d43e7485d4e1dc7d1 Mon Sep 17 00:00:00 2001 From: Arno Poot Date: Fri, 26 Jul 2013 17:45:28 +0200 Subject: [PATCH] Updated siteconfig layout to be more like modeladmin --- code/controllers/CMSSettingsController.php | 3 +- .../Includes/CMSSettingsController_Content.ss | 7 +-- .../CMSSettingsController_EditForm.ss | 52 ++++++++++--------- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index 8b2404db..986157c2 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -41,8 +41,7 @@ class CMSSettingsController extends LeftAndMain { $this, 'EditForm', $fields, $actions )->setHTMLID('Form_EditForm'); $form->setResponseNegotiator($this->getResponseNegotiator()); - $form->addExtraClass('root-form'); - $form->addExtraClass('cms-edit-form cms-panel-padded center'); + $form->addExtraClass('cms-add-form 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'); diff --git a/templates/Includes/CMSSettingsController_Content.ss b/templates/Includes/CMSSettingsController_Content.ss index 900872c0..c10e458e 100644 --- a/templates/Includes/CMSSettingsController_Content.ss +++ b/templates/Includes/CMSSettingsController_Content.ss @@ -1,4 +1,4 @@ -
+
<% with $EditForm %> @@ -7,9 +7,10 @@ <% include CMSBreadcrumbs %> <% end_with %>
+ <% if $Fields.hasTabset %> <% with $Fields.fieldByName('Root') %> -
+
    <% loop $Tabs %> class="$extraClass"<% end_if %>>$Title @@ -27,4 +28,4 @@
-
+
\ No newline at end of file diff --git a/templates/Includes/CMSSettingsController_EditForm.ss b/templates/Includes/CMSSettingsController_EditForm.ss index b7f5f3ca..6ffc7fc9 100644 --- a/templates/Includes/CMSSettingsController_EditForm.ss +++ b/templates/Includes/CMSSettingsController_EditForm.ss @@ -1,29 +1,33 @@ -
+ - <% 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') %> » - +
+ <% if $Actions %> +
+ <% loop $Actions %> + $Field + <% end_loop %> + <% if $Controller.LinkPreview %> + + <% _t('LeftAndMain.PreviewButton', 'Preview') %> » + + <% end_if %> +
<% end_if %>
- <% end_if %> - + \ No newline at end of file