
{% extends 'CmBundle:Z:baseDos.html.twig' %}

{% block stylesheet %}
    <style>
        label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; font-size: 12px; }
    </style>
{% endblock %}

{% block javascripts %}
    <script src="{{asset('js/misJs/validarProfesor.js')}}"></script>
{% endblock %}

{% block content %}
    <div class="row">
        <h3 class="text-center">EDITAR DE PROFESOR</h3>
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <form role="form" action="{{path('editar_profesor')}}" method="POST" id="form-profesor">
                <div class="col-lg-4">
                    <div class="form-group input-group">
                        <span class="input-group-addon">Ape. Paterno:</span>
                        <input type="text" class="form-control" id="apePat" name="apePat" placeholder="Apellido Paterno" value="{{profe.apePat}}">
                        <input type="hidden" class="form-control" id="idePro" name="idePro" value="{{profe.idePro}}">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-4">
                    <div class="form-group input-group">
                        <span class="input-group-addon">Ape. Materno:</span>
                        <input type="text" class="form-control" id="apeMat" name="apeMat" placeholder="Apellido Materno" value="{{profe.apeMat}}">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-4">
                    <div class="form-group input-group">
                        <span class="input-group-addon">Nombre:</span>
                        <input type="text" class="form-control" id="nomPro" name="nomPro" placeholder="Nombre" value="{{profe.nomPro}}">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-6">
                    <div class="form-group input-group">
                        <span class="input-group-addon">RFC:</span>
                        <input type="text" class="form-control" id="rfc" name="rfc" placeholder="Ingresa RFC" value="{{profe.rfc}}" readonly="true">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-6">
                    <div class="form-group input-group">
                        <span class="input-group-addon">E-mail</span>
                        <input type="email" class="form-control" id="email" name="email" placeholder="Email" value="{{profe.email}}">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-6">
                    <div class="form-group input-group">
                        <span class="input-group-addon">Celular</span>
                        <input type="tel" class="form-control" id="celular" name="celular" placeholder="Celular" value="{{profe.celular}}">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-6">
                    <div class="form-group input-group">
                        <span class="input-group-addon">CÉDULA</span>
                        <input type="text" class="form-control" id="cedula" name="cedula" placeholder="Cédula" value="{{profe.cedula}}">
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->
                <div class="col-lg-6">
                    <div class="form-group input-group">
                        <span class="input-group-addon">Nivel Académico</span>
                        <select class="form-control" id="cveLic" name="cveLic">
                            <option value="default">Selecciona</option>
                            {% if especialidades is defined %}
                                {% set nivel = 0 %}

                                {% for l in especialidades %}
                                    {% if nivel != l.cveNivAca.ideNivAca %}
                                        <optgroup label="{{l.cveNivAca.nombre}}">
                                            {% set nivel = l.cveNivAca.ideNivAca %}
                                        {% else %}
                                        {% endif %}
                                        {% if profe.cveLic != null %}
                                            {% if l.ideLic == profe.cveLic.ideLic %}
                                                <option value="{{l.ideLic}}" selected="true">{{l.nomLic}}</option>
                                            {% else %}
                                                <option value="{{l.ideLic}}">{{l.nomLic}}</option>
                                            {% endif %}
                                        {% else %}
                                            <option value="{{l.ideLic}}">{{l.nomLic}}</option>
                                        {% endif %}


                                    {% endfor %}
                                {% endif %}
                        </select>
                    </div><!-- FIN INPUT-GROUP -->
                </div><!-- FIN COL-LG-6 -->

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10 text-left">
                        <a href="{{path('consulta_profesor')}}" class="btn btn-success">
                            Finalizar
                        </a>
                    </div>
                    <div class="col-sm-offset-2 col-sm-10 text-right">
                        <button type="submit" class="btn btn-primary">Actualizar</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

{% endblock %}