{% extends "layout.html" %}
{% block content %}
    <div class="content-section">

        <form method="POST" action="" enctype="multipart/form-data">
            {{ form.hidden_tag() }}
            <fieldset class="form-group">
              <legend class="border-bottom mb-4">Datos del usuario</legend>
                <div class="form-group">
                    {{ form.nombrecompleto.label() }}
                    {{ form.nombrecompleto(class="form-control form-control-lg") }}
                </div>
                 <div class="form-group">
                    {{ form.login.label(class="form-control-label") }}
                    {{ form.login(class="form-control form-control-lg") }}
                </div>
                <legend class="border-bottom mb-4">Actualizar Información</legend>
                <div class="form-group">
                    {{ form.correo.label(class="form-control-label") }} <span class='text-danger'>(obligatorio)</span>
                    {% if form.correo.errors %}
                        {{ form.correo(class="form-control form-control-lg is-invalid") }}
                        <div class="invalid-feedback">
                            {% for error in form.correo.errors %}
                                <span>{{ error }}</span>
                            {% endfor %}
                        </div>
                    {% else %}
                        {{ form.correo(class="form-control form-control-lg") }}
                    {% endif %}
                </div>
                <div class="form-group">
                    {{ form.fono.label(class="form-control-label") }} <span class='text-danger'>(obligatorio)</span>
                    {% if form.fono.errors %}
                        {{ form.fono(class="form-control form-control-lg is-invalid") }}
                        <div class="invalid-feedback">
                            {% for error in form.fono.errors %}
                                <span>{{ error }}</span>
                            {% endfor %}
                        </div>
                    {% else %}
                        {{ form.fono(class="form-control form-control-lg") }}
                    {% endif %}
                </div>
                <div class="form-group">
                    {{ form.clave.label(class="form-control-label") }}
                    {% if form.clave.errors %}
                        {{ form.clave(class="form-control form-control-lg is-invalid") }}
                        <div class="invalid-feedback">
                            {% for error in form.clave.errors %}
                                <span>{{ error|safe }}</span>
                            {% endfor %}
                        </div>
                    {% else %}
                        {{ form.clave(class="form-control form-control-lg") }}
                    {% endif %}
                </div>
            </fieldset>
            <div class="form-group justify-content-end d-flex">
               {{ form.submit(class="btn btn-lg btn-primary") }}
               <a href="https://app.tpmc.ilab.cl/" class="btn btn-lg btn-secondary">Volver</a>
            </div>
        </form>
    </div>

{% endblock content %}
