<%= t('spotlight.exhibits.translations.search_fields.field_based_search_fields.label') %>
<% current_exhibit.blacklight_config.search_fields.select { |_, config| config.if }.each do |key, search_config| %>
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.search.#{key}", locale: @language) %>
<%= f.fields_for :translations, translation do |translation_fields| %>
<%= translation_fields.hidden_field :key %>
<%= translation_fields.hidden_field :locale %>
<% end %>
<% end %>
<%= t('spotlight.exhibits.translations.search_fields.facet_fields.label') %>
<% current_exhibit.blacklight_config.facet_fields.each do |key, facet_config| %>
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.facet.#{key}", locale: @language) %>
<%= f.fields_for :translations, translation do |translation_fields| %>
<%= translation_fields.hidden_field :key %>
<%= translation_fields.hidden_field :locale %>
<% end %>
<% end %>
<%= t('spotlight.exhibits.translations.search_fields.sort_fields.label') %>
<% current_exhibit.blacklight_config.sort_fields.each do |key, sort_config| %>
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.sort.#{key}", locale: @language) %>
<%= f.fields_for :translations, translation do |translation_fields| %>
<%= translation_fields.hidden_field :key %>
<%= translation_fields.hidden_field :locale %>
<% end %>
<% end %>