From ec5448008c2261361542cbab5cd2458b2522b84b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 8 Jan 2009 22:30:47 +0000 Subject: [PATCH] ENHANCEMENT #3313 gigtech: Added ComplexTableField::setAddTitle() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69924 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/ComplexTableField.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/forms/ComplexTableField.php b/forms/ComplexTableField.php index b50b9a22e..0321c11a6 100755 --- a/forms/ComplexTableField.php +++ b/forms/ComplexTableField.php @@ -35,6 +35,9 @@ class ComplexTableField extends TableListField { * - A FieldSet object: Use that field set directly. * - A method name, eg, 'getCMSFields': Call that method on the child object to get the fields. */ + + protected $addTitle; + protected $detailFormFields; protected $viewAction, $sourceJoin, $sourceItems, $unpagedSourceItems; @@ -302,6 +305,15 @@ JS; function setDetailFormValidator( Validator $validator ) { $this->detailFormValidator = $validator; } + + function setAddTitle($addTitle) { + if(is_string($addTitle)) + $this->addTitle = $addTitle; + } + + function Title() { + return $this->addTitle ? $this->addTitle : parent::Title(); + } /** * Returns the content of this formfield without surrounding layout. Triggered by Javascript @@ -984,4 +996,4 @@ class ComplexTableField_Popup extends Form { } } -?> \ No newline at end of file +?>