Sha256: 96a837318b6584f0be360f1eeed01313a9d2caf21eab6b09b31c7a1789402cd3

Contents?: true

Size: 1.39 KB

Versions: 36

Compression:

Stored size: 1.39 KB

Contents

<%= 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| %>
    <div data-cropper="<%= af.object.model_name.singular_route_key %>" data-form-prefix="<%= form_prefix(af) %>">
    <%= field_set_tag(t(:'.avatar.header')) do %>
      <p class="instructions"><%= t(:'featured_images.form.crop_area.help', scope: [:spotlight], thing: 'contact photo') %></p>

      <div>
        <%= af.radio_button(:source, :remote, label: t(:'.source.remote.label')) %>
        <%= iiif_upload_tag(af) %>
      </div>

      <%= iiif_cropper_tags af, initial_crop_selection: Spotlight::Engine.config.contact_square_size %>
    <% end %>
    </div>
  <% end %>

  <div class="form-group primary-actions">
    <%= cancel_link @contact, exhibit_about_pages_path(@contact.exhibit), class: "btn btn-link" %>
    <%= f.submit nil, class: 'btn btn-primary' %>
  </div>
<% end %>

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
blacklight-spotlight-2.5.2 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.5.1 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.5.0 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.4.1 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.4.0 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.3.3 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.3.2 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.3.1 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.3.0 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.2.1 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.2.0 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.1.0 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.2 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.1 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.0 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.0.rc6 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.0.rc5 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.0.rc4 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.0.rc3 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-2.0.0.rc2 app/views/spotlight/contacts/_form.html.erb