Permalink
Browse files

MINOR Editing and relation adding on SecurityAdmin groups (both root …

…and group instances) (SSF-53)
  • Loading branch information...
1 parent a2afe4e commit 4bd5333b5634ab9e05bb7b190aab4d211d3c8207 @chillu chillu committed Mar 1, 2012
Showing with 6 additions and 2 deletions.
  1. +2 −0 admin/code/SecurityAdmin.php
  2. +4 −2 security/Group.php
@@ -107,6 +107,8 @@ public function getEditForm($id = null, $fields = null) {
*/
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
@@ -62,8 +62,10 @@ function getAllChildren() {
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

0 comments on commit 4bd5333

Please sign in to comment.