= f.inputs name: 'Track' do

  %ol.nested-fields
    = f.input :user, :as => :autocomplete, :url => autocomplete_user_email_admin_users_path, :input_html => { id: "jam_ruby_recorded_track_user_id", name: "", id_element: "#WILL_BE_OVERRIDDEN_BY_JS_IN_RECORDED_FORM" }
    = f.input :user_id, :as => :hidden, :input_html => { class: "jam_ruby_recorded_track[user_id]" }
    = f.input :instrument, collection: Instrument.all
    = f.input :sound, :as => :select,  collection: options_for_select(RecordedTrack::SOUND, 'stereo')

    - if f.object.new_record?
      %i before you can upload, you must select 'Update Recording'
    - else
      = f.input :url, :as => :file
      - unless f.object.nil? || f.object[:url].nil?
        .current_file_holder{style: 'margin-bottom:10px'}
          %a{href: f.object.sign_url(3600), style: 'padding:0 0 0 20px'} Download

    %div{style: 'display:none'}
      = f.input :client_id, as: :hidden
      = f.input :track_id, as: :hidden
      = f.input :client_track_id, as: :hidden

    = link_to_remove_association "Delete Track", f, class: 'button', style: 'margin-left:10px'



