mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Using base LeftAndMain_EditForm template in GridFieldPopupForms regardless of template overrides on the "root" cms controller
This commit is contained in:
parent
c820692e9e
commit
3b9c9399dc
@ -257,9 +257,11 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler {
|
||||
// TODO Coupling with CMS
|
||||
$toplevelController = $this->getToplevelController();
|
||||
if($toplevelController && $toplevelController instanceof LeftAndMain) {
|
||||
$form->addExtraClass('cms-edit-form');
|
||||
$form->setTemplate($toplevelController->getTemplatesWithSuffix('_EditForm'));
|
||||
$form->addExtraClass('cms-content center ss-tabset ' . $toplevelController->BaseCSSClasses());
|
||||
// Always show with base template (full width, no other panels),
|
||||
// regardless of overloaded CMS controller templates.
|
||||
// TODO Allow customization, e.g. to display an edit form alongside a search form from the CMS controller
|
||||
$form->setTemplate('LeftAndMain_EditForm');
|
||||
$form->addExtraClass('cms-content cms-edit-form center ss-tabset');
|
||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
// TODO Link back to controller action (and edited root record) rather than index,
|
||||
// which requires more URL knowledge than the current link to this field gives us.
|
||||
|
Loading…
Reference in New Issue
Block a user