{% extends "orders/base.html" %}
{% load crispy_forms_tags %}
{% block content %}
    <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>
            <div class="row mb-4">

<div class="container">
{% if messages %}
  <ul class="messages">
    {% for message in messages %}
      <li class="{{ message.tags }}">{{ message }}</li>
    {% endfor %}
  </ul>
{% endif %}
    <div class="card">
        {% if form.errors %}
            <p>{{ form.errors }}</p>
    {% for field in form %}
        {% for error in field.errors %}
            <div class="alert alert-danger">
                <strong>{{ field.name }} {{ error|escape }}</strong>
            </div>
        {% endfor %}
    {% endfor %}
    {% for error in form.non_field_errors %}
        <div class="alert alert-danger">
            <strong>{{ field.name }} {{ error|escape }}</strong>
        </div>
    {% endfor %}
{% endif %}
        <div class="card-body">
             {% crispy form %}
        </div>
    </div>
</div>
{% endblock content %}
