Sha256: 8237f8f5e46b0a72d13479277cf3433b676fb6aa217b768de9f958e198eeb550

Contents?: true

Size: 1.21 KB

Versions: 8

Compression:

Stored size: 1.21 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: { inline: true, 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-sizing' %>
      <%= 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

8 entries across 8 versions & 1 rubygems

Version Path
blacklight-spotlight-3.2.0 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.1.0 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.3 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.2 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.1 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.rc6 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.rc5 app/views/spotlight/resources/upload/_form.html.erb