HH/templates/journeys/template_confirm_delete.html
2026-01-24 15:27:30 +03:00

79 lines
3.5 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>
Confirm Delete
</h4>
</div>
<div class="card-body">
<div class="alert alert-warning">
<i class="bi bi-exclamation-circle me-2"></i>
<strong>Warning:</strong> This action cannot be undone!
</div>
<p class="mb-4">
Are you sure you want to delete the journey template
<strong>"{{ template.name }}"</strong>?
</p>
<div class="card bg-light mb-4">
<div class="card-body">
<h6 class="card-title mb-3">Template Information</h6>
<table class="table table-borderless table-sm mb-0">
<tr>
<th width="40%">Name:</th>
<td>{{ template.name }}</td>
</tr>
<tr>
<th>Hospital:</th>
<td>{{ template.hospital.name_en }}</td>
</tr>
<tr>
<th>Journey Type:</th>
<td>{{ template.get_journey_type_display }}</td>
</tr>
<tr>
<th>Stages:</th>
<td>{{ template.stages.count }}</td>
</tr>
<tr>
<th>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>
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="d-flex justify-content-between">
<a href="{% url 'journeys:template_detail' template.pk %}" class="btn btn-secondary">
<i class="bi bi-x-circle me-1"></i> Cancel
</a>
<button type="submit" class="btn btn-danger">
<i class="bi bi-trash me-1"></i> Delete Template
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}