77 lines
3.9 KiB
HTML
77 lines
3.9 KiB
HTML
{% extends "layouts/base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}Delete {{ template.name }} - PX360{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header bg-danger text-white">
|
|
<h4 class="mb-0">
|
|
<i class="bi bi-exclamation-triangle me-2"></i>
|
|
{% trans "Confirm Delete" %}
|
|
</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="alert alert-warning">
|
|
<i class="bi bi-exclamation-circle me-2"></i>
|
|
<strong>{% trans "Warning:" %}</strong> {% trans "This action cannot be undone!" %}
|
|
</div>
|
|
|
|
<p class="mb-4">
|
|
{% blocktrans %}Are you sure you want to delete the journey template <strong>"{{ template.name }}"</strong>?{% endblocktrans %}
|
|
</p>
|
|
|
|
<div class="card bg-light mb-4">
|
|
<div class="card-body">
|
|
<h6 class="card-title mb-3">{% trans "Template Information" %}</h6>
|
|
<table class="table table-borderless table-sm mb-0">
|
|
<tr>
|
|
<th width="40%">{% trans "Name:" %}</th>
|
|
<td>{{ template.name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Hospital:" %}</th>
|
|
<td>{{ template.hospital.get_localized_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Journey Type:" %}</th>
|
|
<td>{{ template.get_journey_type_display }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Stages:" %}</th>
|
|
<td>{{ template.stages.count }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Journey Instances:" %}</th>
|
|
<td>{{ template.instances.count }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<p class="text-muted small">
|
|
<i class="bi bi-info-circle me-1"></i>
|
|
{% trans "This will also delete all associated stages and any related data. Active journeys using this template will not be affected, but new journeys cannot be created with this template." %}
|
|
</p>
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="flex justify-between">
|
|
<a href="{% url 'journeys:template_detail' template.pk %}" class="px-6 py-3 border-2 border-slate-200 rounded-xl font-semibold text-slate-600 hover:bg-slate-50 transition text-sm inline-flex items-center gap-2">
|
|
<i data-lucide="x-circle" class="w-4 h-4"></i> {% trans "Cancel" %}
|
|
</a>
|
|
<button type="submit" class="px-6 py-3 bg-red-600 text-white rounded-xl font-bold text-sm 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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|