{% extends "qommon/forms/widget.html" %}

{% 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>
{% endblock %}
