{% 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='actitudina' name='actitudina' action="{{ constant('URLROOT2') }}/educadores/ActitudinalesGuardar" method="post">
<div class="container-fluid">
<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">Guardar Registro</button>
<a href="javascript:history.back()" class="btn btn-danger pull-right"><i class="fa fa-backward"></i> Regresar</a>
<br><br>
<label>Rellenar Actitudinales:<input class='form-control' id='no_notas' type="number" value="" /></label><button onclick="actitul();" type="button" class="btn btn-sm" style="background-color: #003366;color:#FFFFFF;"><b>Rellenar</b></button>

</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>01-13 (D): Deficiente</b></div>
<div class='col-md-3 text-center'><b>14-16 (B): Bueno</b></div>
<div class='col-md-2 text-center'><b>17-18 (MB): Muy Bueno</b></div>
<div class='col-md-2 text-center'><b>19-20 (E): Excelente</b></div>
</div>

<table class="table" style="font-size: small;">
  <thead style="background-color: #006699;color:#FFFFFF;">
    <tr class="">
    <th class=''>APRENDICES</th>
    <th class='first-col"'>C&Eacute;DULA</th>
    <th class='text-center'>PUNTUALIDAD</th>
    <th class='text-center'>RESPONSABILIDAD</th>
    <th class='text-center'>COOPERACION</th>
    <th class='text-center'>PRESENTACION PERSONAL</th>
    <th class='text-center'>HONESTIDAD</th>
    <th class='text-center'>RESPETO</th>
    <th class='text-center'>INTEGRACION GRUPAL</th>
    <th class='text-center'>INICIATIVA</th>
    <th class='text-center'>MOTIVACION</th>
    </tr>
  </thead>
  <tbody>
{% set nro = 1 %}
{% for eval_nota in eval_alumnos %}
    <tr>
    <th>{{ eval_nota.apellidos }}&nbsp;{{ eval_nota.nombres }}<br>({{ eval_nota.tag1 }})</th>
    <td><b>{{ eval_nota.cedula }}</b></td>
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    <td class='text-center'><input style="width: 35px;" tabindex="{{ nro }}" type="number" id="{{ eval_nota.cedula }}" name="d1[{{ eval_nota.cedula }}][]" value="" maxlength="2" min="0" max="20" onfocus="this.select();" ondblclick="borrarvalor(this);"/></td>
{% set nro = nro+1 %}
    </tr>

{% endfor %}

</tbody>
</table>

<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>01-13 (D): Deficiente</b></div>
<div class='col-md-3 text-center'><b>14-16 (B): Bueno</b></div>
<div class='col-md-2 text-center'><b>17-18 (MB): Muy Bueno</b></div>
<div class='col-md-2 text-center'><b>19-20 (E): Excelente</b></div>
</div>
</div>
</form>

{% endblock %}
{% block javascripts %}
<script language="javascript">
function actitul(){
var valor = $("#no_notas").prop("value");
for (var i=0;i < document.forms["actitudina"].elements.length;i++)
{
if(document.actitudina.elements[i].type == "number"){
document.actitudina.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>
{% endblock %}