{% extends 'inc/base.html.twig' %}
{% block body %}
<style type="text/css">
/* Standard Tables */


table {
  margin: 1em 0;
  border-collapse: collapse;
  border: 0.1em solid #006699;
}

caption {
  text-align: left;
  font-style: italic;
  padding: 0.25em 0.5em 0.5em 0.5em;
}

th,
td {
  padding: 0.25em 0.5em 0.25em 1em;
  vertical-align: text-top;
  text-align: left;
  text-indent: -0.5em;
}

th {
  vertical-align: bottom;
  background-color: #009999;
  color: #fff;
}

tr:nth-child(even) th[scope=row] {
  background-color: #B2E5FF;
}

tr:nth-child(odd) th[scope=row] {
  background-color: #fff;
}

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

td:nth-of-type(2) {
  font-style: italic;
}

th:nth-of-type(3),
td:nth-of-type(3) {
  text-align: right;
}


/* Fixed Headers */

th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
}

th[scope=row] {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 1;
}

th[scope=row] {
  vertical-align: top;
  color: inherit;
  background-color: inherit;
  background: linear-gradient(90deg, transparent 0%, transparent calc(100% - .05em), #d6d6d6 calc(100% - .05em), #EBEBEB 100%);
}

th:not([scope=row]):first-child {
  left: 0;
  z-index: 3;
/*  background: linear-gradient(90deg, #666 0%, #666 calc(100% - .05em), #DDDDDD calc(100% - .05em), #EEEEEE 100%);     */
    background: #0085C7;
}

/* Scrolling wrapper */

div[tabindex="0"][aria-labelledby][role="region"] {
  overflow: auto;
}

div[tabindex="0"][aria-labelledby][role="region"]:focus {
  box-shadow: 0 0 .5em rgba(0,0,0,.5);
  outline: .1em solid rgba(0,0,0,.1);
}

div[tabindex="0"][aria-labelledby][role="region"] table {
  margin: 0;
}

div[tabindex="0"][aria-labelledby][role="region"].rowheaders {
  background:
    linear-gradient(to right, transparent 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), white 70%) 0 100%,
    radial-gradient(farthest-side at 0% 50%, rgba(0,0,0,0.2), rgba(0,0,0,0)),
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.2), rgba(0,0,0,0)) 0 100%;
  background-repeat: no-repeat;
  background-color: #fff;
  background-size: 4em 100%, 4em 100%, 1.4em 100%, 1.4em 100%;
  background-position: 0 0, 100%, 0 0, 100%;
  background-attachment: local, local, scroll, scroll;
}

div[tabindex="0"][aria-labelledby][role="region"].colheaders {
    background:
        linear-gradient(white 30%, rgba(255,255,255,0)),
        linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
        radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)),
        radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
    background-repeat: no-repeat;
    background-color: #fff;
    background-size: 100% 4em, 100% 4em, 100% 1.4em, 100% 1.4em;
    background-attachment: local, local, scroll, scroll;
}

/* Strictly for making the scrolling happen. */

th[scope=row] {
  min-width: 40vw;
}

@media all and (min-width: 30em) {
  th[scope=row] {
    min-width: 20em;
  }
}

th[scope=row] + td {
  min-width: 24em;
}

div[tabindex="0"][aria-labelledby][role="region"]:nth-child(3) {
  max-height: 18em;
}

div[tabindex="0"][aria-labelledby][role="region"]:nth-child(7) {
  max-height: 15em;
  margin: 0 1em;
}
</style>

