app/template/default/Block/search_form.twig line 1

Open in your IDE?
  1. {% block javascript %}
  2.     <script>
  3.     $(function() {
  4.         $(".product_btn_search").click(function(){
  5.             $(this).parent().submit();
  6.         });
  7.         $(".product_btn_del").click(function(){
  8.             $(".search-form-custom").find("input[type='text'], input[type='checkbox'], select").val("");
  9.             $(this).parent().submit();
  10.         });
  11.     });
  12.     </script>
  13. {% endblock %}
  14. <div class="ec-headerNaviRole__search">
  15.     {{ form_start(searchForm, {'method': 'GET', 'action': path('custom_product_search'), 'attr': {'class': 'search-form-custom product_form_search'}}) }}
  16.         <div class="ec-headerSearch__keyword">
  17.             <div class="ec-input">
  18.                 <p class="_title02">キーワード</p>
  19.                 <div class='cus-input-search'>
  20.                     {{ form_widget(searchForm.keyword, {
  21.                         'attr': {
  22.                             'class': 'form-control',
  23.                             'placeholder': ''
  24.                         }
  25.                     }) }}
  26.                     <button class="ec-headerSearch__keywordBtn" type="submit"></button>
  27.                 </div>
  28.             </div>
  29.         </div>
  30.         <h3 class="product_form_title {% if category %}active{% endif %}">
  31.             <span>カテゴリー</span>
  32.         </h3>
  33.         <ul class="product_form_checkbox" {% if category %}style="display:block"{% endif %}>
  34.             {% for category in searchForm.category %}
  35.             <li>
  36.             {{ form_widget(category, {
  37.                 'attr': {
  38.                     'class': 'form-check-input',
  39.                     'id': 'category_' ~ category.vars.value
  40.                 }
  41.             }) }}
  42.             </li>
  43.             {% endfor %}
  44.         </ul>
  45.         <h3 class="product_form_title _icon01 {% if category17 %}active{% endif %}">
  46.             <span>ライフスタイル</span>
  47.         </h3>
  48.         <ul class="product_form_checkbox" {% if category17  %}style="display:block"{% endif %}>
  49.             {% for category in searchForm.category_17 %}
  50.             <li>
  51.             {{ form_widget(category, {
  52.                 'attr': {
  53.                     'class': 'form-check-input',
  54.                     'id': 'category_' ~ category.vars.value
  55.                 }
  56.             }) }}
  57.             </li>
  58.             {% endfor %}
  59.         </ul>
  60.         <h3 class="product_form_title _icon02"><span>こだわり条件から探す</span></h3>
  61.         <p class="_title02">商品ステータス</p>
  62.         {{ form_widget(searchForm.category_19, {
  63.             'attr': {
  64.                 'class': 'product_form_select',
  65.             }
  66.         }) }}
  67.         
  68.         <p class="_title02">サイズ</p>
  69.         <ul class="product_size_checkbox">
  70.             {% for ClassCategory in searchForm.class_name_2 %}
  71.             <li>
  72.             {{ form_widget(ClassCategory, {
  73.                 'attr': {
  74.                     'class': 'form-check-input',
  75.                     'id': 'category_' ~ ClassCategory.vars.value
  76.                 }
  77.             }) }}
  78.             </li>
  79.             {% endfor %}
  80.         </ul>
  81.         <p class="_title02 icon01">塗装</p>
  82.         <ul class="product_coating_checkbox">
  83.             {% for category in searchForm.class_name_4 %}
  84.             <li>
  85.             {{ form_widget(category, {
  86.                 'attr': {
  87.                     'class': 'form-check-input',
  88.                     'id': 'category_' ~ category.vars.value
  89.                 }
  90.             }) }}
  91.             </li>
  92.             {% endfor %}
  93.         </ul>
  94.         <p class="_title02">ボディタイプ</p>
  95.         {{ form_widget(searchForm.class_name_3, {
  96.             'attr': {
  97.                 'class': 'product_form_select',
  98.             }
  99.         }) }}
  100.         
  101.         <p class="_title02">フレット数</p>
  102.         {{ form_widget(searchForm.class_name_1, {
  103.             'attr': {
  104.                 'class': 'product_form_select',
  105.             }
  106.         }) }}
  107.         <p class="_title02">ピックアップ</p>
  108.         {{ form_widget(searchForm.class_name_5, {
  109.             'attr': {
  110.                 'class': 'product_form_select',
  111.             }
  112.         }) }}
  113.         <p class="_title02">価格帯</p>
  114.         <div class="product_form_price">
  115.             {{ form_widget(searchForm.price_min, {
  116.                 'attr': {
  117.                     'class': 'product_form_select',
  118.                 }
  119.             }) }}
  120.             </select><span class="_yen">円</span><span class="_to">〜</span>
  121.             {{ form_widget(searchForm.price_max, {
  122.                 'attr': {
  123.                     'class': 'product_form_select',
  124.                 }
  125.             }) }}
  126.             <span class="_yen">円</span>
  127.         </div>
  128.         <p class="product_btn_search">この条件で絞り込む</p>
  129.         <p class="product_btn_del">リセット</p>
  130.     {{ form_end(searchForm) }}
  131. </div>