File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
lib/bootstrap_form/inputs Expand file tree Collapse file tree 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)
1010 define_method :"#{ field_name } _with_bootstrap" do |name , options = { } |
1111 warn_deprecated_layout_value ( options )
1212 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
1314 form_group_builder ( name , options ) do
1415 prepend_and_append_input ( name , options ) do
1516 options [ :placeholder ] ||= name if options [ :floating ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class BootstrapFieldsTest < ActionView::TestCase
99 expected = <<~HTML
1010 < div class ="mb-3 ">
1111 < 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 " />
1313 </ div >
1414 HTML
1515 assert_equivalent_html expected , @builder . color_field ( :misc )
You can’t perform that action at this time.
0 commit comments