<div id="searchFormContainer" class="searchFormContainer">
<div class="filterHeader visible-sm visible-xs">
<div class="sectionContainer">
<button type="button" class="btnReset {% if app.request.get('_locale') == 'ar' %}right{% else %}left{% endif %}" id="reset-compound-planner">
{{ 'layout.compound_planner.filters'|trans }}
</button>
<button class="btnCancel
{% if app.request.get('_locale') == 'ar' %}left{% else %}right{% endif %}" onclick="closeCompoundFilter('searchFormContainer')">
{{ 'layout.compound_planner.cancel'|trans }}
</button>
</div>
</div>
<div class="searchBox" ng-cloak ng-controller="compoundPlannerController">
{% set cachedCompoundsLocations = cachedCompoundsData['cachedCompoundsLocations'] %}
{% set cachedPropertyTypes = cachedCompoundsData['cachedPropertyTypes'] %}
{{ form_start(compoundSearchForm, {attr: {'ng-content-loaded': '', 'callback': 'init();setCheckedCompoundLocations('~checkedCompoundLocations | json_encode()~');setCheckedPropertyTypes('~checkedPropertyTypes | json_encode()~'); setCompoundLocations('~cachedCompoundsLocations~');setPropertyTypes('~cachedPropertyTypes~');', 'class': 'compound-planner-form'}}) }}
{% set compoundLocationFilter = app.request.query.get("compoundLocations") %}
{% set propertyTypesFilter = app.request.query.get("propertyTypes") %}
{% set priceLevel = app.request.query.get("priceLevels") %}
{% set compoundStatus = app.request.query.get("compoundStatus") %}
{% set keywordFilter = app.request.query.get("keywords") %}
{% set finishType = app.request.query.get("finishTypes") %}
{% set paymentMethod = app.request.query.get("paymentMethods") %}
{% set developerExperience = app.request.query.get("developerExperience") %}
{% set deliveryYears = app.request.query.get("deliveryYears") %}
{#Location#}
<div class="search-form">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if compoundLocationFilter == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#LocationsContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.locations'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
<div id="LocationsContainer" class="panel-collapse collapse {% if compoundLocationFilter != null%}show{% endif %}" aria-expanded="true">
<div class="panel-body marginTop15">
{{ form_widget(compoundSearchForm.compoundLocation, {attr: {'value': 'ng::getCheckedCompoundLocations()::'}}) }}
<tree-view class="w-100" depth="3" model="getCompoundLocations()" key="compoundLocation" callback-fn="toggleTick(item, key)"></tree-view>
</div>
</div>
</div>
</div>
</div>
</div>
{#Property Types#}
<div class="search-form">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if propertyTypesFilter == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#PropertyTypesContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.property_types'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
{% set propertyTypesHideFrom = 5 %}
<div id="PropertyTypesContainer" class="panel-collapse collapse {% if propertyTypesFilter != null %}show{% endif %} nestedContainer" data-hidestartfrom="{{ propertyTypesHideFrom }}" aria-expanded="true">
<div class="panel-body marginTop15">
{{ form_widget(compoundSearchForm.propertyTypes, {attr: {'value': 'ng::getCheckedPropertyTypes()::'}}) }}
<tree-view class="w-100" depth="3" model="getPropertyTypes()" key="propertyType" callback-fn="toggleTick(item, key)"></tree-view>
</div>
</div>
</div>
</div>
</div>
</div>
{#Get range sliders values from url#}
{% set areaRange = app.request.get('areaRange') | default("0,0") | split(',') %}
{% set areaFrom = areaRange[0] %}
{% set areaTo = areaRange[1] %}
{% set priceRange = app.request.get('priceRange') | default("0,0") | split(',') %}
{% set priceFrom = priceRange[0] %}
{% set priceTo = priceRange[1] %}
{% set priceMeterRange = app.request.get('priceMeterRange') | default("0,0") | split(',') %}
{% set priceMeterFrom = priceMeterRange[0] %}
{% set priceMeterTo = priceMeterRange[1] %}
{#price Level#}
<div class="search-form">
<div class="form-section">
<div class="page-header tab-content">
<div class="panel tab-pane active show" id="price_level">
<div class="btn-collapse-container {% if priceLevel == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#PriceLevelContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.price_level'|trans }}</label>
<a class="btn_collapse btn_float">
<span class="btn-minus"></span>
</a>
</div>
<div id="PriceLevelContainer" class="panel-collapse collapse {% if priceLevel != null %}show{% endif %}" aria-expanded="true" ng-cloak>
<div class="panel-body marginTop15">
{% set selectedPriceLevels = app.request.get('priceLevels') | json_encode()%}
<ul class="unstyled padding-0" ng-content-loaded callback="initFilter('priceLevel', {{selectedPriceLevels}})">
{% for p in compoundSearchForm.priceLevel|keys %}
{% set index = compoundSearchForm.priceLevel.vars.choices[p].value %}
<li>
{{form_widget(attribute(compoundSearchForm.priceLevel,p),
{attr: {'class': 'styled-checkbox', 'ng-model': 'priceLevel[' ~ index ~ ']', 'ng-true-value': "'" ~ index ~ "'", 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.priceLevel[' ~ index ~ '] ? "" : "disabled" '}}
) }}
{% if 'token' not in form_label(attribute(compoundSearchForm.priceLevel,p)) %}
{{form_label(attribute(compoundSearchForm.priceLevel,p)) }}
<span ng-class="filtersFeedback.priceLevel[{{index}}] ? '' : 'disabled'">{{ '(ng::filtersFeedback.priceLevel[' ~ index ~ '] || 0::)' }}</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{#Status#}
<div class="search-form moreFilter">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if compoundStatus == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#StatusContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.status'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
<div id="StatusContainer" class="panel-collapse collapse {% if compoundStatus != null%}show{% endif %}" aria-expanded="true" ng-cloak>
<div class="panel-body marginTop15">
{% set selectedCompoundStatus = app.request.get('compoundStatus') | json_encode() %}
<ul class="unstyled padding-0" ng-content-loaded callback="initFilter('compoundStatus', {{selectedCompoundStatus}})">
{% for c in compoundSearchForm.compoundStatus|keys %}
{% set index = compoundSearchForm.compoundStatus.vars.choices[c].value %}
<li>
{{form_widget(attribute(compoundSearchForm.compoundStatus,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'compoundStatus[' ~ index ~ ']', 'ng-true-value': "'" ~ index ~ "'", 'ng-false-value': '0', 'ng-change': 'getCountFeedback()', 'ng-class': 'filtersFeedback.compoundStatus[' ~ index ~ '] ? "" : "disabled" '}}) }}
{% if 'token' not in form_label(attribute(compoundSearchForm.compoundStatus,c)) %}
{{form_label(attribute(compoundSearchForm.compoundStatus,c)) }}
<span ng-class="filtersFeedback.compoundStatus[{{index}}] ? '' : 'disabled'">{{ '(ng::filtersFeedback.compoundStatus[' ~ index ~ '] || 0::)' }}</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{#finish type#}
<div class="search-form moreFilter">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if finishType == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#FinishTypeContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.finish_type'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
<div id="FinishTypeContainer" class="panel-collapse collapse {% if finishType != null %}show{% endif %}" aria-expanded="true" ng-cloak>
<div class="panel-body marginTop15">
{% set selectedFinishType = app.request.get('finishTypes') | json_encode() %}
<ul class="unstyled padding-0" ng-content-loaded callback="initFilter('finishType', {{selectedFinishType}})">
{% for c in compoundSearchForm.finishType|keys %}
{% set index = compoundSearchForm.finishType.vars.choices[c].value %}
<li>
{{form_widget(attribute(compoundSearchForm.finishType,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'finishType.'~index, 'ng-true-value': "'" ~ index ~ "'" , 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.finishType.' ~ index ~ ' ? "" : "disabled" '}}) }}
{% if 'token' not in form_label(attribute(compoundSearchForm.finishType,c)) %}
{{form_label(attribute(compoundSearchForm.finishType,c), index|trans) }}
<span ng-class="filtersFeedback.finishType.{{index}} ? '' : 'disabled'">
{{ '(ng::filtersFeedback.finishType.' ~ index ~ ' || 0::)' }}
</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{#Payment Method#}
<div class="search-form moreFilter">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if paymentMethod == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#PaymentMethodContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.payment_method'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
<div id="PaymentMethodContainer" class="panel-collapse collapse {% if paymentMethod != null %}show{% endif %}" aria-expanded="true" ng-cloak>
<div class="panel-body marginTop15">
{% set selectedPaymentMethod = app.request.get('paymentMethods') | json_encode() %}
<ul class="unstyled padding-0" ng-content-loaded callback="initFilter('paymentMethod', {{selectedPaymentMethod}})">
{% for method in compoundSearchForm.paymentMethod|keys %}
{% set index = compoundSearchForm.paymentMethod.vars.choices[method].value %}
<li>
{{form_widget(attribute(compoundSearchForm.paymentMethod,method), {attr: {'class': 'styled-checkbox', 'ng-model': 'paymentMethod[' ~ index ~ ']', 'ng-true-value': "'" ~ index ~ "'", 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.paymentMethod[' ~ index ~ '] ? "" : "disabled" '}}) }}
{% if 'token' not in form_label(attribute(compoundSearchForm.paymentMethod,method)) %}
{{form_label(attribute(compoundSearchForm.paymentMethod,method)) }}
<span ng-class="filtersFeedback.paymentMethod[{{index}}] ? '' : 'disabled'">
{{ '(ng::filtersFeedback.paymentMethod[' ~ index ~ '] || 0::)' }}
</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{# Developer Experience #}
<div class="search-form moreFilter">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if developerExperience == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#DeveloperExperienceContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.developer_experience'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
<div id="DeveloperExperienceContainer" class="panel-collapse collapse {% if developerExperience != null %}show{% endif %}" aria-expanded="true" ng-cloak>
<div class="panel-body marginTop15">
{% set selectedDeveloperExperience = app.request.get('developerExperience') | json_encode() %}
<ul class="unstyled padding-0" ng-content-loaded callback="initFilter('developerExperiences', {{ selectedDeveloperExperience }})">
{% for c in compoundSearchForm.developerExperience|keys %}
{% set index = compoundSearchForm.developerExperience.vars.choices[c].value %}
<li>
{{ form_widget(attribute(compoundSearchForm.developerExperience,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'developerExperiences.'~index, 'ng-true-value': "'" ~ index ~ "'" , 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.' ~ index ~ ' ? "" : "" '}}) }}
{% if 'token' not in form_label(attribute(compoundSearchForm.developerExperience,c)) %}
{{ form_label(attribute(compoundSearchForm.developerExperience,c)) }}
<span ng-class="filtersFeedback.{{ index }} ? '' : 'disabled'">
{{ '(ng::filtersFeedback.' ~ index ~ ' || 0::)' }}
</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{# Deleviery Year Experience #}
<div class="search-form moreFilter">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a class="btn-collapse-container {% if deliveryYears == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#deliveryYearContainer" aria-expanded="true">
<label>{{ 'layout.compound_planner.delivery_year'|trans }}</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
<div id="deliveryYearContainer" class="panel-collapse collapse {% if deliveryYears != null %}show{% endif %}" aria-expanded="true" ng-cloak>
<div class="panel-body marginTop15">
{% set selectedDeliveryYears = deliveryYears| json_encode() %}
<ul class="unstyled padding-0" ng-content-loaded callback="initFilter('deliveryYears', {{ selectedDeliveryYears }})">
{% for c in compoundSearchForm.deliveryYears|keys %}
{% set index = compoundSearchForm.deliveryYears.vars.choices[c].value %}
<li>
{{ form_widget(attribute(compoundSearchForm.deliveryYears,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'deliveryYears['~index~']', 'ng-true-value': "'" ~ index ~ "'" , 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.deliveryYears[' ~ index ~ '] ? "" : "" '}}) }}
{% if 'token' not in form_label(attribute(compoundSearchForm.deliveryYears,c)) %}
{{ form_label(attribute(compoundSearchForm.deliveryYears,c)) }}
<span ng-class="filtersFeedback.deliveryYears[{{ index }}]? '' : 'disabled'">
{{ '(ng::filtersFeedback.deliveryYears[' ~ index ~ '] || 0::)' }}
</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{#Keywords Search#}
<div class="search-form moreFilter">
<div class="form-section">
<div class="page-header">
<div class="panel">
<a id="compoundNameCollapseBtn" class="btn-collapse-container {% if keywordFilter == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#KeywordContainer" aria-expanded="true">
<label>
{{ get_setting('general', 'country') == 'SA' ? 'layout.compound_planner.search_for_ksa'|trans : 'layout.compound_planner.search_for'|trans }}
</label>
<label class="btn_collapse btn_float">
<span class="btn-minus"></span>
</label>
</a>
{% set selectedKeywords = app.request.get('keywords') | json_encode() %}
<div id="KeywordContainer" class="panel-collapse collapse {% if keywordFilter != null %}show{% endif %}" aria-expanded="true">
<div class="panel-body marginTop15 KeywordContainerContainer">
<div class="mapBin" ng-content-loaded callback="initKeywordFilter({{ selectedKeywords }})">
<i class="fa fa-search location-icon"></i>
</div>
<div class="drop-down-container">
{% set keyword_placeholder = get_setting('general', 'country') == 'SA' ? 'layout.compound_planner.search_for_placeholder_ksa'|trans : 'layout.compound_planner.search_for_placeholder'|trans %}
{{ form_widget(compoundSearchForm.keyword, {attr: {'class': 'select2-select', 'data-placeholder': keyword_placeholder, 'name': 'filters[]', 'ng-model': 'keyword', 'ng-change': 'getCountFeedback();'}}) }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="search-form last" ng-content-loaded callback="initFeedback();">
<div class="form-section">
<div class="page-header">
<div class="panel">
<div class="panel-collapse collapse show" aria-expanded="true" ng-cloak>
<div class="panel-body KeywordContainerContainer">
<div class="btnContainer">
<div class="btnlarge">
<button class="btn btn-blue-curved" type="submit">{{ 'layout.compound_planner.search'|trans }} <span>(ng::totalFeedback::)</span>
</button>
</div>
<div class="btnSmall">
{% if app.request.attributes.get('_route') == 'compound_search' or app.request.attributes.get('_route') == 'compound_search_with_location' %}
<a class="btn btn-white text-blue rounded-pill" id="reset-compound-planner" href="{{ path('compound_search') }}">{{ 'layout.compound_planner.reset'|trans }}</a>
{% else %}
<span class="btn btn-white text-blue rounded-pill reset-compound-planner" ng-click="resetValues();getCountFeedback();">
{{ 'layout.compound_planner.reset'|trans }}
</span>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(compoundSearchForm) }}
</div>
</div>