% form_prefix = f.object_name.parameterize("_") %>
<%= field_set_tag do %>
<%= f.check_box(:display) %>
<% end if f.object.is_a? Spotlight::Masthead %>
<%= field_set_tag(t(:'.source.header')) do %>
<%= f.radio_button(:source, :exhibit, label: t(:'.source.exhibit.label')) %>
<%= f.hidden_field(:document_global_id) %>
<%= f.hidden_field(:remote_image_url, data: jcrop_options) %>
<%= text_field_tag(:document_title, (presenter(f.object.document).document_show_html_title if f.object.document), class: "form-control", data: {input_select_target: "##{form_prefix}_source_exhibit", masthead_typeahead: true, target_panel: "##{form_prefix}-target-panel", :'id-field' => "##{form_prefix}_document_global_id", remote_url_field: "##{form_prefix}_remote_image_url" }) %>
<%= t(:'.source.exhibit.help') %>
<%= f.radio_button(:source, :remote, label: t(:'.source.remote.label')) %>
<%= f.file_field_without_bootstrap(:image, data: jcrop_options.merge(input_select_target: "##{form_prefix}_source_remote")) %>
<% end %>
<%= field_set_tag(t(:'.source.remote.header')) do %>
<%= t(:'.source.remote.help') %>
">
<%= hidden_field_tag :"#{jcrop_options.fetch(:selector, "image")}_crop", ([f.object.image_crop_x.to_i, f.object.image_crop_y.to_i, f.object.image_crop_x.to_i + f.object.image_crop_w.to_i, f.object.image_crop_y.to_i + f.object.image_crop_h.to_i].to_json if f.object.try(:image_crop_x)) %>
<%= f.cropbox :image %>
<% end %>