{% extends 'base.html.twig' %}

{% block title %}
    WONDER-Usuarios
{% endblock %}
{% block titulo %}
    GESTIÓN DE USUARIOS
{% endblock %}
{% block bread %}
    <li class="active">Edición de Usuario</li>
{% endblock %}

{% block body %}
    <style>
        body {background-image: url({{ asset('recursos/imagenes/sistema/fondo_lateral.png')}});
            background-repeat: no-repeat;
            /*background-size: 200px;*/
            background-size: cover;
        }

        .col-sm-2 {
            max-width: 100%;
        }
    </style>

    {#{{ form_start(form) }}#}
    {{ form_start(form, { 'attr': {'novalidate':'novalidate', 'class': 'form-material form-horizontal'} }) }}
    <div class="row">
        <div class="col-sm-6">
            <div class="white-box">
                <h3 class="box-title">DATOS PERSONALES</h3>
                <div class="row">
                    <div class="form-group col-sm-5">
                        {{ form_label(form.nombres) }}
                        {{ form_widget(form.nombres) }}
                        <span class="text-danger">{{ form_errors(form.nombres) }}</span>
                    </div>
                    <div class="form-group col-sm-2"></div>
                    <div class="col-md-5">
                        <div class="form-group">
                            <label class="control-label col-md-3">{{ form_label(form.foto) }}</label>
                            <div class="col-md-9">
                                <a href="#" data-toggle="tooltip" data-placement="top" title="Solo archivos JPG, PNG">
                                    {{ form_widget(form.foto, { 'attr': { 'data-default-file':asset('recursos/imagenes/usuarios/'~ tusuario.foto) }}) }}</a>
                                <span class="text-danger">{{ form_errors(form.foto) }}</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="form-group col-sm-5">
                        {{ form_label(form.carnet) }}
                        {{ form_widget(form.carnet) }}
                        <span class="text-danger">{{ form_errors(form.carnet) }}</span>
                    </div>
                    <div class="form-group col-sm-2"></div>
                    <div class="form-group col-sm-5">
                        {{ form_label(form.celular) }}
                        {{ form_widget(form.celular) }}
                        <span class="text-danger">{{ form_errors(form.celular) }}</span>
                    </div>
                </div>

                <div class="row">
                    <div class="form-group col-sm-5">
                        {{ form_label(form.correo) }}
                        {{ form_widget(form.correo) }}
                        <span class="text-danger">{{ form_errors(form.correo) }}</span>
                    </div>

                </div>

                <div class="row">
                    <div class="form-group col-sm-12">
                        {{ form_label(form.domicilio) }}
                        {{ form_widget(form.domicilio) }}
                        <span class="text-danger">{{ form_errors(form.domicilio) }}</span>
                    </div>
                    <div class="form-group col-sm-2"></div>
                    <div class="form-group col-sm-12">
                        {{ form_label(form.observacion) }}
                        {{ form_widget(form.observacion) }}
                        <span class="text-danger">{{ form_errors(form.observacion) }}</span>
                    </div>
                </div>
            </div>
        </div><!-- /. columna1 -->

        <div class="col-sm-6">
            <div class="white-box">
                <h3 class="box-title">DATOS DE AUTENTICACIÓN</h3>
                <div class="row">
                    <div class="form-group col-sm-5">
                        {{ form_label(form.username) }}
                        {{ form_widget(form.username) }}
                        <span class="text-danger">{{ form_errors(form.username) }}</span>
                    </div>
                    <div class="form-group col-sm-2"></div>
                    <div class="form-group col-sm-5">
                        {{ form_label(form.idrol) }}
                        {{ form_widget(form.idrol) }}
                        <span class="text-danger">{{ form_errors(form.idrol) }}</span>
                    </div>
                </div>

                <div class="row">
                    <div class="form-group col-sm-5">
                        {{ form_label(form.plainPassword.first) }}
                        {{ form_widget(form.plainPassword.first) }}
{#                        <span class="text-danger">{{ form_errors(form.plainPassword.first) }}</span>#}
                        {% if ((mimensaje1 is defined) and (mimensaje1 is not null)) %}
                            <span class="text-danger">{{ mimensaje1 }}</span>
                        {% endif %}
                    </div>
                    <div class="form-group col-sm-2"></div>
                    <div class="form-group col-sm-5">
                        {{ form_label(form.plainPassword.second) }}
                        {{ form_widget(form.plainPassword.second) }}
                        <span class="text-danger">{{ form_errors(form.plainPassword.second) }}</span>
                    </div>
                </div>
                <div class="row">
                    <div class="form-group col-sm-5">
                        {{ form_label(form.estado) }}
                        {{ form_widget(form.estado) }}
                        <span class="text-danger">{{ form_errors(form.estado) }}</span>
                    </div>
                </div>

                <button type="submit" class="btn btn-info waves-effect waves-light m-r-10">Guardar</button>
                <a class="btn btn-inverse waves-effect waves-light" href="{{ path('tusuario_index') }}">Cancelar</a>
            </div>

        </div><!-- /. columna1 -->

    </div>

    {{ form_end(form) }}

{% endblock %}


{#{% extends 'base.html.twig' %}#}

{#{% block title %}Edit Tusuario{% endblock %}#}

{#{% block body %}#}
{#    <h1>Edit Tusuario</h1>#}

{#    {{ include('tusuario/_form.html.twig', {'button_label': 'Update'}) }}#}

{#    <a href="{{ path('tusuario_index') }}">back to list</a>#}

{#    {{ include('tusuario/_delete_form.html.twig') }}#}
{#{% endblock %}#}
