Sha256: 19fdd331b3507c108714ee3528e675d555a21d39434dfc305c652acc288dc652

Contents?: true

Size: 1.82 KB

Versions: 14

Compression:

Stored size: 1.82 KB

Contents

<%= simple_form_for [main_app, curation_concern],
                    html: { multipart: true },
                    wrapper_mappings: { multifile: :horizontal_file_input } do |f| %>
  <div class="row">
    <div class="col-md-6">
      <fieldset class="required">
        <legend>Your File&#8217;s Title</legend>
        <span class="control-label">
          <%= label_tag 'file_set[title][]', 'Title',  class: "string optional" %>
        </span>
        <%= text_field_tag 'file_set[title][]', curation_concern.title.first, class: 'form-control' %>
      </fieldset>
      <fieldset class="required">
        <legend>
          Attach Your File
        </legend>
          <% select_options = if params['type'] == 'metadata'
              GeoConcerns::MetadataFormatService.select_options
            elsif params['type'] == 'image-data'
              GeoConcerns::ImageFormatService.select_options
            elsif params['type'] == 'raster-data'
              GeoConcerns::RasterFormatService.select_options
            elsif params['type'] == 'vector-data'
              GeoConcerns::VectorFormatService.select_options
            end %>
          <% if select_options %>
           <%= f.input(:geo_mime_type, as: :select, collection: select_options,
                input_html: { class: 'form-control' }, label: 'Type') %>
          <% end %>
          <%= f.input :files, as: :multifile %>
      </fieldset>
    </div>

    <div class="col-md-6">
      <%= render "form_permission", f: f %>
    </div>
  </div>

  <div class="row">
    <div class="col-md-12 form-actions">
      <%= f.submit(
        (curation_concern.persisted? ? "Update Attached File" : %(Attach to #{parent.human_readable_type})),
        class: 'btn btn-primary'
      ) %>
      <%= link_to 'Cancel', parent_path(parent), class: 'btn btn-link' %>
    </div>
  </div>
<% end %>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
geo_concerns-0.3.4 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.3.3 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.3.2 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.3.1 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.3.0 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.2.0 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.1.1 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.1.0 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.0.10 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.0.9 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.0.8 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.0.7 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.0.6 app/views/geo_concerns/file_sets/_form.html.erb
geo_concerns-0.0.5 app/views/geo_concerns/file_sets/_form.html.erb