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',
|
||||
'EditorToolbar',
|
||||
'EditForm',
|
||||
'RootForm',
|
||||
'AddForm',
|
||||
'batchactions',
|
||||
'BatchActionsForm',
|
||||
@ -928,16 +927,12 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
||||
$form->setFields($readonlyFields);
|
||||
}
|
||||
} else {
|
||||
$form = $this->RootForm();
|
||||
$form = $this->EmptyForm();
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
function RootForm() {
|
||||
return $this->EmptyForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
@ -22,7 +22,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
'memberimport',
|
||||
'GroupImportForm',
|
||||
'groupimport',
|
||||
'RootForm'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -118,8 +117,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
|
||||
$actions = new FieldList();
|
||||
|
||||
$this->extend('updateRootFormFields', $fields, $actions);
|
||||
|
||||
$form = new Form(
|
||||
$this,
|
||||
'EditForm',
|
||||
@ -130,6 +127,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
|
||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
$form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses());
|
||||
|
||||
$this->extend('updateEditForm', $form);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class Group extends DataObject {
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user