From c38ca52ab728177286e3101576e75379ac953730 Mon Sep 17 00:00:00 2001 From: Russell Michell Date: Wed, 16 Jan 2013 09:51:34 +1300 Subject: [PATCH] MINOR: Removed ability to select parent and replaced with hidden-field --- code/dataobjects/Comment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/dataobjects/Comment.php b/code/dataobjects/Comment.php index 15f3d58..14e3aee 100755 --- a/code/dataobjects/Comment.php +++ b/code/dataobjects/Comment.php @@ -321,8 +321,8 @@ class Comment extends DataObject { */ public function getCMSFields() { $fields = parent::getCMSFields(); - $parentClass = $this->getParentClassName(); - $parentIDField = new DropDownField('ParentID', 'Parent', $parentClass::get()->map()); + $parent = $this->getParent()->ID; + $parentIDField = new HiddenField('ParentID', 'Parent', $parent); $authorIDField = new HiddenField('AuthorID'); $baseClassField = new HiddenField('BaseClass'); $fields->replaceField('ParentID', $parentIDField);