HH/templates/complaints/involved_staff_form.html
2026-02-22 08:35:53 +03:00

130 lines
6.8 KiB
HTML

{% extends 'layouts/base.html' %}
{% load i18n %}
{% block title %}{{ title }} - PX360{% endblock %}
{% block extra_css %}
<style>
.form-select {
@apply w-full px-4 py-3 border border-slate-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-navy focus:border-transparent transition bg-white text-sm;
}
.form-textarea {
@apply w-full px-4 py-3 border border-slate-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-navy focus:border-transparent transition resize-none text-sm;
}
</style>
{% endblock %}
{% block content %}
<!-- Back Button -->
<div class="mb-6">
<a href="{% url 'complaints:complaint_detail' pk=complaint.pk %}" class="inline-flex items-center gap-2 px-4 py-2 border border-slate-200 rounded-xl text-slate hover:bg-light transition text-sm font-semibold">
<i data-lucide="arrow-left" class="w-4 h-4"></i> {% trans "Back to Complaint" %}
</a>
</div>
<!-- Header -->
<div class="mb-6">
<h1 class="text-2xl font-bold text-navy">{{ title }}</h1>
<p class="text-slate mt-1">
{% trans "Complaint:" %} <span class="font-medium">{{ complaint.reference_number }}</span> - {{ complaint.title|truncatechars:50 }}
</p>
</div>
<!-- Form Card -->
<div class="bg-white rounded-2xl shadow-sm border border-slate-100 p-8 max-w-3xl">
<form method="post" class="space-y-6">
{% csrf_token %}
<!-- Staff Member -->
<div>
<label for="{{ form.staff.id_for_label }}" class="block text-sm font-semibold text-navy mb-2">
{% trans "Staff Member" %} <span class="text-red-500">*</span>
</label>
<select name="{{ form.staff.name }}" id="{{ form.staff.id_for_label }}" class="w-full px-4 py-3 border border-slate-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-navy focus:border-transparent transition bg-white text-sm" required>
<option value="">{% trans "Select Staff Member" %}</option>
{% for choice in form.staff.field.choices %}
<option value="{{ choice.0 }}" {% if form.staff.value == choice.0 %}selected{% endif %}>{{ choice.1 }}</option>
{% endfor %}
</select>
{% if form.staff.errors %}
<div class="text-red-500 text-sm mt-2 flex items-center gap-1">
<i data-lucide="alert-circle" class="w-4 h-4"></i>
{{ form.staff.errors }}
</div>
{% endif %}
<p class="text-slate text-xs mt-2">{% trans "Select the staff member involved in this complaint." %}</p>
</div>
<!-- Role -->
<div>
<label for="{{ form.role.id_for_label }}" class="block text-sm font-semibold text-navy mb-2">
{% trans "Role" %} <span class="text-red-500">*</span>
</label>
<select name="{{ form.role.name }}" id="{{ form.role.id_for_label }}" class="w-full px-4 py-3 border border-slate-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-navy focus:border-transparent transition bg-white text-sm" required>
<option value="">{% trans "Select Role" %}</option>
{% for choice in form.role.field.choices %}
<option value="{{ choice.0 }}" {% if form.role.value == choice.0 %}selected{% endif %}>{{ choice.1 }}</option>
{% endfor %}
</select>
{% if form.role.errors %}
<div class="text-red-500 text-sm mt-2 flex items-center gap-1">
<i data-lucide="alert-circle" class="w-4 h-4"></i>
{{ form.role.errors }}
</div>
{% endif %}
<div class="mt-3 bg-light/50 rounded-xl p-4 text-sm text-slate space-y-2">
<p class="flex items-start gap-2">
<span class="font-semibold text-navy min-w-[120px]">{% trans "Accused/Involved:" %}</span>
<span>{% trans "Staff member involved in the incident" %}</span>
</p>
<p class="flex items-start gap-2">
<span class="font-semibold text-navy min-w-[120px]">{% trans "Witness:" %}</span>
<span>{% trans "Staff member who witnessed the incident" %}</span>
</p>
<p class="flex items-start gap-2">
<span class="font-semibold text-navy min-w-[120px]">{% trans "Responsible:" %}</span>
<span>{% trans "Staff responsible for resolving the complaint" %}</span>
</p>
<p class="flex items-start gap-2">
<span class="font-semibold text-navy min-w-[120px]">{% trans "Investigator:" %}</span>
<span>{% trans "Staff investigating the complaint" %}</span>
</p>
<p class="flex items-start gap-2">
<span class="font-semibold text-navy min-w-[120px]">{% trans "Support:" %}</span>
<span>{% trans "Supporting the resolution process" %}</span>
</p>
<p class="flex items-start gap-2">
<span class="font-semibold text-navy min-w-[120px]">{% trans "Coordinator:" %}</span>
<span>{% trans "Coordinating between departments" %}</span>
</p>
</div>
</div>
<!-- Notes -->
<div>
<label for="{{ form.notes.id_for_label }}" class="block text-sm font-semibold text-navy mb-2">
{% trans "Notes" %} <span class="text-slate font-normal">({% trans "Optional" %})</span>
</label>
<textarea name="{{ form.notes.name }}" id="{{ form.notes.id_for_label }}" rows="3" class="w-full px-4 py-3 border border-slate-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-navy focus:border-transparent transition resize-none text-sm" placeholder="{% trans 'Enter any additional notes...' %}">{{ form.notes.value|default:'' }}</textarea>
{% if form.notes.errors %}
<div class="text-red-500 text-sm mt-2 flex items-center gap-1">
<i data-lucide="alert-circle" class="w-4 h-4"></i>
{{ form.notes.errors }}
</div>
{% endif %}
</div>
<!-- Actions -->
<div class="flex items-center gap-4 pt-6 border-t border-slate-100">
<button type="submit" class="bg-gradient-to-r from-navy to-blue text-white px-8 py-3 rounded-xl hover:opacity-90 transition font-semibold flex items-center gap-2 shadow-md">
<i data-lucide="save" class="w-5 h-5"></i>
{% trans "Save" %}
</button>
<a href="{% url 'complaints:complaint_detail' pk=complaint.pk %}" class="px-8 py-3 border border-slate-200 rounded-xl text-slate hover:bg-light transition font-semibold">
{% trans "Cancel" %}
</a>
</div>
</form>
</div>
{% endblock %}