BUGFIX Fixing default group selection in 'add member' dialog (in MemberTableField) (fixes #5836)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@108099 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-07-19 03:29:05 +00:00 committed by Sam Minnee
parent dd70fcd5be
commit 473347dcfe

View File

@ -332,7 +332,9 @@ class MemberTableField extends ComplexTableField {
// Set default groups - also implemented in MemberTableField_Popup::__construct()
if($this->group) {
$groupsField = $form->Fields()->dataFieldByName('Groups');
if($groupsField) $groupsField->setValue($this->group->ID);
// TODO Needs to be a string value (not int) because of TreeMultiselectField->getItems(),
// see http://open.silverstripe.org/ticket/5836
if($groupsField) $groupsField->setValue((string)$this->group->ID);
}
return $form;