mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
parent
cdd7f81857
commit
e3cf2a68be
@ -42,7 +42,6 @@
|
|||||||
<script>
|
<script>
|
||||||
var select_trans = "{{ trans('visiosoft.module.advs::field.pick_option') }}";
|
var select_trans = "{{ trans('visiosoft.module.advs::field.pick_option') }}";
|
||||||
var searchedCountry = {{ searchedCountry }};
|
var searchedCountry = {{ searchedCountry }};
|
||||||
var useDefault = {{ useDefault }};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% if entries('advs').isEnabled('favs') %}
|
{% if entries('advs').isEnabled('favs') %}
|
||||||
|
|||||||
@ -147,10 +147,15 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
$param = $this->requestHttp->toArray();
|
$param = $this->requestHttp->toArray();
|
||||||
if (!isset($param['country'])) {
|
if (!isset($param['country'])) {
|
||||||
$param['country'] = setting_value('visiosoft.module.advs::default_country');
|
if (is_null(Cookie::get('country'))) {
|
||||||
$useDefault = 1;
|
$param['country'] = setting_value('visiosoft.module.advs::default_country');
|
||||||
|
} else {
|
||||||
|
$param['country'] = Cookie::get('country');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$useDefault = 0;
|
if ($param['country'] != setting_value('visiosoft.module.advs::default_country')) {
|
||||||
|
Cookie::queue(Cookie::make('country', $param['country'], 84000));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$searchedCountry = $param['country'];
|
$searchedCountry = $param['country'];
|
||||||
|
|
||||||
@ -220,7 +225,7 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'textfields', 'checkboxes', 'request',
|
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'textfields', 'checkboxes', 'request',
|
||||||
'user', 'userProfile', 'featured_advs', 'type', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'useDefault');
|
'user', 'userProfile', 'featured_advs', 'type', 'topfields', 'ranges', 'seenList', 'searchedCountry');
|
||||||
|
|
||||||
Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000));
|
Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000));
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ FindLocations = (id, table, typeDb, divId, paramName = null) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Set selected country in the select menu
|
// Set selected country in the select menu
|
||||||
if (useDefault) {
|
if (searchParams.get('country') == null) {
|
||||||
$('#cities').empty();
|
$('#cities').empty();
|
||||||
var table = "cities";
|
var table = "cities";
|
||||||
var typeDb = 'parent_country_id';
|
var typeDb = 'parent_country_id';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user