<% default_field = @blacklight_configuration.blacklight_config.default_search_field %>
<%= field_set_tag(t(:'.header'), id: 'search_fields') do %>

<%= t(:'.help') %>

<%= t(:'.instructions') %>

<%= f.fields_for :search_fields, @blacklight_configuration.blacklight_config.search_fields.keys do |vt| %>
  1. <%= vt.fields_for default_field.key, default_field do |field| %> <%= field.check_box_without_bootstrap :enabled, data: { readonly: true }, class: 'disabled' %> <%= field.hidden_field :label, readonly: true %> <%= field.hidden_field :weight, value: "-1", readonly: true %> <%= default_field.label %> <% end %>

    <% @blacklight_configuration.blacklight_config.search_fields.select { |_k, v| blacklight_configuration_context.evaluate_if_unless_configuration(v.original) && v.include_in_simple_select != false }.except(default_field.key).each_with_index do |(k, config), index| %>
  1. <%= t(:drag) %>
    <%= vt.fields_for k, config do |field| %> <%= field.check_box_without_bootstrap :enabled %>

    <%= config.label %> <%= field.hidden_field :label, {data: {:"edit-field-target" => "true"}} %>

    <%= field.hidden_field :weight, {value: index, data: {property: "weight"}} %> <% end %>
  2. <% end %>
<% end %> <% end %>