konova/templates/map/geom_form.html
mpeltriaux 5e65b8f4dc # Geometry error message fix
* fixes bug where errors on geometry form were not rendered properly
* fixes bug where invalid geometry was written as read-only back into form (could not be corrected by user)
* adds explanatory comments to SimpleGeomForm is_valid() checks
* reorders code snippets for better understanding
* adds correcting logic to _set_geojson_properties() in case of missing properties element
2025-11-28 11:43:17 +01:00

28 lines
724 B
HTML

{% load i18n fontawesome_5 %}
{% comment %}
Encapsules the rendering and initializing of a geometry view component, e.g. used in the detail views.
{% endcomment %}
{% if geom_form.empty and geom_form.read_only %}
<div class="w-100">
<div class="alert alert-danger">
{% fa5_icon 'search-location' %}
{% trans 'No geometry added, yet.' %}
</div>
</div>
{% endif %}
{% if geom_form.output.errors %}
<div class="alert-danger p-2">
{% for error in geom_form.output.errors %}
<strong class="invalid">{{ error }}</strong>
<br>
{% endfor %}
</div>
{% endif %}
<div style="height: 85vh">
{% include 'map/client/index.html' %}
</div>