<%= bootstrap_form_for [@search.exhibit, @search], layout: :horizontal, label_col: 'col-md-2 col-sm-2', control_col: 'col-md-7 col-sm-7', data: {form_observer: 'true', autocomplete_exhibit_catalog_path: spotlight.autocomplete_exhibit_search_path(@search.exhibit, @search, q: "%QUERY", format: "json")}, html: {id: 'edit-search'} do |f| %> <% if @search.errors.any? %>

<%= pluralize(@search.errors.count, "error") %> prohibited this page from being saved:

<% end %>
<%= f.text_field :title, control_col: "col-sm-5" %> <%= f.text_field :subtitle, control_col: "col-sm-5" %> <%= f.text_area :long_description, rows: 5 %> <%= f.form_group :search_box, label: { text: t(:'.search_box.label'), class: 'pt-0' }, help: t(:'.search_box.help_block') do %> <%= f.check_box :search_box, label: t(:'.search_box.checkbox_label') %> <% end %> <%= f.form_group label: { text: t(:".default_index_view_type"), class: 'pt-0' } do %> <% available_document_index_views.each do |key, view| %> <%= f.radio_button :default_index_view_type, key, label: view.display_label %> <% end %> <% end %> <% unless @search.query_params.blank? %>
<%= render_constraints(@search.query_params) %>
<% end %>
<% if @groups.present? %>

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

<%= f.collection_check_boxes(:group_ids, @groups, :id, :title, hide_label: true) %> <% else %>

<%= t(:'.group.help_no_groups') %>

<% end %>
<%= f.fields_for :masthead, (@search.masthead || @search.build_masthead) do |m| %>

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

<%= t(:'.masthead.help_secondary') %>

<%= render '/spotlight/featured_images/form', f: m, initial_crop_selection: Spotlight::Engine.config.masthead_initial_crop_selection, crop_type: :masthead %> <% end %>
<%= f.fields_for :thumbnail, (@search.thumbnail || @search.build_thumbnail) do |m| %>

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

<%= render '/spotlight/featured_images/form', f: m, initial_crop_selection: Spotlight::Engine.config.featured_image_thumb_size, crop_type: :thumbnail %> <% end %>
<%= cancel_link @search,exhibit_searches_path(@exhibit), class: 'btn-sizing' %> <%= f.submit nil, class: 'btn btn-primary' %>
<% end %>