129 lines
6.0 KiB
HTML
129 lines
6.0 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}
|
|
{% trans "Delete Source" %} | {% trans "Recruitment System" %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid py-4">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card shadow">
|
|
<div class="card-header py-3">
|
|
<h6 class="m-0 font-weight-bold text-danger">
|
|
<i class="fas fa-exclamation-triangle me-2"></i>
|
|
{% trans "Delete Source" %}
|
|
</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="alert alert-warning">
|
|
<h5 class="alert-heading">{% trans "Confirm Deletion" %}</h5>
|
|
<p>{% trans "Are you sure you want to delete the following source? This action cannot be undone." %}</p>
|
|
</div>
|
|
|
|
<!-- Source Information -->
|
|
<div class="row mb-4">
|
|
<div class="col-12">
|
|
<h5>{% trans "Source Information" %}</h5>
|
|
<div class="table-responsive">
|
|
<table class="table table-borderless">
|
|
<tr>
|
|
<th width="30%">{% trans "Name" %}</th>
|
|
<td>{{ source.name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Type" %}</th>
|
|
<td>
|
|
<span class="badge bg-info">{{ source.source_type }}</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Status" %}</th>
|
|
<td>
|
|
{% if source.is_active %}
|
|
<span class="badge bg-success">
|
|
<i class="fas fa-check-circle me-1"></i>
|
|
{% trans "Active" %}
|
|
</span>
|
|
{% else %}
|
|
<span class="badge bg-danger">
|
|
<i class="fas fa-times-circle me-1"></i>
|
|
{% trans "Inactive" %}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Created By" %}</th>
|
|
<td>{{ source.created_by }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{% trans "Created At" %}</th>
|
|
<td>{{ source.created_at|date:"M d, Y H:i" }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Warning Messages -->
|
|
<div class="row mb-4">
|
|
<div class="col-12">
|
|
<div class="alert alert-danger">
|
|
<h5 class="alert-heading">
|
|
<i class="fas fa-exclamation-circle me-2"></i>
|
|
{% trans "Important Note" %}
|
|
</h5>
|
|
<ul>
|
|
<li>{% trans "All associated API keys will be permanently deleted." %}</li>
|
|
<li>{% trans "Integration logs related to this source will remain but will show 'Source deleted'." %}</li>
|
|
<li>{% trans "Any active integrations using this source will be disconnected." %}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="d-flex justify-content-between">
|
|
<div>
|
|
<a href="{% url 'source_detail' source.pk %}" class="btn btn-secondary">
|
|
<i class="fas fa-arrow-left me-2"></i>
|
|
{% trans "Cancel" %}
|
|
</a>
|
|
</div>
|
|
<form method="post" action="">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-danger">
|
|
<i class="fas fa-trash me-2"></i>
|
|
{% trans "Delete Source" %}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_js %}
|
|
<script>
|
|
// Add confirmation dialog
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const deleteForm = document.querySelector('form[action*="delete"]');
|
|
if (deleteForm) {
|
|
deleteForm.addEventListener('submit', function(e) {
|
|
if (!confirm('{% trans "Are you sure you want to delete this source? This action cannot be undone." %}')) {
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|