From a1cb5387a1f4ccb04e2a7f4d8f53d7829e260d09 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Thu, 9 Aug 2007 22:24:38 +0000 Subject: [PATCH] Added search form to comment admin git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@39801 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CommentTableField.php | 15 +++++++++++++++ templates/Includes/CommentTableField.ss | 3 +++ 2 files changed, 18 insertions(+) diff --git a/code/CommentTableField.php b/code/CommentTableField.php index 4eceadf8..c53e3228 100644 --- a/code/CommentTableField.php +++ b/code/CommentTableField.php @@ -98,6 +98,21 @@ class CommentTableField extends ComplexTableField { return $this->mode == 'spam'; } + function SearchForm() { + $searchFields = new FieldGroup( + new TextField('MemberSearch', 'Search'), + new HiddenField("ctf[mode]",'',$this->mode) + ); + + $actionFields = new LiteralField('CommentFilterButton',''); + + $fieldContainer = new FieldGroup( + $searchFields, + $actionFields + ); + + return $fieldContainer->FieldHolder(); + } } diff --git a/templates/Includes/CommentTableField.ss b/templates/Includes/CommentTableField.ss index 8e32ae9e..9106c2e6 100644 --- a/templates/Includes/CommentTableField.ss +++ b/templates/Includes/CommentTableField.ss @@ -1,4 +1,7 @@
+
+ $SearchForm +
<% include TableListField_PageControls %>