change algo get_address_point_ajax
This commit is contained in:
SDE
2023-07-21 15:06:12 +03:00
parent bb2bff9a40
commit 90da6ba84c
2 changed files with 3 additions and 1 deletions

View File

@@ -42,8 +42,10 @@ def get_address_point_ajax(request):
res_data_str_list = [] res_data_str_list = []
i = 0 i = 0
for item in res_data: for item in res_data:
item['index'] = i item['index'] = i
item['ctrl_name'] = data['ctrl_name']
res_data_str_list.append(render_to_string('widgets/w_ac_input_address_point.html', item)) res_data_str_list.append(render_to_string('widgets/w_ac_input_address_point.html', item))
i += 1 i += 1

View File

@@ -1,4 +1,4 @@
<div onclick="selectItemAddrPoint({{ id }}, {{ name }})" class="autocomplete-result" data-index="{{ index }}"> <div onclick="selectItemAddrPoint({{ id }}, '{{ name }}, {{ ctrl_name }}')" class="autocomplete-result" data-index="{{ index }}">
<div><b>{{ iata_code }}</b> - {{ name }}</div> <div><b>{{ iata_code }}</b> - {{ name }}</div>
<div class="autocomplete-location">{{ city__name }}, {{ city__country__name }}</div> <div class="autocomplete-location">{{ city__name }}, {{ city__country__name }}</div>
</div> </div>