Redisign filter
This commit is contained in:
parent
b8a5ade3e0
commit
9a9bbb310a
2 changed files with 9 additions and 14 deletions
|
@ -6,6 +6,7 @@ use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
class OfferFilterFormType extends AbstractType
|
class OfferFilterFormType extends AbstractType
|
||||||
|
@ -19,6 +20,7 @@ class OfferFilterFormType extends AbstractType
|
||||||
->add('distance', NumberType::class, [
|
->add('distance', NumberType::class, [
|
||||||
'label' => 'Distance',
|
'label' => 'Distance',
|
||||||
])
|
])
|
||||||
|
->add('Apply', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,21 +15,14 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<h2><i class="fas fa-filter"></i>Filter</h2>
|
<div class="mb-5">
|
||||||
{{ form_start(filter_form) }}
|
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
|
||||||
<div class="row">
|
<div class="btn btn-primary"><i class="fas fa-filter mr-3"></i>Filter<i class="fas fa-chevron-down ml-3 dropdown-collapse"></i></div>
|
||||||
<div class="col-sm">
|
</a>
|
||||||
{{ form_row(filter_form.zipCode) }}
|
<div class="collapse" id="collapseExample">
|
||||||
</div>
|
{{ form(filter_form) }}
|
||||||
<div class="col-sm">
|
|
||||||
{{ form_row(filter_form.distance) }}
|
|
||||||
</div>
|
|
||||||
<div class="col-sm">
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary">Filter</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ form_end(filter_form) }}
|
|
||||||
|
|
||||||
|
|
||||||
<h1>Offers</h1>
|
<h1>Offers</h1>
|
||||||
{% if offers|length > 0 %}
|
{% if offers|length > 0 %}
|
||||||
|
|
Reference in a new issue