{% extends 'rental_app/base_rental.html' %}
{% block title %}Create Rental Listing{% endblock %}

{% block content %}
<section class="py-5">
    <div class="container">
        <div class="detail-card">
            <span class="section-mini-title">Owner Dashboard</span>
            <h1 class="fw-bold mb-4">Create Rental Listing</h1>

            <form method="post">
                {% csrf_token %}
                <div class="row g-3">
                    {% for field in form %}
                    <div class="col-md-6">
                        <label class="form-label">{{ field.label }}</label>
                        {{ field }}
                        {% if field.errors %}
                            <div class="text-danger small mt-1">{{ field.errors|join:", " }}</div>
                        {% endif %}
                    </div>
                    {% endfor %}
                </div>

                <div class="mt-4">
                    <button class="btn btn-dark btn-lg" type="submit">Submit Listing</button>
                </div>
            </form>
        </div>
    </div>
</section>
{% endblock %}