{% load static %} {% load i18n %} {# ──────────────────────────────────────────────────────────────────── #} {# Shared form body — included by both intervention_add.html (desktop) #} {# and intervention_add_mobile.html (mobile). #} {# Expected context: form, thematic, maintain_type, #} {# redirect_to_project, observation, observation_photos #} {# ──────────────────────────────────────────────────────────────────── #}
{% csrf_token %} {% if inspection_config %} {% endif %} {{ form.non_field_errors }}
{% if redirect_to_project %} {% endif %}
{% translate "Asset" %}
{{ form.asset_category }} {{ form.asset_category.errors }}
{{ form.lon }}
{{ form.lat }}
0 0 0 0 0 0 {% if thematic.code == 'structures' %}
{% elif thematic.code == 'trafficlights' %}
{% elif thematic.code == 'controlcenters' %}
{% elif thematic.code == 'artworks' %}
{% elif thematic.code == 'nature' or thematic.code == 'water' %}
{% if not inspection_config %} {% endif %}
{% elif thematic.code == 'roads' or thematic.code == 'publiclighting' or thematic.code == 'sign' or thematic.code == 'clean' %}
{% elif thematic.code == 'its' %}
{% else %}
{% endif %}
{% translate "Localisation GPS en cours..." %}
{{ form.maintain_type }} {% if maintain_type == 'corrective' %}
{% translate "Source" %}
{{ form.maintain_type }}
{{ form.source_category }}
{{ form.source_detail }}
{{ form.source_ref }}
{% translate "Symptôme" %}
{{ form.symptom }} {{ form.symptom.errors }}
{{ form.priority }} {{ form.priority.errors }}
{% translate "Attention : vérifiez bien la priorité pour ce symptôme" %}
{{ form.origin_type }} {{ form.origin_type.errors }}
{{ form.type }} {{ form.type.errors }}
{% endif %} {% if maintain_type == "ameliorative" %}
{{ form.priority }}
{{ form.project }}
{{ form.origin_type }} {% endif %}
{% translate "Description de l'intervention" %}
{{ form.title }} {{ form.title.errors }}
{{ form.init_description }}
{% if not form.status.is_hidden %}
{% translate "Statut" %}
{% for status_val, status_lbl in form.fields.status.choices %} {% endfor %}
{{ form.status }}
{{ form.status.errors }}
{% else %} {{ form.status }} {% endif %}
{% translate "Documents" %}
{% if observation_photos %}
{% for ph in observation_photos %}
obs photo {{ ph.id }}
{% endfor %}
{% if observation %} {% endif %}
{% endif %}
{{ form.documents }}