diff --git a/lib/widget/cost_types.rb b/lib/widget/cost_types.rb index 6e7b0bee25..a049d15daf 100644 --- a/lib/widget/cost_types.rb +++ b/lib/widget/cost_types.rb @@ -32,10 +32,15 @@ class Widget::CostTypes < Widget::Base def contents content_tag :div do available_cost_type_tabs(@subject).sort_by { |id, _| id }.map do |id, label| - type_selection = radio_button_tag('unit', id, id == @selected_type_id) - type_selection += label_tag "unit_#{id}", h(label) - type_selection - end.join('
').html_safe + content_tag :div, class: "form--field -trailing-label" do + types = label_tag "unit_#{id}", h(label), class: "form--label" + types += content_tag :span, class: "form--field-container" do + content_tag :span, class: "form--radio-button-container" do + radio_button_tag('unit', id, id == @selected_type_id, class: "form--radio-button") + end + end + end + end.join('').html_safe end end end