From 7c62a6d58d73bda0cb11a1915e704ff1f6676232 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 27 May 2016 08:25:48 +1200 Subject: [PATCH] Bootstrap classes for text field Required to support new "compressed" form style in admin/assets which puts form field labels on their own line (and requires the bootstrap layout styling for this) --- admin/client/src/components/TextField/TextField.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/admin/client/src/components/TextField/TextField.js b/admin/client/src/components/TextField/TextField.js index 82125d22b..89a42a258 100644 --- a/admin/client/src/components/TextField/TextField.js +++ b/admin/client/src/components/TextField/TextField.js @@ -23,7 +23,7 @@ class TextField extends SilverStripeComponent { // The extraClass property is defined on both the holder and element // for legacy reasons (same behaviour as PHP rendering) - const classNames = ['field', 'text', this.props.extraClass].join(' '); + const classNames = ['field', 'text', 'form-group', this.props.extraClass].join(' '); return (
@@ -32,9 +32,7 @@ class TextField extends SilverStripeComponent { {labelText} } -
- {field} -
+ {field}
); } @@ -43,7 +41,7 @@ class TextField extends SilverStripeComponent { return { // The extraClass property is defined on both the holder and element // for legacy reasons (same behaviour as PHP rendering) - className: ['text', this.props.extraClass].join(' '), + className: ['text', 'form-control', this.props.extraClass].join(' '), id: `gallery_${this.props.name}`, name: this.props.name, onChange: this.handleChange,