{% load static %}


{% include "diaxeirisi/00_head.html" %}

<body id="app-container" class="menu-default show-spinner vertical boxed">
{% include "diaxeirisi/01_menu.html" %}

    <main>
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">
                    <div class="mb-2">
                        <h1>Επεξεργασία Καταχώρησης Κράτησης</h1>
                        <nav class="breadcrumb-container d-none d-sm-block d-lg-inline-block" aria-label="breadcrumb">
                            <ol class="breadcrumb pt-0">
                                <li class="breadcrumb-item">
                                    <a href="/dx">Πίσω</a>
                                </li>
                            </ol>
                        </nav>
                    </div>
                    <div class="separator mb-5"></div>
                </div>
            </div>
{% if form.errors %}
    {% for field in form %}
        {% for error in field.errors %}
            <div class="alert alert-danger">
                <strong>{{ error|escape }}</strong>
            </div>
        {% endfor %}
    {% endfor %}
    {% for error in form.non_field_errors %}
        <div class="alert alert-danger">
            <strong>{{ error|escape }}</strong>
        </div>
    {% endfor %}
{% endif %}
            <div class="row mb-4">
                        <div class="col-7 col-md-7 col-xl-5">
                            <div class="card">
                                <div class="card-body">
                                    <form class="mx-auto" method="post">
                                    {% csrf_token %}
                                    {{ form.as_p }}
                                        <a href="/dx">
                                            <button type="button" class="btn btn-outline-primary">
                                                Πίσω</button>
                                        </a>
                                    <input type="submit" value="Αποθήκευση">
                                    </form>
                                </div>
                            </div>
                        </div>
                        <div class="col-5 col-md-5 col-xl-3">
                            <div class="card">
                                <div class="card-body">
                                    <footer>
                                        <p class="text-muted text-md-center mb-0">Διαθέσιμα Δωμάτια</p>
                                    </footer>
                                    {% if AvailRooms %}
                                        {% for room in  AvailRooms %}
                                            <p class="text-theme-2 mb-4">{{ room }}</p>
                                        {% endfor %}
                                    {% endif %}
                                        <p class="text-muted text-md-center mb-0">Από: {{ object.check_in }}</p>
                                        <p class="text-muted text-md-center mb-0">Μέχρι: {{ object.check_out }}</p>
                                </div>
                            </div>
                        </div>
                    </div>
        </div>

    </main>

{% include "diaxeirisi/99_footer.html" %}