=semantic_form_for [:admin, @p_commercial_objective], :remote => @p_commercial_objective.id ? false : false do |form|
  .content

    .qi_row
      .qi_pannel.qi_plain.padding
        Objectifs annuel :
        %hr

        .qi_pannel.qi_plain.padding
          =form.inputs do
            = form.input :p_commercial_id, :label => "Commercial :", :include_blank => false, :collection => PCommercial.order(:name).all, :as => :select, :member_label => :long_name
            = form.input :total_ca, :label => "Objectif de CA:"
            = form.input :total_weight, :label => "Objectif de poids:"
            = form.input :start_at, :label => "Date de début :", as: :date
            = form.input :end_at, :label => "Date de fin :", as: :date


    .qi_row
      .qi_pannel.qi_plain.padding
        Objectifs mensuels :
        %hr

        .p_commercial_object_months_form
          =form.semantic_fields_for :p_commercial_object_months do |form|
            =render :partial => "admin/p_commercial_object_months/form", :locals => {:form => form}

        %p= link_to_add_fields ic(:plus)+" Ajouter un objectif mensuel", form, :p_commercial_object_months


    .qi_row
      .qi_pannel.qi_plain.padding
        Objectifs par marque :
        %hr

        .p_commercial_object_brands_form
          =form.semantic_fields_for :p_commercial_object_brands do |form|
            =render :partial => "admin/p_commercial_object_brands/form", :locals => {:form => form}

        %p= link_to_add_fields ic(:plus)+" Ajouter un objectif de marque", form, :p_commercial_object_brands



  .large_actions
    .actions
      =form.submit "sauvegarder", :class => "btn btn-primary"
