  <div id="filter">
    <div class="title filter-box">
      <%= t('suppliers_plugin.views.product.index.filter') %>
    </div>

    <% form_remote_tag :update => 'search-results',:loading => "distribution.setLoading('filter');", :loaded => "distribution.unsetLoading('filter');", :url => {:action => :index}, :html => {:id => 'filter-form'}, :method => :get do %>

      <div class="fields filter-box">

        <% if type == :supplier %>
          <%= render :partial => 'suppliers_plugin_myprofile/filter_fields' %>
        <% elsif type == :product %>
          <%= render :partial => 'suppliers_plugin_product/filter_fields' %>
        <% end %>

        <div class="clean"></div>
      </div>
      <div class="clean"></div>
      <div class="submit filter-box">
        <%= submit_tag t('suppliers_plugin.views.product.index.filter_it'), :onclick => "var field = this; function name_form_submit() {field.form.onsubmit();}; setTimeout(name_form_submit, 300);" %>
      </div>
  <% end %>

</div>


Create shared partial for filter
[suppliers] Create shared partial for filter
