diff --git a/_config.php b/_config.php index cdd601c..ca4add3 100644 --- a/_config.php +++ b/_config.php @@ -1,7 +1,11 @@ 'TestModelAdmin', )); -LeftAndMain::add_menu_item('test', 'Test ModelAdmin', 'admin/test', 'TestModelAdmin'); +CMSMenu::add_menu_item('test', 'Test ModelAdmin', 'admin/test', 'TestModelAdmin'); +*/ + +Object::add_extension('Member', 'FrameworkTestRole'); \ No newline at end of file diff --git a/code/BasicFieldsTestPage.php b/code/BasicFieldsTestPage.php index 4414bbd..76678e4 100644 --- a/code/BasicFieldsTestPage.php +++ b/code/BasicFieldsTestPage.php @@ -107,7 +107,9 @@ class BasicFieldsTestPage extends TestPage { new FileField('File2','FileField'), new FileIFrameField('File3','FileIFrameField'), )); + return $fields; + } } diff --git a/code/TestPage.php b/code/TestPage.php index c2dce3c..0ce1465 100644 --- a/code/TestPage.php +++ b/code/TestPage.php @@ -31,6 +31,12 @@ class TestPage extends Page { * Parent class of all test page controllers */ class TestPage_Controller extends Page_Controller { + static $allowed_actions = array( + 'makelotsofpages', + 'Form', + 'save', + ); + /** * This form is exactly like the CMS form. It gives us an opportunity to test the fields outside of the CMS context */ @@ -47,5 +53,26 @@ class TestPage_Controller extends Page_Controller { $this->dataRecord->write(); Director::redirectBack(); } + + /** + * Create a bunch of pages + */ + function makelotsofpages() { + echo "