@@ -28,9 +28,12 @@ def inputs_collection(name, collection, value, text, options={}, &)
2828 end
2929 end
3030
31- def field_layout ( options ) = options [ :layout ] || ( :inline if options [ :inline ] == true )
31+ def field_layout ( options )
32+ ( :inline if options [ :inline ] == true ) || options [ :layout ]
33+ end
3234
3335 def group_label_class ( field_layout )
36+ debugger
3437 if layout_horizontal? ( field_layout )
3538 group_label_class = "col-form-label #{ label_col } pt-0"
3639 elsif layout_inline? ( field_layout )
@@ -62,8 +65,8 @@ def form_group_collection_input_checked?(checked, obj, input_value)
6265 end
6366
6467 def fieldset_inputs_collection ( name , collection , value , text , options = { } , &)
65- options [ :label ] ||= { class : group_label_class ( options [ :inline ] ) }
66- options [ :layout ] ||= layout_inline? ( options [ :inline ] )
68+ options [ :label ] ||= { class : group_label_class ( field_layout ( options ) ) }
69+ options [ :inline ] ||= layout_inline? ( options [ :layout ] )
6770
6871 fieldset_builder ( name , options ) do
6972 inputs = ActiveSupport ::SafeBuffer . new
@@ -115,6 +118,7 @@ def field_group(name, options, &)
115118 end
116119
117120 def generate_legend ( name , options )
121+ debugger
118122 legend_class = group_label_class ( field_layout ( options ) ) || "form-label"
119123 id = options [ :id ] || default_id ( name )
120124
0 commit comments