mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36:08 -06:00
location filter area country checked fixed
This commit is contained in:
parent
f207b63ceb
commit
9532e3aeb2
@ -19,8 +19,7 @@ $('.filter-country-btn').on('click', function () {
|
|||||||
$('.filter-location-modal .countries').html(null_msg);
|
$('.filter-location-modal .countries').html(null_msg);
|
||||||
else if ($('input[name="country"]').val() != ""){
|
else if ($('input[name="country"]').val() != ""){
|
||||||
$.each(selected__country_request.split(','), function (index, value){
|
$.each(selected__country_request.split(','), function (index, value){
|
||||||
console.log(value.trim())
|
$(".filter-location-body .countries li[data-id='" + value.trim() + "'] input[type='checkbox']").prop('checked', true);
|
||||||
$(".filter-location-body .countries li[data-id='" + value.trim() + "'] input[type='checkbox']")
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
@ -205,8 +204,8 @@ function SelectOnClick() {
|
|||||||
if ($(this).attr('data-field') == "country") {
|
if ($(this).attr('data-field') == "country") {
|
||||||
$('.selected-city').html('');
|
$('.selected-city').html('');
|
||||||
$('input[name="city[]"]').val('');
|
$('input[name="city[]"]').val('');
|
||||||
text_html.html(input_text)
|
// text_html.html(input_text)
|
||||||
$(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
// $(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (input_val != "") {
|
if (input_val != "") {
|
||||||
@ -258,7 +257,7 @@ function item(field_name, id, value, abv = '') {
|
|||||||
} else {
|
} else {
|
||||||
return '<li class="px-2" data-id="' + id + '">\n' +
|
return '<li class="px-2" data-id="' + id + '">\n' +
|
||||||
' <label class="w-100">\n' +
|
' <label class="w-100">\n' +
|
||||||
' <input type="checkbox" data-field="' + field_name + '" data-id="' + id + '" '+ selected +'>\n' +
|
' <input type="checkbox" data-field="' + field_name + '" data-id="' + id + '">\n' +
|
||||||
' <small>' + value + '</small>\n' +
|
' <small>' + value + '</small>\n' +
|
||||||
' </label>\n' +
|
' </label>\n' +
|
||||||
' </li>';
|
' </li>';
|
||||||
|
|||||||
@ -6,6 +6,10 @@
|
|||||||
{% if selectedCountry %}
|
{% if selectedCountry %}
|
||||||
{% set countryName = getCountry(selectedCountry).name %}
|
{% set countryName = getCountry(selectedCountry).name %}
|
||||||
{% set countryValue = defaultCountry == selectedCountry ? '' : selectedCountry %}
|
{% set countryValue = defaultCountry == selectedCountry ? '' : selectedCountry %}
|
||||||
|
{% set selected_countries_name = [] %}
|
||||||
|
{% for selectedCountry in selectedCountry[0]|split(',') %}
|
||||||
|
{% set selected_countries_name = selected_countries_name|merge([getCountry(selectedCountry|trim(',')).name]) %}
|
||||||
|
{% endfor %}
|
||||||
{% elseif defaultCountry %}
|
{% elseif defaultCountry %}
|
||||||
{% set countryName = getCountry(defaultCountry).name %}
|
{% set countryName = getCountry(defaultCountry).name %}
|
||||||
{% set countryValue = defaultCountry %}
|
{% set countryValue = defaultCountry %}
|
||||||
@ -17,7 +21,7 @@
|
|||||||
data-toggle="modal">
|
data-toggle="modal">
|
||||||
<span class="float-left">
|
<span class="float-left">
|
||||||
{{ trans("visiosoft.module.location::field.country.name") }}
|
{{ trans("visiosoft.module.location::field.country.name") }}
|
||||||
<small class="text-muted selected-country">{{ countryName }}</small>
|
<small class="text-muted selected-country">{{ countryName }} {{ selected_countries_name|join(',') }}</small>
|
||||||
</span>
|
</span>
|
||||||
<i class="fas fa-sort-down float-right"></i>
|
<i class="fas fa-sort-down float-right"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -122,7 +122,7 @@
|
|||||||
<label class="control-label font-weight-bold">
|
<label class="control-label font-weight-bold">
|
||||||
{{ profileForm.fields.gsm_phone.label }}
|
{{ profileForm.fields.gsm_phone.label }}
|
||||||
</label>
|
</label>
|
||||||
{{ profileForm.fields.gsm_phone.input|raw }}
|
{{ profileForm.fields.gsm_phone.setAttributes({'maxlength': '14'}).input|raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<label class="control-label font-weight-bold">
|
<label class="control-label font-weight-bold">
|
||||||
{{ profileForm.fields.office_phone.label }}
|
{{ profileForm.fields.office_phone.label }}
|
||||||
</label>
|
</label>
|
||||||
{{ profileForm.fields.office_phone.input|raw }}
|
{{ profileForm.fields.office_phone.setAttributes({'maxlength': '14'}).input|raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<label class="control-label font-weight-bold">
|
<label class="control-label font-weight-bold">
|
||||||
{{ profileForm.fields.land_phone.label }}
|
{{ profileForm.fields.land_phone.label }}
|
||||||
</label>
|
</label>
|
||||||
{{ profileForm.fields.land_phone.input|raw }}
|
{{ profileForm.fields.land_phone.setAttributes({'maxlength': '14'}).input|raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<label class="control-label font-weight-bold">
|
<label class="control-label font-weight-bold">
|
||||||
{{ trans("visiosoft.module.profile::field.birthday.name") }}
|
{{ trans("visiosoft.module.profile::field.birthday.name") }}
|
||||||
</label>
|
</label>
|
||||||
{{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date('Y-m-d')).input|raw }}
|
{{ profileForm.fields.birthday.configSet('date_format','d.m.Y').setPlaceholder(now|date('d.m.Y')).input|raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user