From c117ef58cf09defe4884d2e9ccb73c03ed0c87d6 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 8 Mar 2012 18:20:11 +0100 Subject: [PATCH] API CHANGE Removed LeftAndMain->RootForm(), concept no longer applies in 3.0 UI. Use EmptyForm() or EditForm() --- admin/code/LeftAndMain.php | 7 +------ admin/code/SecurityAdmin.php | 5 ++--- security/Group.php | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 8df4f4786..a5d557a3a 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -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. diff --git a/admin/code/SecurityAdmin.php b/admin/code/SecurityAdmin.php index f75ee0745..a3c8886da 100755 --- a/admin/code/SecurityAdmin.php +++ b/admin/code/SecurityAdmin.php @@ -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; } diff --git a/security/Group.php b/security/Group.php index 38fafb4c7..411c50aea 100755 --- a/security/Group.php +++ b/security/Group.php @@ -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 */