123 lines
5.7 KiB
HTML
123 lines
5.7 KiB
HTML
{% extends 'layouts/base.html' %}
|
|
{% load i18n static %}
|
|
|
|
{% block title %}{% trans "Delete Standard" %} - {{ standard.code }}{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
:root {
|
|
--hh-navy: #005696;
|
|
--hh-blue: #007bbd;
|
|
--hh-light: #eef6fb;
|
|
--hh-slate: #64748b;
|
|
}
|
|
|
|
.page-header-gradient {
|
|
background: linear-gradient(135deg, var(--hh-navy) 0%, #0069a8 50%, var(--hh-blue) 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);
|
|
}
|
|
|
|
.section-card {
|
|
background: white;
|
|
border-radius: 1rem;
|
|
border: 2px solid #e2e8f0;
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
overflow: hidden;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-transition {
|
|
transition: all 0.2s ease-in-out;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="px-6 py-4">
|
|
<div class="page-header-gradient">
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<h1 class="text-2xl font-bold mb-1">{% trans "Delete Standard" %}</h1>
|
|
<p class="text-blue-100 text-sm">{{ standard.code }} - {{ standard.title }}</p>
|
|
</div>
|
|
<div class="flex gap-2">
|
|
<a href="{% url 'standards:standard_detail' pk=standard.pk %}"
|
|
class="btn-transition inline-flex items-center px-4 py-2.5 bg-white/10 border-2 border-white/30 text-white font-medium rounded-xl hover:bg-white hover:text-navy transition">
|
|
<i data-lucide="arrow-left" class="w-4 h-4 me-2"></i>{% trans "Back to Standard" %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="max-w-2xl mx-auto">
|
|
<div class="section-card">
|
|
<div class="p-6">
|
|
<div class="bg-red-50 border-l-4 border-red-400 p-4 mb-6 rounded-r-lg">
|
|
<div class="flex items-start">
|
|
<i data-lucide="alert-octagon" class="w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"></i>
|
|
<div class="ml-3">
|
|
<h3 class="text-sm font-semibold text-red-800">{% trans "Warning: This action cannot be undone" %}</h3>
|
|
<p class="text-sm text-red-700 mt-1">{% trans "Deleting this standard will permanently remove it from the system along with all associated compliance records and attachments." %}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3 class="text-lg font-semibold text-gray-900 mb-4">{% trans "Are you sure you want to delete this standard?" %}</h3>
|
|
|
|
<div class="bg-gray-50 rounded-lg p-4 mb-6">
|
|
<dl class="divide-y divide-gray-200">
|
|
<div class="py-3">
|
|
<dt class="text-xs font-medium text-gray-500 mb-1">{% trans "Standard Code" %}</dt>
|
|
<dd class="text-sm font-semibold text-gray-900">{{ standard.code }}</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-xs font-medium text-gray-500 mb-1">{% trans "Title" %}</dt>
|
|
<dd class="text-sm text-gray-900">{{ standard.title }}</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-xs font-medium text-gray-500 mb-1">{% trans "Source" %}</dt>
|
|
<dd class="text-sm text-gray-900">{{ standard.source.name }}</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-xs font-medium text-gray-500 mb-1">{% trans "Category" %}</dt>
|
|
<dd class="text-sm text-gray-900">{{ standard.category.name }}</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-xs font-medium text-gray-500 mb-1">{% trans "Department" %}</dt>
|
|
<dd class="text-sm text-gray-900">
|
|
{% if standard.department %}
|
|
{{ standard.department.name }}
|
|
{% else %}
|
|
<span class="text-gray-400 italic">{% trans "All Departments" %}</span>
|
|
{% endif %}
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-xs font-medium text-gray-500 mb-1">{% trans "Compliance Records" %}</dt>
|
|
<dd class="text-sm text-gray-900">{{ standard.compliance_records.count }} {% trans "records" %}</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="flex gap-3">
|
|
<button type="submit" class="btn-transition inline-flex items-center px-6 py-2.5 bg-red-500 text-white font-medium rounded-xl hover:bg-red-600 transition">
|
|
<i data-lucide="trash-2" class="w-4 h-4 me-2"></i>{% trans "Delete Standard" %}
|
|
</button>
|
|
<a href="{% url 'standards:standard_detail' pk=standard.pk %}"
|
|
class="btn-transition inline-flex items-center px-6 py-2.5 bg-gray-100 text-gray-700 font-medium rounded-xl hover:bg-gray-200 transition">
|
|
{% trans "Cancel" %}
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|