toodego/villeurbanne: adapt custom map.html template for search (#78115) #298

Merged
fpeters merged 1 commits from wip/78115-toodego-villeurbanne-map into main 2023-06-02 10:52:00 +02:00
2 changed files with 4 additions and 12 deletions

View File

@ -3,16 +3,7 @@
{% block widget-title %}
{% endblock %}
{% block widget-control %}
<input type="hidden" name="{{widget.name}}$latlng" {% if widget.value %}value="{{widget.value}}"{% endif %}>
<div id="map-{{widget.name}}" class="qommon-map"
{% if widget.readonly %}data-readonly="true"{% endif %}
{% if widget.sync_map_and_address_fields %}data-address-sync="true"{% endif %}
{% for key, value in widget.map_attributes.items %}{{key}}="{{value}}" {% endfor %}
{% if widget.initial_position %}
data-init-lat="{{ widget.initial_position.lat }}"
data-init-lng="{{ widget.initial_position.lng }}"
{% endif %}
{% block widget-control-attributes %}{% endblock %}
></div>
{% block widget-content %}
{# must be repeated here as it's expected to exist when rendering view values #}
{{ block.super }}
{% endblock %}

View File

@ -15,6 +15,7 @@
data-init-lat="{{ widget.initial_position.lat }}"
data-init-lng="{{ widget.initial_position.lng }}"
{% endif %}
data-search-url="{% url 'api-geocoding' %}"
{% block widget-control-attributes %}{% endblock %}
></div>
{% endblock %}