{% extends "./template.html" %}
{% block content %}
    <div class="card mt-4">
        <div class="card-header">
            <h1>New Customer</h1>
        </div>
        <div class="card-body">
            <form action={% url 'new_customer' organisation_id %} method="post" class="new_customer" id="input-form">
                {% csrf_token %}
                {{ new_customer_form.media.css }}
                {{ new_customer_form.media.js }}
                {% if form_errors %}
                    <div class="alert-danger">{{ form_errors }}</div>
                {% endif %}
                <div class="form-row">
                    <div class="form-group col-md-2">
                        <label for="id_customer_title">Customer Title</label>
                        {{ new_customer_form.customer_title }}
                    </div>
                    <div class="form-group col-md-5">
                        <label for="id_customer_first_name">Customer First Name</label>
                        {{ new_customer_form.customer_first_name }}
                    </div>
                    <div class="form-group col-md-5">
                        <label for="id_customer_last_name">Customer Last Name</label>
                        {{ new_customer_form.customer_last_name }}
                    </div>
                </div>
                <div class="form-group">
                    <label for="id_customer_email">Customer Email</label>
                    {{ new_customer_form.customer_email }}
                </div>
                <div class="form-group">
                    <label for="id_organisation_id">Organisation</label>
                    {{ new_customer_form.organisation_id }}
                </div>

                <div class="form-row">
                    <input type="submit" value="Submit new customer" class="btn btn-primary form-control col-md-6">
                    <a href="{% url 'dashboard' %}" class="btn btn-warning form-control col-md-6">Cancel</a>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
