File tree 2 files changed +2
-1
lines changed
lib/bootstrap_form/inputs
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ def bootstrap_field(field_name)
10
10
define_method :"#{ field_name } _with_bootstrap" do |name , options = { } |
11
11
warn_deprecated_layout_value ( options )
12
12
options = options . reverse_merge ( control_class : "form-range" ) if field_name == :range_field
13
+ options = options . reverse_merge ( control_class : "form-control form-control-color" ) if field_name == :color_field
13
14
form_group_builder ( name , options ) do
14
15
prepend_and_append_input ( name , options ) do
15
16
options [ :placeholder ] ||= name if options [ :floating ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class BootstrapFieldsTest < ActionView::TestCase
9
9
expected = <<~HTML
10
10
< div class ="mb-3 ">
11
11
< label class ="form-label " for ="user_misc "> Misc</ label >
12
- < input class ="form-control " id ="user_misc " name ="user[misc] " type ="color " value ="#000000 " />
12
+ < input class ="form-control form-control-color " id ="user_misc " name ="user[misc] " type ="color " value ="#000000 " />
13
13
</ div >
14
14
HTML
15
15
assert_equivalent_html expected , @builder . color_field ( :misc )
You can’t perform that action at this time.
0 commit comments