= simple_nested_form_for @user, url: settings_path, turboboost: true, validate: true, html: { multipart: true, class: "fixxpert_update_form" } do |f| = hidden_field_tag :type, :integration = f.fields_for :user_categories, @user.user_categories.includes(:category) do |uc| .col-sm-12 class="task-#{uc.index}" .wizard-text | Task b = " #{uc.index + 1}/#{@user.categories.count} #{uc.object.category.name}" .space-10 .panel-group.accordion id="accordion-#{uc.index}" - current_user.subtrades.includes(:trade).group_by(&:trade_id).each_with_index do |(trade_id, subtrades), index| .panel.panel-info .panel-heading = link_to "#accordion-#{uc.index}-trade-#{index}", data: {parent: "#accordion-#{uc.index}", toggle: 'collapse'}, class: 'collapsed' do h4.panel-title = subtrades.first.trade.name.titleize |   i.fa.fa-angle-down i.fa.fa-angle-right span.pull-right = "#{subtrades.size} subtrades" .panel-collapse.collapse id="accordion-#{uc.index}-trade-#{index}" .panel-body ul - subtrades.each do |subtrade| li.li_subtrade i.fa.fa-times-circle.remove.pull-right = subtrade.name = f.button :submit, 'Update Integration', class: 'btn btn-info pull-right'