mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Don't add ss-tabset class to GridFieldDetailForms without tabs, as this causes the first <ul> within the form to have tabs applied
This commit is contained in:
parent
00b6bc86e2
commit
aa52dae464
@ -327,9 +327,12 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
|
|||||||
// regardless of overloaded CMS controller templates.
|
// regardless of overloaded CMS controller templates.
|
||||||
// TODO Allow customization, e.g. to display an edit form alongside a search form from the CMS controller
|
// TODO Allow customization, e.g. to display an edit form alongside a search form from the CMS controller
|
||||||
$form->setTemplate('LeftAndMain_EditForm');
|
$form->setTemplate('LeftAndMain_EditForm');
|
||||||
$form->addExtraClass('cms-content cms-edit-form center ss-tabset');
|
$form->addExtraClass('cms-content cms-edit-form center');
|
||||||
$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');
|
$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');
|
||||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
if($form->Fields()->hasTabset()) {
|
||||||
|
$form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||||
|
$form->addExtraClass('ss-tabset');
|
||||||
|
}
|
||||||
|
|
||||||
if($toplevelController->hasMethod('Backlink')) {
|
if($toplevelController->hasMethod('Backlink')) {
|
||||||
$form->Backlink = $toplevelController->Backlink();
|
$form->Backlink = $toplevelController->Backlink();
|
||||||
|
Loading…
Reference in New Issue
Block a user