.recherche_filtre
  -params[:search] = params[:search] || []
  -params[:search][:m_event_type_title] = params[:search][:m_event_type_title] || []

  .centre_filtre
    %h4 Trouvez votre journée sur circuit

    =form_tag public_m_events_path, :method => "get",  :onsubmit => "" do

      %p
        
        .select.inline_large_input=select_tag "search[circuit_region_id]", option_groups_from_collection_for_select(CircuitRegionCat.all, :circuit_regions, :name, :id, :name, params[:search][:circuit_region_id]), :class => "", :include_blank => "Région"

        .select.inline_large_input=select_tag "search[circuit_id]", options_for_select([["Circuit",""]]+Circuit.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:circuit_id]), :place_holder => ""

        .select.inline_large_input=select_tag "search[organisateur_id]", options_for_select([["Organisateur",""]]+Organisateur.where(:public => true).order(:name).all.map{|a| [a.name, a.id]}, params[:search][:organisateur_id]), :place_holder => ""


      .no-mobile.right{:style => "position:relative;top:10px;"}
        =submit_tag "Rechercher", :class => "submit"

      %p


        =text_field_tag :start, params[:start],:class => "form-control datepicker date inline_input", :placeholder => "Début"


        =text_field_tag :stop, params[:stop],:class => "form-control datepicker date inline_input ", :placeholder => "Fin"




      %p.inline_check_boxes
        %strong Type de journée :


        -["Ecole / Stage de pilotage", "Roulage encadré", "Roulage libre"] .each do |pdt|

          = check_box_tag :"search[m_event_type_title][]", pdt, (true if params[:search][:m_event_type_title].include?(pdt.to_s)), {:id => "p_document_type_ids_#{pdt.to_slug}"}
          = label_tag "p_document_type_ids_"+pdt.to_slug, pdt

      .clear

      .mobile-block
        =submit_tag "Rechercher", :class => "submit"
