From 920da0d1202ec403c193a0b282f5379bc415c287 Mon Sep 17 00:00:00 2001 From: Arno Poot Date: Sat, 24 Aug 2013 12:33:38 +0200 Subject: [PATCH] SiteConfig updated to modeladmin style and fixed ajax switching --- 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..a86ad860 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-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..4b666cf2 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