Sha256: 313c8fdf7303e227e69576523ddf8d67c19df921c6a87ea07d84505e016be46b

Contents?: true

Size: 644 Bytes

Versions: 23

Compression:

Stored size: 644 Bytes

Contents

<div class="control-group optional">
  <label class="optional control-label">Attachments</label>
  <div class="controls">
    <% if item.persisted? %>
      <div id="attachments" class="clearfix">
        <%= render item.attachments %>
      </div>

      <input id="fileupload" type="file" name="asset" data-url="<%= new_attachment_path %>" multiple>
      <%= hidden_field_tag "attachable_id", item.id %>
      <%= hidden_field_tag "attachable_type", item.class.to_s %>
      <%= hidden_field_tag "attachable_url", attachments_path(item.class.to_s, item.id) %>

    <% else %>
      First save to enable uploads
    <% end %>
  </div>
</div>

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
brightcontent-attachments-2.0.12 app/views/brightcontent/base/_form_field_attachments.html.erb
brightcontent-attachments-2.0.11 app/views/brightcontent/base/_form_field_attachments.html.erb
brightcontent-attachments-2.0.10 app/views/brightcontent/base/_form_field_attachments.html.erb