From 2cd46ff0ed7004cb583383dbd05effaae3a19ae2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 30 Nov 2012 15:34:10 +0100 Subject: [PATCH] Use new SelectionGroup_Item API in "add page" UI --- code/controllers/CMSPageAddController.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/code/controllers/CMSPageAddController.php b/code/controllers/CMSPageAddController.php index 0f7743c9..659cf839 100644 --- a/code/controllers/CMSPageAddController.php +++ b/code/controllers/CMSPageAddController.php @@ -47,13 +47,21 @@ class CMSPageAddController extends CMSPageEditController { $parentModeField = new SelectionGroup( "ParentModeField", array( - "top//$topTitle" => null, //new LiteralField("Dummy", ''), - "child//$childTitle" => $parentField = new TreeDropdownField( - "ParentID", - "", - 'SiteTree', - 'ID', - 'TreeTitle' + new SelectionGroup_Item( + "top", + null, + $topTitle + ), + new SelectionGroup_Item( + 'child', + $parentField = new TreeDropdownField( + "ParentID", + "", + 'SiteTree', + 'ID', + 'TreeTitle' + ), + $childTitle ) ) ),