mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Using new triangle/step markup in AddForm
This commit is contained in:
parent
f8d1523823
commit
8da0defa27
@ -1062,21 +1062,23 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
$pageTypes[$type->getField('ClassName')] = $html;
|
$pageTypes[$type->getField('ClassName')] = $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
$labelTriangle = '<span class="label-triangle"></span>';
|
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><span class="title">%s</span></span>';
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
// new HiddenField("ParentID", false, ($this->parentRecord) ? $this->parentRecord->ID : null),
|
// new HiddenField("ParentID", false, ($this->parentRecord) ? $this->parentRecord->ID : null),
|
||||||
// TODO Should be part of the form attribute, but not possible in current form API
|
// TODO Should be part of the form attribute, but not possible in current form API
|
||||||
$hintsField = new LiteralField('Hints', sprintf('<span class="hints" data-hints="%s"></span>', $this->SiteTreeHints())),
|
$hintsField = new LiteralField('Hints', sprintf('<span class="hints" data-hints="%s"></span>', $this->SiteTreeHints())),
|
||||||
$label1 = new LabelField("Triangle1", _t('CMSMain.1', '1').$labelTriangle),
|
$parentField = new TreeDropdownField(
|
||||||
$parentField = new TreeDropdownField("ParentID", _t('CMSMain.AddFormParentLabel', 'Choose parent'), 'SiteTree'),
|
"ParentID",
|
||||||
$label2 = new LabelField("Triangle2", _t('CMSMain.2', '2').$labelTriangle),
|
sprintf($numericLabelTmpl, 1, _t('CMSMain.AddFormParentLabel', 'Choose parent')),
|
||||||
new OptionsetField("PageType", _t('CMSMain.ChoosePageType', 'Choose page type'), $pageTypes, 'Page')
|
'SiteTree'
|
||||||
|
),
|
||||||
|
$typeField = new OptionsetField(
|
||||||
|
"PageType",
|
||||||
|
sprintf($numericLabelTmpl, 2, _t('CMSMain.ChoosePageType', 'Choose page type')),
|
||||||
|
$pageTypes,
|
||||||
|
'Page'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$label1->addExtraClass("numeric-label");
|
|
||||||
$label1->setAllowHTML(true);
|
|
||||||
$label2->addExtraClass("numeric-label");
|
|
||||||
$label2->setAllowHTML(true);
|
|
||||||
|
|
||||||
$parentField->setValue(($record) ? $record->ID : null);
|
$parentField->setValue(($record) ? $record->ID : null);
|
||||||
|
|
||||||
$actions = new FieldList(
|
$actions = new FieldList(
|
||||||
|
Loading…
Reference in New Issue
Block a user