Sha256: 725bf45678b2790854411d856045b4ed301a97ee6d9187fd448e8493731f4cf3

Contents?: true

Size: 1.47 KB

Versions: 8

Compression:

Stored size: 1.47 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) %>
        <small class="form-text text-muted">
          <%= t(:'.source.remote.help') %>
        </small>
      </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) %>
    <%= f.submit nil, class: 'btn btn-primary' %>
  </div>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.rc1 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.10 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.9 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.8 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.7 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.6 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.5 app/views/spotlight/contacts/_form.html.erb
blacklight-spotlight-3.0.0.alpha.4 app/views/spotlight/contacts/_form.html.erb