{% extends "base.html" %}

{% block content %}
<h1>Cadastrar Pessoas</h1>
<form method="post" action="{{ url_for('cadastrar_pessoas') }}">
    <div class="form-group">
        <label for="name">Nome da Pessoa:</label>
        <input type="text" class="form-control" id="name" name="name" required>
    </div>
    <div class="row">
        {% for image in images %}
            <div class="col-md-3">
                <div class="card mb-4">
                    <img src="{{ url_for('serve_image', filename=image) }}" class="card-img-top">
                    <div class="card-body">
                        <input type="checkbox" name="selected_images" value="{{ image }}">
                        <label>{{ image }}</label>
                    </div>
                </div>
            </div>
        {% endfor %}
    </div>
    <button type="submit" class="btn btn-primary">Cadastrar Selecionados</button>
</form>
{% endblock %}
