mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -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);
|
||||
else if ($('input[name="country"]').val() != ""){
|
||||
$.each(selected__country_request.split(','), function (index, value){
|
||||
console.log(value.trim())
|
||||
$(".filter-location-body .countries li[data-id='" + value.trim() + "'] input[type='checkbox']")
|
||||
$(".filter-location-body .countries li[data-id='" + value.trim() + "'] input[type='checkbox']").prop('checked', true);
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
@ -205,8 +204,8 @@ function SelectOnClick() {
|
||||
if ($(this).attr('data-field') == "country") {
|
||||
$('.selected-city').html('');
|
||||
$('input[name="city[]"]').val('');
|
||||
text_html.html(input_text)
|
||||
$(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
||||
// text_html.html(input_text)
|
||||
// $(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
||||
|
||||
}
|
||||
if (input_val != "") {
|
||||
@ -258,7 +257,7 @@ function item(field_name, id, value, abv = '') {
|
||||
} else {
|
||||
return '<li class="px-2" data-id="' + id + '">\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' +
|
||||
' </label>\n' +
|
||||
' </li>';
|
||||
|
||||
@ -6,6 +6,10 @@
|
||||
{% if selectedCountry %}
|
||||
{% set countryName = getCountry(selectedCountry).name %}
|
||||
{% 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 %}
|
||||
{% set countryName = getCountry(defaultCountry).name %}
|
||||
{% set countryValue = defaultCountry %}
|
||||
@ -17,7 +21,7 @@
|
||||
data-toggle="modal">
|
||||
<span class="float-left">
|
||||
{{ 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>
|
||||
<i class="fas fa-sort-down float-right"></i>
|
||||
</button>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ profileForm.fields.gsm_phone.label }}
|
||||
</label>
|
||||
{{ profileForm.fields.gsm_phone.input|raw }}
|
||||
{{ profileForm.fields.gsm_phone.setAttributes({'maxlength': '14'}).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@ -130,7 +130,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ profileForm.fields.office_phone.label }}
|
||||
</label>
|
||||
{{ profileForm.fields.office_phone.input|raw }}
|
||||
{{ profileForm.fields.office_phone.setAttributes({'maxlength': '14'}).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@ -138,7 +138,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ profileForm.fields.land_phone.label }}
|
||||
</label>
|
||||
{{ profileForm.fields.land_phone.input|raw }}
|
||||
{{ profileForm.fields.land_phone.setAttributes({'maxlength': '14'}).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
@ -146,7 +146,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ trans("visiosoft.module.profile::field.birthday.name") }}
|
||||
</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 class="col-md-6">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user