Skip to content

Commit e7807ff

Browse files
author
Uncle Cheese
committed
add bootstrap ignore, only apply bootstrap to frontend forms
2 parents 523237f + 5706d26 commit e7807ff

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

code/BootstrapFieldList.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33

44
class BootstrapFieldList extends Extension {
55

6+
67
protected $ignores = array ();
78

89

910
public function bootstrapify() {
1011
foreach($this->owner as $f) {
1112

13+
1214
if(isset($this->ignores[$f->getName()])) continue;
1315

1416
// If we have a Tabset, bootstrapify all Tabs
@@ -50,6 +52,7 @@ public function bootstrapify() {
5052
}
5153

5254

55+
5356
public function bootstrapIgnore($field) {
5457
$this->ignores[$field] = true;
5558

code/BootstrapForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public function forTemplate() {
155155
Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap_forms.js");
156156
}
157157
$this->addExtraClass("form-{$this->formLayout}");
158+
158159
$this->applyBootstrap();
160+
159161
return parent::forTemplate();
160162
}
161163

0 commit comments

Comments
 (0)