HH/templates/surveys/template_confirm_delete.html
2026-03-28 14:03:56 +03:00

139 lines
4.6 KiB
HTML

{% extends "layouts/base.html" %}
{% load i18n %}
{% block title %}{% trans "Delete Survey Template" %} - PX360{% endblock %}
{% block extra_css %}
<style>
.page-header-gradient {
background: linear-gradient(135deg, #005696 0%, #0069a8 50%, #007bbd 100%);
color: white;
padding: 1.5rem 2rem;
border-radius: 1rem;
margin-bottom: 1.5rem;
box-shadow: 0 10px 15px -3px rgba(0, 86, 150, 0.2);
}
.form-section {
background: #fff;
border: 2px solid #e2e8f0;
border-radius: 1rem;
padding: 1.5rem;
margin-bottom: 1.5rem;
transition: all 0.3s ease;
}
.form-section:hover {
border-color: #005696;
box-shadow: 0 4px 12px rgba(0, 86, 150, 0.1);
}
.btn-primary {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
background: #005696;
color: white;
border-radius: 0.75rem;
font-weight: 600;
transition: all 0.2s ease;
border: none;
cursor: pointer;
}
.btn-primary:hover {
background: #007bbd;
}
.btn-secondary {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
background: white;
color: #64748b;
border: 2px solid #e2e8f0;
border-radius: 0.75rem;
font-weight: 600;
transition: all 0.2s ease;
}
.btn-secondary:hover {
background: #f1f5f9;
border-color: #005696;
}
</style>
{% endblock %}
{% block content %}
<div class="p-6">
<!-- Page Header -->
<div class="page-header-gradient">
<div class="flex justify-between items-center">
<div>
<h1 class="text-2xl font-bold flex items-center gap-3">
<i data-lucide="trash-2" class="w-6 h-6"></i>
{% trans "Delete Survey Template" %}
</h1>
<p class="text-blue-100 text-sm mt-1">{% trans "Confirm deletion of survey template" %}</p>
</div>
<a href="{% url 'surveys:template_list' %}" class="btn-secondary bg-white/10 border-white/30 text-white hover:bg-white hover:text-navy">
<i data-lucide="arrow-left" class="w-4 h-4"></i>
{% trans "Back to Templates" %}
</a>
</div>
</div>
<!-- Warning Section -->
<div class="form-section">
<div class="flex items-center gap-3 mb-6 pb-4 border-b border-slate-200">
<div class="w-12 h-12 bg-red-100 rounded-full flex items-center justify-center">
<i data-lucide="alert-triangle" class="w-6 h-6 text-red-600"></i>
</div>
<div>
<h2 class="text-lg font-bold text-navy">{% trans "Warning: This action cannot be undone" %}</h2>
<p class="text-sm text-slate">{% trans "All associated data will be permanently deleted" %}</p>
</div>
</div>
<div class="bg-red-50 border border-red-200 rounded-xl p-5 mb-6">
<h3 class="font-bold text-red-800 mb-3">{% trans "The following will be deleted:" %}</h3>
<ul class="space-y-2 text-sm text-red-700">
<li class="flex items-center gap-2">
<i data-lucide="file-text" class="w-4 h-4 flex-shrink-0"></i>
{% trans "Survey template" %}: <strong>{{ template.name }}</strong>
</li>
<li class="flex items-center gap-2">
<i data-lucide="list-ordered" class="w-4 h-4 flex-shrink-0"></i>
{% trans "All questions associated with this template" %}
</li>
<li class="flex items-center gap-2">
<i data-lucide="clipboard-check" class="w-4 h-4 flex-shrink-0"></i>
{% trans "All survey instances and responses linked to this template" %}
</li>
</ul>
</div>
<form method="post">
{% csrf_token %}
<div class="flex justify-between items-center">
<a href="{% url 'surveys:template_detail' template.pk %}" class="btn-secondary">
<i data-lucide="arrow-left" class="w-4 h-4"></i>
{% trans "Cancel" %}
</a>
<button type="submit" class="px-4 py-2.5 bg-red-600 text-white rounded-xl font-semibold hover:bg-red-700 transition inline-flex items-center gap-2">
<i data-lucide="trash-2" class="w-4 h-4"></i>
{% trans "Delete Template" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %}
{% block extra_js %}
<script>
document.addEventListener('DOMContentLoaded', function() {
lucide.createIcons();
});
</script>
{% endblock %}