{% extends 'base.html' %}
{% block title %}Edit Category - Astron Hosts Expense Tracker{% endblock %}
{% block content %}
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card shadow-lg rounded-4 border-0">
                <div class="card-body">
                    <h3 class="fw-bold mb-4">Edit Category</h3>
                    <form method="post" novalidate>
                        {% csrf_token %}
                        <div class="mb-3">
                            {{ form.name.label_tag }}
                            {{ form.name }}
                            {% for error in form.name.errors %}
                                <div class="invalid-feedback d-block">{{ error }}</div>
                            {% endfor %}
                        </div>
                        <div class="d-flex justify-content-end gap-2">
                            <a href="{% url 'categories' %}" class="btn btn-secondary">Cancel</a>
                            <button type="submit" class="btn btn-primary">Save</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 