diff --git a/code/CommentAdmin.php b/code/CommentAdmin.php index 6749026a..afb376f3 100644 --- a/code/CommentAdmin.php +++ b/code/CommentAdmin.php @@ -31,7 +31,8 @@ class CommentAdmin extends LeftAndMain { } public function showtable($params) { - return $this->getLastFormIn($this->renderWith('CommentAdmin_right')); + $form = $this->getEditForm(); + return $form->formHtmlContent(); } public function Section() { diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 638990ae..b14d8600 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -358,10 +358,6 @@ class LeftAndMain extends Controller { if($form) return $form->formHtmlContent(); else return ""; } - public function getLastFormIn($html) { - $parts = split(']*>', $html); - return $parts[sizeof($parts)-2]; - } //------------------------------------------------------------------------------------------// // Main UI components diff --git a/code/ReportAdmin.php b/code/ReportAdmin.php index a1db6556..b31ff073 100755 --- a/code/ReportAdmin.php +++ b/code/ReportAdmin.php @@ -143,11 +143,7 @@ class ReportAdmin extends LeftAndMain { if(Director::is_ajax()) { SSViewer::setOption('rewriteHashlinks', false); - $result = $this->customise(array( - 'EditForm' => $editForm - ))->renderWith($this->getTemplatesWithSuffix('_right')); - - return $this->getLastFormIn($result); + return $form->formHtmlContent(); } return array();