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
This commit is contained in:
Sam Minnee 2009-01-08 22:30:47 +00:00
parent 10cdb8e05c
commit ec5448008c

View File

@ -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 {
}
}
?>
?>