mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed LeftAndMain->RootForm(), concept no longer applies in 3.0 UI. Use EmptyForm() or EditForm()
This commit is contained in:
parent
b321b9b995
commit
c117ef58cf
@ -77,7 +77,6 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
'show',
|
'show',
|
||||||
'EditorToolbar',
|
'EditorToolbar',
|
||||||
'EditForm',
|
'EditForm',
|
||||||
'RootForm',
|
|
||||||
'AddForm',
|
'AddForm',
|
||||||
'batchactions',
|
'batchactions',
|
||||||
'BatchActionsForm',
|
'BatchActionsForm',
|
||||||
@ -928,16 +927,12 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
$form->setFields($readonlyFields);
|
$form->setFields($readonlyFields);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$form = $this->RootForm();
|
$form = $this->EmptyForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
function RootForm() {
|
|
||||||
return $this->EmptyForm();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a placeholder form, used by {@link getEditForm()} if no record is selected.
|
* Returns a placeholder form, used by {@link getEditForm()} if no record is selected.
|
||||||
* Our javascript logic always requires a form to be present in the CMS interface.
|
* Our javascript logic always requires a form to be present in the CMS interface.
|
||||||
|
@ -22,7 +22,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
'memberimport',
|
'memberimport',
|
||||||
'GroupImportForm',
|
'GroupImportForm',
|
||||||
'groupimport',
|
'groupimport',
|
||||||
'RootForm'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,8 +117,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
|
|
||||||
$actions = new FieldList();
|
$actions = new FieldList();
|
||||||
|
|
||||||
$this->extend('updateRootFormFields', $fields, $actions);
|
|
||||||
|
|
||||||
$form = new Form(
|
$form = new Form(
|
||||||
$this,
|
$this,
|
||||||
'EditForm',
|
'EditForm',
|
||||||
@ -130,6 +127,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
|
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
|
||||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||||
$form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses());
|
$form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses());
|
||||||
|
|
||||||
|
$this->extend('updateEditForm', $form);
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ class Group extends DataObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Caution: Only call on instances, not through a singleton.
|
* Caution: Only call on instances, not through a singleton.
|
||||||
* The "root group" fields will be created through {@link SecurityAdmin->RootForm()}.
|
* The "root group" fields will be created through {@link SecurityAdmin->EditForm()}.
|
||||||
*
|
*
|
||||||
* @return FieldList
|
* @return FieldList
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user