mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
a86a35f76a
commit
48d19626dc
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user