=semantic_form_for [:public, @m_odr_file], :remote => false do |f|
  
  .qi_row
    .qi_pannel.qi_plain.padding
      =f.inputs do

        = f.input :file, :label => "Fichier :"

        
        = f.hidden_field :m_odr_file_type_id
        

        -if f.object.m_odr_file_type_id == 2
          %table.m_odr_file_products_form.form-table{:style => "width:100%;"}
            = f.input :buy_at, :label => "Date de l'achat",:as => :string, :input_html => {:autocomplete => "off", :class => "year_date_picker"}
            

            

            =f.semantic_fields_for :m_odr_file_products do |form|
              =render :partial => "public/m_odr_file_products/form", :locals => {:form => form}
          
          -if true
            %p= public_link_to_add_fields ic(:plus)+" Ajouter un ou plusieurs pneus", f, :m_odr_file_products
            
          
          %br
          %br

        

        -else
          %table.m_odr_file_roulages_form.form-table{:style => "width:100%;"}
            =f.semantic_fields_for :m_odr_file_roulages do |form|
              =render :partial => "public/m_odr_file_roulages/form", :locals => {:form => form}

            -if true
              %p= public_link_to_add_fields ic(:plus)+" Ajouter une journée de roulage", f, :m_odr_file_roulages

          
      
      
  %center=f.submit "sauvegarder", :class => "btn btn-primary"
  %br
  %br

