Permalink
Browse files

BUGFIX Fixing default group selection in 'add member' dialog (in Memb…

…erTableField) (fixes #5836) (from r108099)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112790 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent ad92086 commit 00ff9c4daff9467afaaac06790e97c0a28c237bf @sminnee sminnee committed Oct 19, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 code/MemberTableField.php
@@ -333,7 +333,9 @@ function AddForm() {
// 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;

0 comments on commit 00ff9c4

Please sign in to comment.