= semantic_form_for [:admin,@product_order], :remote => true do |form| 

  .content
    =form.input :product_order_category_id, :label => "Catégorie :", :collection => @categories_select, :as => :select, :include_blank => false
    
    -if @product_order.product_order_category_id
      =form.input :product_order_collection_id, :label => "Collection :", :collection => ProductCollection.where(:product_order_category_id => @product_order.product_order_category_id).map{|i| [i.lang("fr").name, i.id]}, :as => :select, :include_blank => false
    
    =form.semantic_fields_for :product_order_langs do |product_order_lang| 

    

      = product_order_lang.inputs do
        = product_order_lang.hidden_field :id
        = product_order_lang.hidden_field :lang
        = product_order_lang.input :title, :as => :string, :label => "Nom (#{product_order_lang.object.lang}) :"
        = product_order_lang.input :description, :label => "Descirption (#{product_order_lang.object.lang}) :"
        
    =form.input :price_ht, :label => "Prix (HT) :"
    
    %hr
    %h3
      Options
    %p= link_to_add_fields "Ajouter une ligne", form, :product_order_options 

    .product_order_options_form
      =form.semantic_fields_for :product_order_options do |form|
        =render :partial => "admin/product_order_options/form", :locals => {:form => form}
    %hr
    %h3 Tailles possibles :
    =form.input :product_order_sizes, :collection => ProductSize.where("archived is null").order(:position).all, :as => :check_boxes, :label => "Tailles"
        
  .actions
    = form.submit "Sauvegarder", :class => "btn btn-primary"
  