<form method="post"
      hx-post="{% url app_name|add:':question_set_review' question.pk %}?edit=1"
      hx-target="#question-review-block"
      hx-swap="innerHTML"
      class="w-100">
    {% csrf_token %}
    <div class="row g-2 align-items-start">
        <div class="col-auto">
            <label class="form-label mb-1">Status</label>
            <div>
                {% with current_status=form.status.value %}
                    {% for radio in form.status %}
                    {% comment %} Render colored button for each choice by checking value {% endcomment %}
                        {{ radio.tag }}
                        <label class="btn btn-outline-primary me-1 mb-1{% if radio.choice_value == current_status %} active{% endif %}" for="{{ radio.id_for_label }}">{{ radio.choice_label }}</label>
                    {% endfor %}
                {% endwith %}
            </div>
            {% if form.status.errors %}
                <div class="invalid-feedback d-block">{{ form.status.errors|join:", " }}</div>
            {% endif %}
        </div>

        <div class="col-md-12 mt-2">
            <label for="{{ form.comment.id_for_label }}" class="form-label mb-1">Comment</label>
            {{ form.comment }}
            {% if form.comment.errors %}
                <div class="invalid-feedback d-block">{{ form.comment.errors|join:", " }}</div>
            {% endif %}
        </div>
    </div>
    <div class="col-auto d-flex align-items-end mt-2">
        <button class="btn btn-primary" type="submit">Save</button>
    </div>
</div>
</form>