MINOR Editing and relation adding on SecurityAdmin groups (both root and group instances) (SSF-53)

This commit is contained in:
Ingo Schommer 2012-03-01 16:27:58 +01:00
parent a2afe4e4ad
commit 4bd5333b56
2 changed files with 6 additions and 2 deletions

View File

@ -107,6 +107,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
*/
function RootForm() {
$config = new GridFieldConfig_Base(25);
$config->addComponent(new GridFieldAction_Edit());
$config->addComponent(new GridFieldAction_Delete());
$config->addComponent(new GridFieldPopupForms());
$config->addComponent(new GridFieldExporter());
$memberList = new GridField('Members', 'All members', DataList::create('Member'), $config);

View File

@ -62,8 +62,10 @@ class Group extends DataObject {
public function getCMSFields() {
Requirements::javascript(SAPPHIRE_DIR . '/javascript/PermissionCheckboxSetField.js');
$config = new GridFieldConfig_ManyManyEditor('FirstName', true, 20);
$config->addComponent(new GridFieldExporter());
$config = new GridFieldConfig_ManyManyEditor('FirstName', 20);
$config->addComponents(new GridFieldExporter());
$config->getComponentByType('GridFieldRelationAdd')
->setResultsFormat('$Title ($Email)')->setSearchFields(array('FirstName', 'Surname', 'Email'));
$memberList = new GridField('Members','Members', $this->Members(), $config);
// @todo Implement permission checking on GridField