<form id='vernotas' name="vernotas" action="{{ constant('URLROOT2') }}/educadores/AsistenciaGuardar" method="post">
<div class="container">
<div class='row'>
<div class='col-md-8'>
<!--<h2>Educador: {{ datos_educa.id_ed }}&nbsp;-&nbsp;{{ datos_educa.ape_ed}}&nbsp;{{ datos_educa.nom_ed }}</h2>
<strong style="font-size: larger">Curso:&nbsp;{{ datos_educa.no_cur }}&nbsp;&nbsp;&nbsp;T&eacute;cnica:&nbsp;{{ ver_tecnica.descripcion }}-({{ eval_control.tecnica }}) </strong>
<strong style="font-size: larger">Carga:&nbsp;{{ eval_control.carga_mes }}&nbsp;&nbsp;&nbsp;Mes:&nbsp;{{ datos_educa.no_mes }}&nbsp;&nbsp;&nbsp;A&ntilde;o:&nbsp;{{ datos_educa.no_anho }} </strong>
-->
<h2>Educador: {{ datos_educa.id_ed }}&nbsp;-&nbsp;{{ datos_educa.ape_ed}}&nbsp;{{ datos_educa.nom_ed }}</h2>
<strong style="font-size: larger">Curso:&nbsp;{{ eval_control.codigo }}&nbsp;&nbsp;&nbsp;T&eacute;cnica:&nbsp;{{ ver_tecnica.descripcion }}-({{ eval_control.tecnica }}) </strong>
<strong style="font-size: larger">Carga:&nbsp;{{ eval_control.carga_mes }}&nbsp;&nbsp;&nbsp;Mes:&nbsp;{{ eval_control.mes }}&nbsp;&nbsp;&nbsp;A&ntilde;o:&nbsp;{{ eval_control.ano }} </strong>

    <input type=hidden name="no_eval" id="no_eval" value="{{ nro_eval }}">
    <input type=hidden name="no_id"   id="no_id" value="{{ datos_educa.nro_id }}">
    <input type=hidden name="no_tec"  id="no_tec" value="{{ eval_control.tecnica }}">
    <input type=hidden name="no_cur"  id="no_cur" value="{{ eval_control.codigo }}">
    <input type=hidden name="hrs" id="hrs" value="{{ eval_control.horas_mes }}">
    <input type=hidden name="mes"   id="mes" value="{{ eval_control.mes }}">
    <input type=hidden name="anho"  id="anho" value="{{ eval_control.ano }}">
    <input type=hidden name="idd"  id="idd" value="{{ eval_control.id }}">
</div>

<div class='col-md-4 text-center'>
<button onclick="procesando();" type="submit" class="btn btn-success">Actualizar Asistencia</button>
<a href="javascript:history.back()" class="btn btn-danger pull-right"><i class="fa fa-backward"></i> Regresar</a>
<br><br>
<label>Rellenar Asistencia:<input class='form-control' id='no_notas' type="number" value="" /></label><button onclick="anotar();" type="button" class="btn btn-sm" style="background-color: #003366;color:#FFFFFF;"><b>Rellenar</b></button>

</div>
</div>
</div>
<div class="row bg-primary text-white">
<div class='col-md-3 text-center bg-warning'><b>LEYENDA</b></div>
<div class='col-md-2 text-center'><b>I: Inasistencia</b></div>
<div class='col-md-3 text-center'><b>J: Inasistencia Justificada</b></div>
<div class='col-md-2 text-center'><b>R: RETARDOS</b></div>
<div class='col-md-2 text-center'><b>P: Permiso</b></div>
</div>
<table class="table" style="font-size: x-small;">
  <thead style="background-color: #006699;color:#FFFFFF;">
    <tr class="">
    <th class=''>Alumnos</th>
    <th class='first-col"'>Cedula</th>
    <th class='text-center'>01</th>
    <th class='text-center'>02</th>
    <th class='text-center'>03</th>
    <th class='text-center'>04</th>
    <th class='text-center'>05</th>
    <th class='text-center'>06</th>
    <th class='text-center'>07</th>
    <th class='text-center'>08</th>
    <th class='text-center'>09</th>
    <th class='text-center'>10</th>
    <th class='text-center'>11</th>
    <th class='text-center'>12</th>
    <th class='text-center'>13</th>
    <th class='text-center'>14</th>
    <th class='text-center'>15</th>
    <th class='text-center'>16</th>
    <th class='text-center'>17</th>
    <th class='text-center'>18</th>
    <th class='text-center'>19</th>
    <th class='text-center'>20</th>
    <th class='text-center'>21</th>
    <th class='text-center'>22</th>
    <th class='text-center'>23</th>
    <th class='text-center'>24</th>
    <th class='text-center'>25</th>
    <th class='text-center'>26</th>
    <th class='text-center'>27</th>
    <th class='text-center'>28</th>
    <th class='text-center'>29</th>
    <th class='text-center'>30</th>
    <th class='text-center'>31</th>
    </tr>
  </thead>
  <tbody>
