Sha256: 29b7247fc872024a7174dab1e95e1deef2dd67c24bca30166cb2cd5d924e7efb

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

<%= bootstrap_form_for([current_exhibit, @resource.becomes(Spotlight::Resources::Upload)], layout: :horizontal, label_col: 'col-md-2', control_col: 'col-sm-6 col-md-6', html: { class: 'item-upload-form', multipart: true } ) do |f| %>
  <%= f.url_field :url, type: "file", help: t('.url-field.help', extensions: Spotlight::Engine.config.allowed_upload_extensions.join(' ')), label: "File" %>
  <%= f.fields_for :data do |d| %>
    <% Spotlight::Resources::Upload.fields(current_exhibit).each do |config| %>
      <%= d.send(config.form_field_type, config.field_name, label: uploaded_field_label(config)) %>
    <% end %>

    <% current_exhibit.custom_fields.each do |custom_field| %>
      <%= render partial: "spotlight/custom_fields/form_group/#{custom_field.field_type}", locals: { f: d, field: custom_field, value: nil }  %>
    <% end %>
  <% end %>
  <div class="form-actions">
    <div class="primary-actions">
      <%= hidden_field_tag :tab, 'upload' %>
      <%= cancel_link @resource, :back, class: 'btn btn-secondary' %>
      <%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-secondary' %>
      <%= f.submit t('.add_item'), class: 'btn btn-primary' %>
    </div>
  </div>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.1 app/views/spotlight/resources/upload/_form.html.erb