Merge pull request #873 from openclassify/dia

#2957 General Bugs
This commit is contained in:
spektra2147 2020-12-21 16:00:17 +03:00 committed by GitHub
commit f3277d86c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -131,17 +131,17 @@ var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions)
function haritaIslem() {
var str = '';
if ($('select[name="' + countrySelectName + '"]').val() != "") {
str += $('select[name="' + countrySelectName + '"] :selected').text() + ' ';
if ($('select[name="' + countrySelectName + '"]').val()) {
str += $('select[name="' + countrySelectName + '"] :selected').first().text() + ' ';
}
if ($('select[name="' + citySelectName + '"]').val() != "") {
str += $('select[name="' + citySelectName + '"] :selected').text() + ' ';
if ($('select[name="' + citySelectName + '"]').val()) {
str += $('select[name="' + citySelectName + '"] :selected').first().text() + ' ';
}
if ($('select[name="' + districtSelectName + '"]').val() != "") {
str += $('select[name="' + districtSelectName + '"] :selected').text() + ' ';
if ($('select[name="' + districtSelectName + '"]').val()) {
str += $('select[name="' + districtSelectName + '"] :selected').first().text() + ' ';
}
if ($('select[name="' + neighborhoodSelectName + '"]').val() != "") {
str += $('select[name="' + neighborhoodSelectName + '"] :selected').text() + ' ';
if ($('select[name="' + neighborhoodSelectName + '"]').val()) {
str += $('select[name="' + neighborhoodSelectName + '"] :selected').first().text() + ' ';
}
if (!str) {

View File

@ -4,8 +4,9 @@
{{ content|raw }}
{% if form.mode == 'edit' %}
{% set entry = form.entry.setAttribute('cf_json', null) %}
<script>
const ad = JSON.parse(`{{ form.entry|json_encode|raw }}`)
const ad = JSON.parse(`{{ entry|json_encode|raw }}`)
</script>
{% endif %}
{% endblock %}