<% default_field = @blacklight_configuration.blacklight_config.default_sort_field %> <%= field_set_tag(t(:'.header')) do %>

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

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

    (<%= translate_sort_fields(default_field) %>)
    <% @blacklight_configuration.blacklight_config.sort_fields.select { |k, v| blacklight_configuration_context.evaluate_if_unless_configuration(v.original) }.except(default_field.key).each_with_index do |(k, config), index| %>
  1. <%= t(:drag) %>
    <%= vt.fields_for k, config do |sort| %> <%= sort.check_box_without_bootstrap :enabled %>

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

    (<%= translate_sort_fields(config) %>) <%= sort.hidden_field :weight, {value: index, data: {property: "weight"}} %> <% end %>
  2. <% end %>
<% end %> <% end %>