#2621 OC - Listing SEO - Redirect chain

This commit is contained in:
Diatrex 2020-12-07 15:49:16 +03:00
parent 37688d824d
commit 8fac833881
2 changed files with 9 additions and 2 deletions

View File

@ -179,6 +179,7 @@ $(document).ready(function () {
});
$("#listFilterForm").submit(function(e) {
// Disable unselected inputs
const inputs = $('#listFilterForm :input');
[...inputs].forEach((input) => {
if (input.type === 'checkbox' || input.type === 'radio') {
@ -191,6 +192,11 @@ $("#listFilterForm").submit(function(e) {
}
}
});
// Disable country if city is selected
if ($('#listCityFilter').val()) {
$('#listCountryFilter').prop('disabled', true)
}
});
// Change view type

View File

@ -21,7 +21,8 @@
</span>
<i class="fas fa-sort-down float-right"></i>
</button>
<input name="country[]" value="{% if countrySlug %}{{ countrySlug.id }}{% else %}{{ params.param['country']|join(',') }}{% endif %}" type="hidden" multiple>
<input name="country[]" id="listCountryFilter" type="hidden" multiple
value="{% if countrySlug %}{{ countrySlug.id }}{% else %}{{ params.param['country']|join(',') }}{% endif %}">
</div>
<div class="col-12 px-0 py-1">
@ -45,7 +46,7 @@
<div class="text-muted selected-city">
<small>{{ selected_cities_name|join(',') }}</small>
</div>
<input name="city[]" type="hidden"
<input name="city[]" id="listCityFilter" type="hidden"
value="{% if citySlug %}{{ citySlug.id }}{% else %}{{ params.param['city']|join(',') }}{% endif %}">
</div>
<div class="col-12 px-0 py-1">