HH/templates/observations/public_success.html
2026-01-04 10:32:40 +03:00

192 lines
6.7 KiB
HTML

{% load i18n %}
{% load static %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% trans "Observation Submitted" %} - Al Hammadi</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
<style>
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.success-container {
background: white;
border-radius: 16px;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
padding: 50px;
max-width: 600px;
text-align: center;
}
.success-icon {
width: 100px;
height: 100px;
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 30px;
animation: pulse 2s infinite;
}
.success-icon i {
font-size: 50px;
color: white;
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.tracking-code {
background: #f8f9fa;
border: 2px dashed #667eea;
border-radius: 12px;
padding: 20px;
margin: 30px 0;
}
.tracking-code h3 {
font-family: 'Courier New', monospace;
font-size: 2rem;
color: #667eea;
margin-bottom: 5px;
letter-spacing: 2px;
}
.copy-btn {
background: #667eea;
border: none;
padding: 8px 20px;
border-radius: 6px;
color: white;
cursor: pointer;
transition: all 0.2s;
}
.copy-btn:hover {
background: #5a6fd6;
}
.copy-btn.copied {
background: #28a745;
}
.info-card {
background: #e8f4fd;
border-radius: 8px;
padding: 15px;
margin-top: 20px;
text-align: left;
}
.info-card i {
color: #0056b3;
}
</style>
</head>
<body>
<div class="success-container">
<!-- Success Icon -->
<div class="success-icon">
<i class="bi bi-check-lg"></i>
</div>
<!-- Title -->
<h1 class="mb-3">{% trans "Thank You!" %}</h1>
<p class="text-muted lead">
{% trans "Your observation has been submitted successfully." %}
</p>
<!-- Tracking Code -->
<div class="tracking-code">
<p class="text-muted mb-2">{% trans "Your Tracking Code" %}</p>
<h3 id="trackingCode">{{ tracking_code }}</h3>
<button class="copy-btn mt-2" onclick="copyTrackingCode()">
<i class="bi bi-clipboard me-1"></i>
<span id="copyText">{% trans "Copy Code" %}</span>
</button>
</div>
<!-- Info -->
<div class="info-card">
<p class="mb-2">
<i class="bi bi-info-circle me-2"></i>
<strong>{% trans "Important" %}</strong>
</p>
<ul class="mb-0 small">
<li>{% trans "Save this tracking code to check the status of your observation." %}</li>
<li>{% trans "Our team will review your observation and take appropriate action." %}</li>
<li>{% trans "You can track your observation status anytime using the tracking code." %}</li>
</ul>
</div>
<!-- Observation Summary -->
<div class="mt-4 text-start">
<h6 class="text-muted mb-3">{% trans "Observation Summary" %}</h6>
<table class="table table-sm">
<tr>
<td class="text-muted">{% trans "Category" %}</td>
<td>{{ observation.category.name_en|default:"Not specified" }}</td>
</tr>
<tr>
<td class="text-muted">{% trans "Severity" %}</td>
<td>
<span class="badge bg-{{ observation.get_severity_color }}">
{{ observation.get_severity_display }}
</span>
</td>
</tr>
<tr>
<td class="text-muted">{% trans "Status" %}</td>
<td>
<span class="badge bg-{{ observation.get_status_color }}">
{{ observation.get_status_display }}
</span>
</td>
</tr>
<tr>
<td class="text-muted">{% trans "Submitted" %}</td>
<td>{{ observation.created_at|date:"M d, Y H:i" }}</td>
</tr>
</table>
</div>
<!-- Actions -->
<div class="mt-4 d-flex gap-3 justify-content-center">
<a href="{% url 'observations:observation_track' %}?tracking_code={{ tracking_code }}"
class="btn btn-outline-primary">
<i class="bi bi-search me-1"></i>{% trans "Track Status" %}
</a>
<a href="{% url 'observations:observation_create_public' %}" class="btn btn-primary">
<i class="bi bi-plus-circle me-1"></i>{% trans "Submit Another" %}
</a>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
function copyTrackingCode() {
const code = document.getElementById('trackingCode').textContent;
navigator.clipboard.writeText(code).then(() => {
const btn = document.querySelector('.copy-btn');
const text = document.getElementById('copyText');
btn.classList.add('copied');
text.textContent = '{% trans "Copied!" %}';
setTimeout(() => {
btn.classList.remove('copied');
text.textContent = '{% trans "Copy Code" %}';
}, 2000);
});
}
</script>
</body>
</html>