{% load static %} {% load i18n %} {% load extension_hooks %} {# ──────────────────────────────────────────────────────────────────── #} {# 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 %} {% if request.GET.contract_id %} {% elif request.POST.contract_id %} {% endif %}
{% translate "Asset" %}
{{ form.asset_category }} {{ form.asset_category.errors }}
{{ form.lon }}
{{ form.lat }}
0 0 0 0 0 0 {% if thematic.code == 'structures' %}
{{ initial_structure_label|default:'' }}
{{ initial_location_label|default:'' }}
{% elif thematic.code == 'trafficlights' %}
{{ initial_location_label|default:'' }}
{% elif thematic.code == 'controlcenters' %}
{{ initial_controlcenter_label|default:'' }}
{{ initial_location_label|default:'' }}
{% elif thematic.code == 'artworks' %}
{% elif thematic.code == 'nature' or thematic.code == 'water' %}
{{ initial_location_label|default:'' }}
{% if not inspection_config %} {% endif %}
{% elif thematic.code == 'roads' or thematic.code == 'publiclighting' or thematic.code == 'sign' or thematic.code == 'clean' %}
{{ initial_location_label|default:'' }}
{% elif thematic.code == 'its' %}
{{ initial_location_label|default:'' }}
{% 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 }}
{% has_extension_slot "intervention_add_source_ref" as has_custom_source_ref %} {% if has_custom_source_ref %} {% render_extension_slot "intervention_add_source_ref" %} {% else %}
{{ form.source_ref }}
{% endif %} {% render_extension_slot "intervention_add_source_extra" %}
{% endif %} {% if maintain_type == 'corrective' or maintain_type == 'operational' %}
{% if maintain_type == 'operational' %}{% translate "Motif" %}{% else %}{% translate "Symptôme" %}{% endif %}
{{ form.symptom }} {{ form.symptom.errors }} {{ form.reflex_sheet }}
{{ form.priority }} {{ form.priority.errors }}
{% translate "Attention : vérifiez bien la priorité pour ce symptôme" %}
{% if maintain_type == 'operational' %} {{ form.origin_type }} {% else %}
{{ form.origin_type }} {{ form.origin_type.errors }}
{% endif %}
{{ form.type }} {{ form.type.errors }}
{{ form.sub_type }} {{ form.sub_type.errors }}
{% render_extension_slot "intervention_add_symptom_extra" %}
{% 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 }}
{% render_extension_slot "intervention_add_description_extra" %}
{% 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 }}
    {% translate "Prestataire" %}
    {{ form.assigned_provider }} {{ form.assigned_provider.errors }}
    {% translate "Contact d'urgence :" %}
    {% translate "Déduit automatiquement selon le symptôme, l'équipement ou la localisation, modifiable au besoin." %}