<!--{{ dump(eval_asiste) }}   -->
{% set nro=0 %}
{% for eval_nota in eval_asiste %}
    <tr class="">
    <th class='static'>{{ eval_nota.apellidos }}&nbsp;{{ eval_nota.nombres }} ({{ eval_nota.tag1 }})</th>
    <td class=''>{{ eval_nota.cedula }}</td>

        {% if  eval_nota.d1 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d1 }}" maxlength="2" min="0" max="20"  onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d2 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d2 }}" maxlength="2" min="0" max="20"  onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d3 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d3 }}" maxlength="2" min="0" max="20"  onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d4 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d4 }}" maxlength="2" min="0" max="20"  onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d5 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d5 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d6 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d6 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d7 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d7 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d8 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d8 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d9 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d9 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d10 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d10 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}

        {% if  eval_nota.d11 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d11 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d12 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d12 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d13 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d13 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d14 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d14 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d15 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d15 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d16 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d16 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d17 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d17 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d18 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d18 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d19 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d19 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d20 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d20 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}

        {% if  eval_nota.d21 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d21 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d22 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d22 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d23 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d23 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d24 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d24 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d25 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d25 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d26 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d26 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d27 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d27 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d28 == 'F' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d28 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d29 == 'F' or eval_nota.d29 == 'N' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d29 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d30 == 'F' or eval_nota.d30 == 'N' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d30 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
        {% if  eval_nota.d31 == 'F' or eval_nota.d31 == 'N' %}
        <td class='text-center'>F<input type="hidden" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="F"  /></td>
        {% else %}
        {% set nro=nro+1 %}
        <td class='text-center'><input style="width: 30px;" tabindex="{{ nro }}" type="text" id="nota" name="d1[{{ eval_nota.cedula }}][]" value="{{ eval_nota.d31 }}" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);" onkeyup="handleEnter(this,event,this.value);" onClick="foco(this.id);"/></td>
        {% endif %}
    </tr>
{% endfor %}

</tbody>
</table>

<!--</div> -->
</form>
<div class="row bg-primary text-white">
<div class='col-md-3 text-center bg-warning'><b>LEYENDA</b></div>
<div class='col-md-2 text-center'><b>I: Inasistencia</b></div>
<div class='col-md-3 text-center'><b>J: Inasistencia Justificada</b></div>
<div class='col-md-2 text-center'><b>R: RETARDOS</b></div>
<div class='col-md-2 text-center'><b>P: Permiso</b></div>
</div>
{% endblock %}
{% block javascripts %}

<script language="javascript">
function handleEnter (field, event,valor) {
//alert(valor);
if(valor==1 | valor==2 | valor==3 | valor==4 | valor==5 | valor==6 | valor=="I" | valor=="J" | valor=="R" | valor=="P" | valor=="i" | valor=="j" | valor=="r" | valor=="p"){
//break;
}else{
//alert("VALOR INVALIDO...");
		var i;
		for (i = 0; i < field.form.elements.length; i++){
 //       alert(i);
		if (field == field.form.elements[i])
        break;
        }
//        alert(i);
		field.form.elements[i].value="";
        field.form.elements[i].focus();
		return false;
}

/*	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (keyCode == 13) {
		var i;
		for (i = 0; i < field.form.elements.length; i++)
			if (field == field.form.elements[i])
				break;
		i = (i + 1) % field.form.elements.length;
		field.form.elements[i].focus();
		return false;
	}
	else
	return true;*/
}

function anotar(){
var valor = $("#no_notas").prop("value");
for (var i=0;i < document.forms["vernotas"].elements.length;i++)
{
if(document.vernotas.elements[i].type == "text"){
document.vernotas.elements[i].value=valor;
}
}
}

function borrarvalor (field) {
//alert(field);
		var i;
		for (i = 0; i < field.form.elements.length; i++){
		if (field == field.form.elements[i])
        break;
        }
		field.form.elements[i].value="";
        field.form.elements[i].focus();
		return false;
}
</script>
</script>
{% endblock %}