{% set current_theme = current_theme() %} {% from "macros/form_buttons.j2" import render_form_buttons %} {% from
"macros/form_errors.j2" import render_field_errors, render_form_errors %}
<!doctype html>
<html lang="{{ current_locale() }}" class="h-100">
    <head>
        {{ current_theme.headertags() }}
        <title>{{ _("Crear un nuevo usuario") }}</title>

        {{ current_theme.local_style() }}
        <!-- Custom styles for this template -->
        <link href="{{ url_for('static', filename='css/form-validation') }}" rel="stylesheet" />
    </head>

    <body>
        {{ current_theme.navbar() }}

        <main>
            {{ current_theme.notify() }}

            <div class="container px-4 py-5" id="icon-grid">
                <h4 class="pb-2 border-bottom">{{ _("Crear") }} nuevo {{ _("Usuario") }}.</h4>
                <form method="post">
                    {{ form.csrf_token }} {{ render_form_errors(form) }}
                    <div class="row g-3">
                        <div class="col-sm-6">
                            <label for="nombre" class="form-label">{{ _("Nombre") }}</label>
                            {{ form.nombre(class="form-control", id="nombre", placeholder=_("Nombre del Usuario")) }} {{
                            render_field_errors(form.nombre) }}
                        </div>

                        <div class="col-sm-6">
                            <label for="apellido" class="form-label">{{ _('Apellido') }}</label>
                            {{ form.apellido(class="form-control", id="apellido", placeholder=_("Apellido del Usuario")) }} {{
                            render_field_errors(form.apellido) }}
                        </div>

                        <div class="col-sm-6">
                            <label for="correo_electronico" class="form-label">{{ _('Correo Electrónico') }}</label>
                            {{ form.correo_electronico(class="form-control", id="correo_electronico", placeholder=_("Correo
                            Electrónico")) }} {{ render_field_errors(form.correo_electronico) }}
                        </div>

                        <div class="col-sm-6">
                            <label for="usuario" class="form-label">{{ _("Usuario") }}</label>
                            {{ form.usuario(class="form-control", id="usuario", placeholder=_("Usuario")) }} {{
                            render_field_errors(form.usuario) }}
                        </div>

                        <div class="col-sm-6">
                            <label for="acceso" class="form-label">{{ _('Contraseña') }}</label>
                            {{ form.acceso(class="form-control", id="acceso", placeholder=_("Contraseña")) }} {{
                            render_field_errors(form.acceso) }}
                        </div>
                    </div>
                    <br />
                    {{ render_form_buttons(_("Crear Usuario"), "/admin/panel") }}
                </form>
            </div>
        </main>
    </body>
</html>
