{% extends 'base.html' %}

{% block title %}
  Add Book - {{ project_name }}
{% endblock title %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title">Add a New Book</h3>
                </div>
                <div class="card-body">
                    <form method="post">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="id_title" class="form-label">Title</label>
                            {{ form.title }}
                        </div>
                        <div class="mb-3">
                            <label for="id_author" class="form-label">Author</label>
                            {{ form.author }}
                        </div>
                        <div class="mb-3">
                            <label for="id_isbn" class="form-label">ISBN</label>
                            {{ form.isbn }}
                        </div>
                        <div class="mb-3">
                            <label for="id_total_copies" class="form-label">Total Copies</label>
                            {{ form.total_copies }}
                        </div>
                        <button type="submit" class="btn btn-primary">Add Book</button>
                        <a href="{% url 'index' %}" class="btn btn-secondary">Cancel</a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock content %}
