loko/streetup/documents/templates/documents/document_confirm_delete.html
2026-07-22 14:48:40 +02:00

60 lines
3 KiB
HTML

{% extends "documents/base_documents.html" %}
{% load i18n %}
{% block content %}
<div class="container-fluid py-4">
<h2 class="mb-3">{% blocktranslate %}Delete document "{{ document.title }}"{% endblocktranslate %}</h2>
<p class="lead">{% translate "This action will permanently delete the document and all its versions. This action cannot be undone." %}</p>
{% if document.latest_version %}
<div class="alert alert-warning">
<strong>{% translate "Current version:" %}</strong> {{ document.latest_version.filename }}
<br>
<strong>{% translate "Number of versions:" %}</strong> {{ document.versions.count }}
</div>
{% endif %}
<form method="post">
{% csrf_token %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}">
{% endif %}
{% if is_dxf %}
<div class="card mb-4 border-warning">
<div class="card-header bg-warning-subtle text-warning-emphasis">
<h5 class="mb-0 small font-weight-bold" style="font-size: 0.9rem;"><i class="bi bi-exclamation-triangle"></i> {% translate "Options de suppression complémentaires (DXF)" %}</h5>
</div>
<div class="card-body">
{% if has_overlay %}
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" name="delete_overlay" id="delete_overlay" checked>
<label class="form-check-label text-dark small" for="delete_overlay">
{% translate "Supprimer également l'image géolocalisée associée (.overlay.png)" %}
</label>
</div>
{% endif %}
{% if imported_poles_count > 0 %}
<div class="form-check">
<input class="form-check-input" type="checkbox" name="delete_vectors" id="delete_vectors" checked>
<label class="form-check-label text-dark small" for="delete_vectors">
{% blocktranslate %}Supprimer également les couches vectorielles sauvegardées ({{ imported_poles_count }} poteaux et leurs équipements associés){% endblocktranslate %}
</label>
</div>
{% endif %}
</div>
</div>
{% endif %}
<div class="d-flex gap-2">
<button type="submit" class="btn btn-danger">
<i class="bi bi-trash"></i> {% translate "Delete permanently" %}
</button>
{% if next %}
<a class="btn btn-outline-secondary" href="{{ next }}">{% translate "Cancel" %}</a>
{% else %}
<a class="btn btn-outline-secondary" href="{{ document.get_absolute_url }}">{% translate "Cancel" %}</a>
{% endif %}
</div>
</form>
</div>
{% endblock content %}