<%
if @content.media.empty?
  @content.media.build({key:"original"})
end
%>
<fieldset>
  <legend><span><%= t('.upload_graphic') %></span></legend>
  <div class="clearfix">
    <label><%= t('.specify_file') %></label>
    <div class="input">
      <%= form.fields_for :media do |media| %>
      <%= media.file_field :file, id: 'media_file', data: { media_url: media_index_path, url: preview_contents_path } %>
      <%= media.hidden_field :key %>
      <%= media.hidden_field :id %>
      <% end %>
    </div>
  </div>
</fieldset>
