removed dropDatalessFields() - needs serious refactoring before going into core again

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48103 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-01-16 21:35:59 +00:00
parent a86a35f76a
commit 48d19626dc

View File

@ -676,22 +676,6 @@ class Form extends ViewableData {
}
}
function dropDatalessField(){
foreach($this->Fields() as $field){
if(get_class($field)!='SelectionGroup'&&get_class($field)!='TableListField'&&!is_subclass_of($field, 'TableListField')){
if((get_class($field)=='DatalessField' ||is_subclass_of($field, 'DatalessField'))&&get_class($field)!='HeaderField'&&get_class($field)!='LabelField'){
$this->Fields()->removeByName($field->Name());
}elseif($field->isComposite()){
$field->dropDatalessField();
}else{
if(get_class($field) != "HeaderField" &&get_class($field) != "LabelField"&& $field->Value() === NULL){
$this->Fields()->removeByName($field->Name());
}
}
}
}
}
/**
* Return the default button that should be clicked when another one isn't available
*/