<%= bootstrap_form_for @contact, url: @contact.new_record? ? exhibit_contacts_path(@exhibit) : [@exhibit, @contact], layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10', html: {class: 'col-md-9' } do |f| %> <%= f.text_field :name, placeholder: t(:'.name.placeholder') %> <%= f.fields_for(:contact_info) do |contact_info| %> <% Spotlight::Contact.fields.keys.each do |field| %> <%= contact_info.text_field field, value: @contact.contact_info[field], placeholder: t(:".#{field}.placeholder") %> <% end %> <% end %> <%= f.fields_for :avatar, (@contact.avatar || @contact.build_avatar) do |af| %>
<%= field_set_tag(t(:'.avatar.header')) do %>

<%= t(:'featured_images.form.crop_area.help', scope: [:spotlight], thing: 'contact photo') %>

<%= af.radio_button(:source, :remote, label: t(:'.source.remote.label')) %> <%= iiif_upload_tag(af) %> <%= t(:'.source.remote.help') %>
<%= iiif_cropper_tags af, initial_crop_selection: Spotlight::Engine.config.contact_square_size %> <% end %>
<% end %>
<%= cancel_link @contact, exhibit_about_pages_path(@contact.exhibit), class: "btn btn-link" %> <%= f.submit nil, class: 'btn btn-primary' %>
<% end %>