kaauh_ats/templates/includes/edit_comment_form.html
2025-10-19 17:23:06 +03:00

25 lines
1.0 KiB
HTML

<div class="card mt-4">
<div class="card-header text-primary-theme">
<h5 class="card-title mb-0">Edit Comment</h5>
</div>
<div class="card-body">
<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-danger mt-1">
{% for error in form.content.errors %}
<small>{{ error }}</small>
{% endfor %}
</div>
{% endif %}
</div>
<button type="submit" class="btn bg-primary-theme btn-sm text-white">Update Comment</button>
{% if 'HX-Request' in request.headers %}
<button type="button" class="btn btn-secondary btn-sm" hx-get="{% url 'meeting_details' meeting.slug %}" hx-target="#comment-section">Cancel</button>
{% endif %}
</form>
</div>
</div>