ATS/templates/includes/edit_comment_form.html
2026-02-01 13:38:06 +03:00

27 lines
1.4 KiB
HTML

{% load i18n %}
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden mt-4">
<div class="bg-gray-50 px-4 py-3 border-b border-gray-200">
<h5 class="text-lg font-bold text-temple-red mb-0">{% trans "Edit Comment" %}</h5>
</div>
<div class="p-4">
<form method="post" action="{% url 'edit_meeting_comment' meeting.slug comment.id %}">
{% csrf_token %}
<div class="mb-3">
{{ form.content }}
{% if form.content.errors %}
<div class="text-red-600 mt-1 text-sm">
{% for error in form.content.errors %}
<small>{{ error }}</small>
{% endfor %}
</div>
{% endif %}
</div>
<button type="submit" class="inline-flex items-center gap-2 bg-temple-red hover:bg-temple-dark text-white font-medium px-4 py-2 rounded-lg text-sm transition shadow-sm hover:shadow-md">
{% trans "Update Comment" %}
</button>
{% if 'HX-Request' in request.headers %}
<button type="button" class="inline-flex items-center gap-2 bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium px-4 py-2 rounded-lg text-sm transition" hx-get="{% url 'meeting_details' meeting.slug %}" hx-target="#comment-section">{% trans "Cancel" %}</button>
{% endif %}
</form>
</div>
</div>