diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index 028ecc6f..17e71749 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -1,5 +1,5 @@ getCMSActions(); $form = new Form($this, 'EditForm', $fields, $actions); $form->addExtraClass('root-form'); - $form->addExtraClass('cms-edit-form'); - // TODO Can't merge $FormAttributes in template at the moment - $form->addExtraClass('cms-content center ss-tabset cms-panel-padded'); + + $form->addExtraClass('cms-edit-form cms-panel-padded center'); + if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); $form->setHTMLID('Form_EditForm'); $form->loadDataFrom($siteConfig); @@ -33,6 +33,7 @@ class CMSSettingsController extends CMSMain { return $form; } + /** * Save the current sites {@link SiteConfig} into the database * diff --git a/templates/Includes/CMSSettingsController_Content.ss b/templates/Includes/CMSSettingsController_Content.ss index 40443e04..cb9fd1b8 100644 --- a/templates/Includes/CMSSettingsController_Content.ss +++ b/templates/Includes/CMSSettingsController_Content.ss @@ -1 +1,33 @@ -$EditForm \ No newline at end of file +
+ +
+
+ <% with EditForm %> +

+ <% with Controller %> + <% include CMSSectionIcon %> + <% include CMSBreadcrumbs %> + <% end_with %> +

+ <% if Fields.hasTabset %> + <% with Fields.fieldByName('Root') %> +
+
    + <% loop Tabs %> + class="$extraClass"<% end_if %>>$Title + <% end_loop %> +
+
+ <% end_with %> + <% end_if %> + <% end_with %> +
+
+ +
+ + $EditForm + +
+ +
\ No newline at end of file diff --git a/templates/Includes/CMSSettingsController_EditForm.ss b/templates/Includes/CMSSettingsController_EditForm.ss new file mode 100644 index 00000000..5c315fb4 --- /dev/null +++ b/templates/Includes/CMSSettingsController_EditForm.ss @@ -0,0 +1,30 @@ +
+ + <% if Message %> +

$Message

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