Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model admin editor #72

Open
mi32dogs opened this issue Feb 6, 2016 · 1 comment
Open

Model admin editor #72

mi32dogs opened this issue Feb 6, 2016 · 1 comment

Comments

@mi32dogs
Copy link

mi32dogs commented Feb 6, 2016

I cant get the Model admin panel to work, what am i doing wrong?
i have a simple dataobject and model admin file and if i add a model admin panel it list the dataobject but it is not saving it
any hints would be appreciated

DataObject:
`class tester extends DataObject
{

private static $db = array(
    'List' => 'Boolean',
    'Name' => 'Varchar(150)',
);

private static $singular_name = 'tester';
private static $plural_name = 'testers';


public function getCMSFields()
{
    $fields = parent::getCMSFields();
    $fields->addFieldToTab('Root.Main', CheckboxField::create('List', 'List on locations overview page'));
    $fields->addFieldToTab('Root.Main', TextField::create('Name', 'Name'));

    return $fields;
}

}`

Model Admin:
`class testerAdmin extends ModelAdmin
{

private static $managed_models = array(
    'tester'
);

private static $url_segment = 'testers';

private static $menu_title = 'testers';
@mi32dogs
Copy link
Author

mi32dogs commented Mar 5, 2016

any body?
or is it a dumb question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant