Skip to content

Commit

Permalink
MINOR Misc styling fixes around dialogs and "add page" styling
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Jan 3, 2012
1 parent 7a1e25b commit e35991b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/controllers/CMSMain.php
Expand Up @@ -1096,7 +1096,7 @@ function AddForm() {
$this->extend('updatePageOptions', $fields);

$form = new Form($this, "AddForm", $fields, $actions);
$form->addExtraClass('cms-add-form');
$form->addExtraClass('cms-add-form stacked');

return $form;
}
Expand Down
4 changes: 4 additions & 0 deletions code/forms/SiteTreeURLSegmentField.php
Expand Up @@ -39,4 +39,8 @@ function getPage() {
$idField = $this->getForm()->dataFieldByName('ID');
return ($idField && $idField->Value()) ? DataObject::get_by_id('SiteTree', $idField->Value()) : singleton('SiteTree');
}

function Type() {
return 'text sitetreeurlsegment';
}
}
3 changes: 2 additions & 1 deletion code/model/SiteTree.php
Expand Up @@ -1822,7 +1822,7 @@ function getCMSFields() {
$tabMain = new Tab('Main',
new TextField("Title", $this->fieldLabel('Title')),
new TextField("MenuTitle", $this->fieldLabel('MenuTitle')),
new HtmlEditorField("Content", _t('SiteTree.HTMLEDITORTITLE', "Content", PR_MEDIUM, 'HTML editor title'))
$htmlField = new HtmlEditorField("Content", _t('SiteTree.HTMLEDITORTITLE', "Content", PR_MEDIUM, 'HTML editor title'))
),
$tabMeta = new Tab('Metadata',
new SiteTreeURLSegmentField("URLSegment", $this->fieldLabel('URLSegment') . $urlHelper),
Expand All @@ -1841,6 +1841,7 @@ function getCMSFields() {
)
)
);
$htmlField->addExtraClass('stacked');

// Conditional dependent pages tab
if($dependentPagesCount) $tabDependent->setTitle(_t('SiteTree.TABDEPENDENT', "Dependent pages") . " ($dependentPagesCount)");
Expand Down
2 changes: 1 addition & 1 deletion templates/Includes/CMSPagesController_Content.ss
Expand Up @@ -40,7 +40,7 @@
$SiteTreeAsUL
</div>

<div class="ss-dialog cms-page-add-form-dialog" id="cms-page-add-form" title="<% _t('CMSMain.AddNew', 'Add new page') %>">
<div class="ss-dialog cms-page-add-form-dialog cms-dialog-content" id="cms-page-add-form" title="<% _t('CMSMain.AddNew', 'Add new page') %>">
$AddForm
</div>

Expand Down

0 comments on commit e35991b

Please sign in to comment.