SiteConfig updated to modeladmin style and fixed ajax switching

This commit is contained in:
Arno Poot 2013-08-24 12:33:38 +02:00
parent f937b95eaf
commit 920da0d120
3 changed files with 33 additions and 29 deletions

View File

@ -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');

View File

@ -1,4 +1,4 @@
<div id="settings-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content CurrentForm">
<div id="settings-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content" data-ignore-tab-state="true">
<div class="cms-content-header north">
<% with $EditForm %>
@ -7,9 +7,10 @@
<% include CMSBreadcrumbs %>
<% end_with %>
</div>
<% if $Fields.hasTabset %>
<% with $Fields.fieldByName('Root') %>
<div class="cms-content-header-tabs">
<div class="cms-content-header-tabs cms-tabset-nav-primary ss-ui-tabs-nav">
<ul class="cms-tabset-nav-primary">
<% loop $Tabs %>
<li<% if $extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
@ -27,4 +28,4 @@
</div>
</div>
</div>

View File

@ -1,29 +1,33 @@
<form $FormAttributes>
<form $FormAttributes data-layout-type="border">
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
<% else %>
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
<% end_if %>
<div class="cms-content-fields center">
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
<% else %>
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
<% end_if %>
<fieldset>
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
<fieldset>
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
</div>
<% if $Actions %>
<div class="Actions">
<% loop $Actions %>
$Field
<% end_loop %>
<% if $Controller.LinkPreview %>
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
<% _t('LeftAndMain.PreviewButton', 'Preview') %> &raquo;
</a>
<div class="cms-content-actions cms-content-controls south">
<% if $Actions %>
<div class="Actions">
<% loop $Actions %>
$Field
<% end_loop %>
<% if $Controller.LinkPreview %>
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
<% _t('LeftAndMain.PreviewButton', 'Preview') %> &raquo;
</a>
<% end_if %>
</div>
<% end_if %>
</div>
<% end_if %>
</form>
</form>