{% extends 'base.html' %}

{% block titulo %} Registrar Vehículo Táctico {% endblock %}

{% block vertical %} {% include 'partes/vertical.html' %} {% endblock %}

{% block horizontal %} {% include 'partes/horizontal.html' %} {% endblock %}

{% block seccion %}
<div class="d-flex align-items-left align-items-md-center flex-column flex-md-row pt-2 pb-4">
    <div>
        <h3 class="fw-bold mb-3">Registrar un Vehiculo Tactico</h3>
        <h6 class="op-7 mb-2">Servicio de Transporte del Ejército Bolivariano</h6>
    </div>
</div>
{% endblock %}

{% block contenido %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-12 col-lg-10">
            <div class="card shadow-lg border-primary">
                <div class="card-header bg-primary text-white py-3">
                    <h3 class="mb-0 text-center">
                        <i class="bi bi-clipboard-data me-2"></i>Registro de Vehículo Táctico
                    </h3>
                </div>
                <div class="card-body p-4">
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
                                {{ message }}
                                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                            </div>
                        {% endfor %}
                    {% endif %}

                    <form method="post" novalidate>
                        {% csrf_token %}
                        <div class="row mb-3">
                            <div class="col-md-3">
                                <label for="{{ form.placa_militar.id_for_label }}" class="form-label">Placa Militar <span class="text-danger">*</span></label>
                                {{ form.placa_militar }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.clase.id_for_label }}" class="form-label">Clase <span class="text-danger">*</span></label>
                                {{ form.clase }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.tipo.id_for_label }}" class="form-label">Tipo <span class="text-danger">*</span></label>
                                {{ form.tipo }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.marca.id_for_label }}" class="form-label">Marca <span class="text-danger">*</span></label>
                                {{ form.marca }}
                            </div>
                        </div>
                        <div class="row mb-3">
                            <div class="col-md-3">
                                <label for="{{ form.modelo.id_for_label }}" class="form-label">Modelo <span class="text-danger">*</span></label>
                                {{ form.modelo }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.color.id_for_label }}" class="form-label">Color <span class="text-danger">*</span></label>
                                {{ form.color }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.placa_mtc.id_for_label }}" class="form-label">Placa MTC</label>
                                {{ form.placa_mtc }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.ano.id_for_label }}" class="form-label">Año</label>
                                {{ form.ano }}
                            </div>
                        </div>
                        <div class="row mb-3">
                            <div class="col-md-3">
                                <label for="{{ form.serial_chasis.id_for_label }}" class="form-label">Serial Chasis <span class="text-danger">*</span></label>
                                {{ form.serial_chasis }}
                            </div>
                            <div class="col-md-3">
                                <label for="{{ form.serial_motor.id_for_label }}" class="form-label">Serial Motor <span class="text-danger">*</span></label>
                                {{ form.serial_motor }}
                            </div>
                            <div class="col-md-6 text-end align-self-end">
                                <button type="reset" class="btn btn-outline-danger me-2">
                                    <i class="bi bi-eraser me-2"></i>Limpiar
                                </button>
                                <button type="submit" class="btn btn-primary me-2">
                                    <i class="bi bi-check-circle me-2"></i>Guardar
                                </button>
                                <a href="{% url 'listar_inventario_tactico' %}" class="btn btn-black">
                                    <i class="bi bi-x-circle me-2"></i>Cancelar
                                </a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}


{% block pie %} {% include 'partes/pie.html' %} {% endblock %}