Skip to content

Commit

Permalink
Simplify boostrapping composite fields
Browse files Browse the repository at this point in the history
  • Loading branch information
unclecheese committed Jan 14, 2015
1 parent 4fa8e51 commit a8d9edc
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions code/BootstrapFieldList.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@ public function bootstrapify() {

if(isset($this->ignores[$f->getName()])) continue;

// If we have a Tabset, bootstrapify all Tabs
if($f instanceof TabSet) {
$f->Tabs()->bootstrapify();
}

// If we have a Tab, bootstrapify all its Fields
if($f instanceof Tab) {
$f->Fields()->bootstrapify();
if($f instanceof CompositeField) {
$f->getChildren()->bootstrapify();
continue;
}

if(!in_array($f->class, $inline_fields )) {
Expand Down Expand Up @@ -64,4 +59,4 @@ public function bootstrapIgnore($field) {

return $this->owner;
}
}
}

0 comments on commit a8d9edc

Please sign in to comment.