Skip to content

Commit

Permalink
MINOR Editing and relation adding on SecurityAdmin groups (both root …
Browse files Browse the repository at this point in the history
…and group instances) (SSF-53)
  • Loading branch information
chillu committed Mar 1, 2012
1 parent a2afe4e commit 4bd5333
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions admin/code/SecurityAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions security/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4bd5333

Please sign in to comment.