<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* educadores/notas_agregar.html.twig */
class __TwigTemplate_948ee30424cdb02fd55d58f2d6e342ee extends \Twig\Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'body' => [$this, 'block_body'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "inc/base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $this->parent = $this->loadTemplate("inc/base.html.twig", "educadores/notas_agregar.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 2
    public function block_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 3
        echo "<div class=\"container\">
<div class='row'>
<div class='col-md-8'>
<h2>Educador: ";
        // line 6
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "id_ed", [], "any", false, false, false, 6), "html", null, true);
        echo "&nbsp;-&nbsp;";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "ape_ed", [], "any", false, false, false, 6), "html", null, true);
        echo "&nbsp;";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "nom_ed", [], "any", false, false, false, 6), "html", null, true);
        echo "</h2>
<strong style=\"font-size: larger\">Curso:&nbsp;";
        // line 7
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "codigo", [], "any", false, false, false, 7), "html", null, true);
        echo "&nbsp;&nbsp;&nbsp;T&eacute;cnica:&nbsp;";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["ver_tecnica"] ?? null), "descripcion", [], "any", false, false, false, 7), "html", null, true);
        echo "-(";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "tecnica", [], "any", false, false, false, 7), "html", null, true);
        echo ") </strong>
<strong style=\"font-size: larger\">Carga:&nbsp;";
        // line 8
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "carga_mes", [], "any", false, false, false, 8), "html", null, true);
        echo "&nbsp;&nbsp;&nbsp;Mes:&nbsp;";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "mes", [], "any", false, false, false, 8), "html", null, true);
        echo "&nbsp;&nbsp;&nbsp;A&ntilde;o:&nbsp;";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "ano", [], "any", false, false, false, 8), "html", null, true);
        echo " </strong>
<!--nro:";
        // line 9
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "nro_eval", [], "any", false, false, false, 9), "html", null, true);
        echo "  -->
</div>
<div class='col-md-4 text-center'>
";
        // line 12
        $context["nro_eval"] = twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "nro_eval", [], "any", false, false, false, 12);
        // line 13
        echo "<a href=\"";
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/evaluaciones/";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "id", [], "any", false, false, false, 13), "html", null, true);
        echo "\" class=\"btn btn-danger pull-right\"><i class=\"fa fa-backward\"></i> Regresar</a>
</div>
";
        // line 15
        if ( !twig_test_empty(($context["msj_err"] ?? null))) {
            // line 16
            echo "<div class=\"col-12 text-center\">
<div class=\"alert alert-danger\" role=\"alert\">
    ";
            // line 18
            echo twig_escape_filter($this->env, ($context["msj_err"] ?? null), "html", null, true);
            echo "
</div>
</div>
";
        }
        // line 22
        echo "</div>
</div>
";
        // line 24
        $context["nro_eval"] = (($context["nro_eval"] ?? null) + 1);
        // line 25
        echo "<div class=\"mx-auto\" style=\"width: 750px;\">
<form id='add_nt' action=\"";
        // line 26
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/guardarEval\" method=\"post\">
    <div class=\"modal-content\">
      <div class=\"modal-header\">
        <h5 class=\"modal-title\" id=\"exampleModalLabel\">Carga de Notas - ";
        // line 29
        echo twig_escape_filter($this->env, ($context["nro_eval"] ?? null), "html", null, true);
        echo "</h5>
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
          <span aria-hidden=\"true\">&times;</span>
        </button>
      </div>
    <div class=\"modal-body\">
    <div class=\"form-row\">
        <div class=\"form-group col-md-4\">

            <label for=\"message-text\">Fecha de la Evaluaci&oacute;n - No.:";
        // line 38
        echo twig_escape_filter($this->env, ($context["nro_eval"] ?? null), "html", null, true);
        echo "</label>
            <input class=\"form-control\" type=\"date\" id=\"fecha\" name=\"fecha\" value=\"";
        // line 39
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["data"] ?? null), "dia_hoy", [], "any", false, false, false, 39), "html", null, true);
        echo "\"  required/>
        </div>

        <div class=\"form-group col-md-8\">
        <label for=\"recipient-name\">Objetivo:</label>
        <input class=\"form-control\" type=\"text\" id=\"objetivo\" name=\"objetivo\" value=\"\" maxlength=\"100\" required/>
        </div>
    </div>
    <div class=\"form-row\">
    <input type=hidden name=\"no_eval\" id=\"no_eval\" value=\"";
        // line 48
        echo twig_escape_filter($this->env, ($context["nro_eval"] ?? null), "html", null, true);
        echo "\">
    <input type=hidden name=\"no_id\"   id=\"no_id\" value=\"";
        // line 49
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "nro_id", [], "any", false, false, false, 49), "html", null, true);
        echo "\">
    <input type=hidden name=\"no_tec\"  id=\"no_tec\" value=\"";
        // line 50
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "tecnica", [], "any", false, false, false, 50), "html", null, true);
        echo "\">
    <input type=hidden name=\"no_cur\"  id=\"no_cur\" value=\"";
        // line 51
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "codigo", [], "any", false, false, false, 51), "html", null, true);
        echo "\">

    <input type=hidden name=\"carga\" id=\"carga\" value=\"";
        // line 53
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "carga_mes", [], "any", false, false, false, 53), "html", null, true);
        echo "\">
    <input type=hidden name=\"mes\"   id=\"mes\" value=\"";
        // line 54
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "mes", [], "any", false, false, false, 54), "html", null, true);
        echo "\">
    <input type=hidden name=\"anho\"  id=\"anho\" value=\"";
        // line 55
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "ano", [], "any", false, false, false, 55), "html", null, true);
        echo "\">

<table class=\"table table-striped table-hover table-sm\" style=\"font-size: small;\">
<thead style=\"background-color: #006699;color:#FFFFFF;\">
    <tr class=\"d-flex\">
    <th class='col-sm-1 text-center'>No.</th>
    <th class='col-sm-2 text-center'>Cedula</th>
    <th class='col-sm-7 text-center'>Alumnos</th>
    <th class='col-sm-2 text-center'>Nota 1</th>
    </tr>
</thead>
<tbody>
";
        // line 67
        $context["nro"] = 1;
        // line 68
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["eval_notas"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["eval_nota"]) {
            // line 69
            echo "    <tr class=\"d-flex\">
      <td class='col-sm-1 text-center'>";
            // line 70
            echo twig_escape_filter($this->env, ($context["nro"] ?? null), "html", null, true);
            echo "</td>
      <td class='col-sm-2 text-center'>";
            // line 71
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "cedula", [], "any", false, false, false, 71), "html", null, true);
            echo "</td>

";
            // line 73
            if ((twig_get_attribute($this->env, $this->source, $context["eval_nota"], "tag1", [], "any", false, false, false, 73) == "ACTIVO")) {
                // line 74
                echo "      <th class='col-sm-7 text-center'>";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "apellidos", [], "any", false, false, false, 74), "html", null, true);
                echo "&nbsp;";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "nombres", [], "any", false, false, false, 74), "html", null, true);
                echo "&nbsp;(";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "tag1", [], "any", false, false, false, 74), "html", null, true);
                echo ")</th>
";
            } else {
                // line 76
                echo "      <th class='col-sm-7 text-center' style=\"color:#FA0000;\">";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "apellidos", [], "any", false, false, false, 76), "html", null, true);
                echo "&nbsp;";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "nombres", [], "any", false, false, false, 76), "html", null, true);
                echo "&nbsp;(";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "tag1", [], "any", false, false, false, 76), "html", null, true);
                echo ")</th>
";
            }
            // line 78
            echo "
      <th class='col-sm-2 text-center'>

    <input type=hidden name=\"ced[]\" id=\"ced\" value=\"";
            // line 81
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["eval_nota"], "cedula", [], "any", false, false, false, 81), "html", null, true);
            echo "\">
    <input style=\"heigth : 1px\" class=\"text-center\" tabindex=\"";
            // line 82
            echo twig_escape_filter($this->env, ($context["nro"] ?? null), "html", null, true);
            echo "\" type=\"number\" step='0.01' id=\"nota\" name=\"nota[]\" size=\"5\" value=\"\" maxlength=\"5\" min=\"0\" max=\"20\" onfocus=\"this.select();\" ondblclick=\"borrarvalor(this);\" />


      </th>
    </tr>
";
            // line 87
            $context["nro"] = (($context["nro"] ?? null) + 1);
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['eval_nota'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 89
        echo "</tbody>
</table>
    </div>
     </div>


      <div class=\"modal-footer\">
        <button type=\"submit\" class=\"btn btn-success\">Guardar Registro</button>
<a href=\"";
        // line 97
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/evaluaciones/";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "id", [], "any", false, false, false, 97), "html", null, true);
        echo "\" class=\"btn btn-danger pull-right\"><i class=\"fa fa-backward\"></i> Regresar</a>
      </div>

    </div>
  </form>
</div>

<div class=\"modal fade bd-modal-lg\" id=\"ModalModNota\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-lg\" role=\"document\">
<!--<form action=\"";
        // line 106
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/EditarEval\" method=\"post\">
-->

<form action=\"";
        // line 109
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/guardarEval\" method=\"post\">
    <div class=\"modal-content\">
      <div class=\"modal-header\">
        <h5 class=\"modal-title\" id=\"exampleModalLabel\">Modificando de Notas</h5>
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
          <span aria-hidden=\"true\">&times;</span>
        </button>
      </div>
    <div class=\"modal-body\">
    <div class=\"form-row\">
        <div class=\"form-group col-md-4\">
            <label for=\"message-text\">Fecha de la Evaluaci&oacute;n</label>
            <input class=\"form-control\" type=\"date\" id=\"fecha\" name=\"fecha\" value=\"";
        // line 121
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["data"] ?? null), "dia_hoy", [], "any", false, false, false, 121), "html", null, true);
        echo "\"  required/>
        </div>

        <div class=\"form-group col-md-8\">
        <label for=\"recipient-name\">Objetivo:</label>
        <input class=\"form-control\" type=\"text\" id=\"objetivo\" name=\"objetivo\" value=\"\" maxlength=\"100\" required/>
        </div>
    </div>
    <div class=\"form-row\">
    <input type=hidden name=\"no_eval\" id=\"no_eval\" value=\"";
        // line 130
        echo twig_escape_filter($this->env, ($context["nro_eval"] ?? null), "html", null, true);
        echo "\">
    <input type=hidden name=\"no_id\"   id=\"no_id\" value=\"";
        // line 131
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["datos_educa"] ?? null), "nro_id", [], "any", false, false, false, 131), "html", null, true);
        echo "\">
    <input type=hidden name=\"no_tec\"  id=\"no_tec\" value=\"";
        // line 132
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "tecnica", [], "any", false, false, false, 132), "html", null, true);
        echo "\">
    <input type=hidden name=\"no_cur\"  id=\"no_cur\" value=\"";
        // line 133
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "codigo", [], "any", false, false, false, 133), "html", null, true);
        echo "\">

    <input type=hidden name=\"carga\" id=\"carga\" value=\"";
        // line 135
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "carga_mes", [], "any", false, false, false, 135), "html", null, true);
        echo "\">
    <input type=hidden name=\"mes\"   id=\"mes\" value=\"";
        // line 136
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "mes", [], "any", false, false, false, 136), "html", null, true);
        echo "\">
    <input type=hidden name=\"anho\"  id=\"anho\" value=\"";
        // line 137
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "ano", [], "any", false, false, false, 137), "html", null, true);
        echo "\">

<div class='col-md-12' id=\"vvnotas\">
</div>
</div>
</div>
<div class=\"modal-footer\">
<button type=\"submit\" class=\"btn btn-success\">Guardar Registro</button>
<a href=\"";
        // line 145
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/evaluaciones/";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["eval_control"] ?? null), "id", [], "any", false, false, false, 145), "html", null, true);
        echo "\" class=\"btn btn-danger pull-right\"><i class=\"fa fa-backward\"></i> Regresar</a>

      </div>
    </div>
  </form>
  </div>
</div>
";
    }

    // line 153
    public function block_javascripts($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 154
        echo "<style type=\"text/css\">
label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; font-size: 12px; }
</style>
<script>
var fecha = new Date();
var anio = fecha.getFullYear();
var _dia = fecha.getDate();
var _mes = fecha.getMonth(); //viene con valores de 0 al 11
_mes = _mes + 1; //ahora lo tienes de 1 al 12

var dia =String(_dia).padStart(2, \"0\");
var mes =String(_mes).padStart(2, \"0\");

let fecha_minimo = anio + '-' + mes + '-' + dia; // Nueva variable
document.getElementById(\"fecha\").max = fecha_minimo;
//alert(fecha_minimo);
        \$(\"#monto2\").inputmask({
        'alias': 'decimal',
        'integerDigits': 5,
        'digits': 2,
        'digitsOptional': false,
        'placeholder': '0',
        'allowMinus': false,
        'groupSeparator': '.',
        'radixPoint': ',',
        'autoGroup': true
    });

//function asigap(){
\$(document).on('click', '#asigap', function (e) {
        var token = \$(this).data('token');
        var fecha = \$(this).data('fecha');
        var objetivo = \$(this).data('eval');
        var nro_eval = \$(this).data('nro');
       // alert(token);
   \t\t\$.ajax({
\t\turl: '";
        // line 190
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/notas_mod/'+token,
\t\ttype: \"POST\",
        cache: false,
          beforeSend: function() {
          procesando();
          },
        data: \"submit\",
        success: function(datos){
        Swal.close();
       //     alert(datos);
            if(datos==\"No existe...\"){
            toastr[\"error\"](\"EL REGISTRO NO EXISTE O ESTA ASIGNADO A UNA EMPRESA...\", \"IMPORTANTE...\")
            }else{
            \$('#vvnotas').html(datos);
                var modal = \$('#ModalModNota')
                //    modal.find('.modal-title').text('Modificar país: '+nombre)
                modal.find('.modal-body #no_eval').val(nro_eval)
                modal.find('.modal-body #fecha').val(fecha)
                modal.find('.modal-body #objetivo').val(objetivo)
                \$('#ModalModNota').modal({show:true});
                //\$('#edit01 .modal-body').load('alumnos_asg.php?id='+idcon,function(){
                //});
            }
            }
\t\t});
\t\treturn false;
//}
});

\$(document).on('click', '#asigapxx', function (e) {
        e.preventDefault();
        var id = \$(this).data('id');
        var token = \$(this).data('token');
        var ruta = \$(this).data('ruta');
//alert(id);
Swal({
    title: 'Esta seguro de ELIMINAR el registro ?',
    text: \"No puede revertir este proceso !\",
    type: 'question',
    showCancelButton: true,
    confirmButtonColor: '#FF0000',
    cancelButtonColor: '#006600',
    confirmButtonText: 'Si, eliminarlo...',
    cancelButtonText: 'No, cancelar',
}).then((result) => {
    if (result.value) {
    \t\t\$.ajax({
                        url: '";
        // line 237
        echo twig_escape_filter($this->env, twig_constant("URLROOT2"), "html", null, true);
        echo "/educadores/notas_del/'+id,
                        cache: false,
                        type: \"POST\",
                data: {id:id,_method: 'delete', token :token},
                success: function(datos){
                //alert(datos);
                if(datos==\"NOPUEDEBORRAR\"){
                toastr[\"error\"](\"EL REGISTRO NO PUEDE SER ELIMINADO\", \"IMPORTANTE...\")
                }else{
                location.reload();
                }
                }
                });
    }
})
});


\$(document).ready(function() {
\$('#add_nt').submit(function(e){
e.preventDefault();
//procesando();
}).validate({
debug: false,
rules: {
fecha: {required: true},
objetivo: {required: true},
},
messages: {
fecha: {
required:  'Introduce una fecha'},
objetivo: {
required: 'Introduce un objetivo'},
},
submitHandler: function(form){
procesando();
form.submit();
}
});
});

</script>
";
    }

    public function getTemplateName()
    {
        return "educadores/notas_agregar.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  454 => 237,  404 => 190,  366 => 154,  362 => 153,  348 => 145,  337 => 137,  333 => 136,  329 => 135,  324 => 133,  320 => 132,  316 => 131,  312 => 130,  300 => 121,  285 => 109,  279 => 106,  265 => 97,  255 => 89,  249 => 87,  241 => 82,  237 => 81,  232 => 78,  222 => 76,  212 => 74,  210 => 73,  205 => 71,  201 => 70,  198 => 69,  194 => 68,  192 => 67,  177 => 55,  173 => 54,  169 => 53,  164 => 51,  160 => 50,  156 => 49,  152 => 48,  140 => 39,  136 => 38,  124 => 29,  118 => 26,  115 => 25,  113 => 24,  109 => 22,  102 => 18,  98 => 16,  96 => 15,  88 => 13,  86 => 12,  80 => 9,  72 => 8,  64 => 7,  56 => 6,  51 => 3,  47 => 2,  36 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends 'inc/base.html.twig' %}
{% block body %}
<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;{{ 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>
<!--nro:{{ datos_educa.nro_eval }}  -->
</div>
<div class='col-md-4 text-center'>
{% set nro_eval=datos_educa.nro_eval %}
<a href=\"{{ constant('URLROOT2') }}/educadores/evaluaciones/{{ eval_control.id }}\" class=\"btn btn-danger pull-right\"><i class=\"fa fa-backward\"></i> Regresar</a>
</div>
{% if msj_err is not empty %}
<div class=\"col-12 text-center\">
<div class=\"alert alert-danger\" role=\"alert\">
    {{ msj_err }}
</div>
</div>
{% endif %}
</div>
</div>
{% set nro_eval=nro_eval+1 %}
<div class=\"mx-auto\" style=\"width: 750px;\">
<form id='add_nt' action=\"{{ constant('URLROOT2') }}/educadores/guardarEval\" method=\"post\">
    <div class=\"modal-content\">
      <div class=\"modal-header\">
        <h5 class=\"modal-title\" id=\"exampleModalLabel\">Carga de Notas - {{ nro_eval }}</h5>
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
          <span aria-hidden=\"true\">&times;</span>
        </button>
      </div>
    <div class=\"modal-body\">
    <div class=\"form-row\">
        <div class=\"form-group col-md-4\">

            <label for=\"message-text\">Fecha de la Evaluaci&oacute;n - No.:{{ nro_eval }}</label>
            <input class=\"form-control\" type=\"date\" id=\"fecha\" name=\"fecha\" value=\"{{ data.dia_hoy }}\"  required/>
        </div>

        <div class=\"form-group col-md-8\">
        <label for=\"recipient-name\">Objetivo:</label>
        <input class=\"form-control\" type=\"text\" id=\"objetivo\" name=\"objetivo\" value=\"\" maxlength=\"100\" required/>
        </div>
    </div>
    <div class=\"form-row\">
    <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=\"carga\" id=\"carga\" value=\"{{ eval_control.carga_mes }}\">
    <input type=hidden name=\"mes\"   id=\"mes\" value=\"{{ eval_control.mes }}\">
    <input type=hidden name=\"anho\"  id=\"anho\" value=\"{{ eval_control.ano }}\">

<table class=\"table table-striped table-hover table-sm\" style=\"font-size: small;\">
<thead style=\"background-color: #006699;color:#FFFFFF;\">
    <tr class=\"d-flex\">
    <th class='col-sm-1 text-center'>No.</th>
    <th class='col-sm-2 text-center'>Cedula</th>
    <th class='col-sm-7 text-center'>Alumnos</th>
    <th class='col-sm-2 text-center'>Nota 1</th>
    </tr>
</thead>
<tbody>
{% set nro = 1 %}
{% for eval_nota in eval_notas %}
    <tr class=\"d-flex\">
      <td class='col-sm-1 text-center'>{{ nro }}</td>
      <td class='col-sm-2 text-center'>{{ eval_nota.cedula }}</td>

{% if eval_nota.tag1 == 'ACTIVO' %}
      <th class='col-sm-7 text-center'>{{ eval_nota.apellidos }}&nbsp;{{ eval_nota.nombres }}&nbsp;({{ eval_nota.tag1 }})</th>
{% else %}
      <th class='col-sm-7 text-center' style=\"color:#FA0000;\">{{ eval_nota.apellidos }}&nbsp;{{ eval_nota.nombres }}&nbsp;({{ eval_nota.tag1 }})</th>
{% endif %}

      <th class='col-sm-2 text-center'>

    <input type=hidden name=\"ced[]\" id=\"ced\" value=\"{{ eval_nota.cedula }}\">
    <input style=\"heigth : 1px\" class=\"text-center\" tabindex=\"{{ nro }}\" type=\"number\" step='0.01' id=\"nota\" name=\"nota[]\" size=\"5\" value=\"\" maxlength=\"5\" min=\"0\" max=\"20\" onfocus=\"this.select();\" ondblclick=\"borrarvalor(this);\" />


      </th>
    </tr>
{% set nro = nro+1 %}
{% endfor %}
</tbody>
</table>
    </div>
     </div>


      <div class=\"modal-footer\">
        <button type=\"submit\" class=\"btn btn-success\">Guardar Registro</button>
<a href=\"{{ constant('URLROOT2') }}/educadores/evaluaciones/{{ eval_control.id }}\" class=\"btn btn-danger pull-right\"><i class=\"fa fa-backward\"></i> Regresar</a>
      </div>

    </div>
  </form>
</div>

<div class=\"modal fade bd-modal-lg\" id=\"ModalModNota\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-lg\" role=\"document\">
<!--<form action=\"{{ constant('URLROOT2') }}/educadores/EditarEval\" method=\"post\">
-->

<form action=\"{{ constant('URLROOT2') }}/educadores/guardarEval\" method=\"post\">
    <div class=\"modal-content\">
      <div class=\"modal-header\">
        <h5 class=\"modal-title\" id=\"exampleModalLabel\">Modificando de Notas</h5>
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
          <span aria-hidden=\"true\">&times;</span>
        </button>
      </div>
    <div class=\"modal-body\">
    <div class=\"form-row\">
        <div class=\"form-group col-md-4\">
            <label for=\"message-text\">Fecha de la Evaluaci&oacute;n</label>
            <input class=\"form-control\" type=\"date\" id=\"fecha\" name=\"fecha\" value=\"{{ data.dia_hoy }}\"  required/>
        </div>

        <div class=\"form-group col-md-8\">
        <label for=\"recipient-name\">Objetivo:</label>
        <input class=\"form-control\" type=\"text\" id=\"objetivo\" name=\"objetivo\" value=\"\" maxlength=\"100\" required/>
        </div>
    </div>
    <div class=\"form-row\">
    <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=\"carga\" id=\"carga\" value=\"{{ eval_control.carga_mes }}\">
    <input type=hidden name=\"mes\"   id=\"mes\" value=\"{{ eval_control.mes }}\">
    <input type=hidden name=\"anho\"  id=\"anho\" value=\"{{ eval_control.ano }}\">

<div class='col-md-12' id=\"vvnotas\">
</div>
</div>
</div>
<div class=\"modal-footer\">
<button type=\"submit\" class=\"btn btn-success\">Guardar Registro</button>
<a href=\"{{ constant('URLROOT2') }}/educadores/evaluaciones/{{ eval_control.id }}\" class=\"btn btn-danger pull-right\"><i class=\"fa fa-backward\"></i> Regresar</a>

      </div>
    </div>
  </form>
  </div>
</div>
{% endblock %}
{% block javascripts %}
<style type=\"text/css\">
label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; font-size: 12px; }
</style>
<script>
var fecha = new Date();
var anio = fecha.getFullYear();
var _dia = fecha.getDate();
var _mes = fecha.getMonth(); //viene con valores de 0 al 11
_mes = _mes + 1; //ahora lo tienes de 1 al 12

var dia =String(_dia).padStart(2, \"0\");
var mes =String(_mes).padStart(2, \"0\");

let fecha_minimo = anio + '-' + mes + '-' + dia; // Nueva variable
document.getElementById(\"fecha\").max = fecha_minimo;
//alert(fecha_minimo);
        \$(\"#monto2\").inputmask({
        'alias': 'decimal',
        'integerDigits': 5,
        'digits': 2,
        'digitsOptional': false,
        'placeholder': '0',
        'allowMinus': false,
        'groupSeparator': '.',
        'radixPoint': ',',
        'autoGroup': true
    });

//function asigap(){
\$(document).on('click', '#asigap', function (e) {
        var token = \$(this).data('token');
        var fecha = \$(this).data('fecha');
        var objetivo = \$(this).data('eval');
        var nro_eval = \$(this).data('nro');
       // alert(token);
   \t\t\$.ajax({
\t\turl: '{{ constant(\"URLROOT2\") }}/educadores/notas_mod/'+token,
\t\ttype: \"POST\",
        cache: false,
          beforeSend: function() {
          procesando();
          },
        data: \"submit\",
        success: function(datos){
        Swal.close();
       //     alert(datos);
            if(datos==\"No existe...\"){
            toastr[\"error\"](\"EL REGISTRO NO EXISTE O ESTA ASIGNADO A UNA EMPRESA...\", \"IMPORTANTE...\")
            }else{
            \$('#vvnotas').html(datos);
                var modal = \$('#ModalModNota')
                //    modal.find('.modal-title').text('Modificar país: '+nombre)
                modal.find('.modal-body #no_eval').val(nro_eval)
                modal.find('.modal-body #fecha').val(fecha)
                modal.find('.modal-body #objetivo').val(objetivo)
                \$('#ModalModNota').modal({show:true});
                //\$('#edit01 .modal-body').load('alumnos_asg.php?id='+idcon,function(){
                //});
            }
            }
\t\t});
\t\treturn false;
//}
});

\$(document).on('click', '#asigapxx', function (e) {
        e.preventDefault();
        var id = \$(this).data('id');
        var token = \$(this).data('token');
        var ruta = \$(this).data('ruta');
//alert(id);
Swal({
    title: 'Esta seguro de ELIMINAR el registro ?',
    text: \"No puede revertir este proceso !\",
    type: 'question',
    showCancelButton: true,
    confirmButtonColor: '#FF0000',
    cancelButtonColor: '#006600',
    confirmButtonText: 'Si, eliminarlo...',
    cancelButtonText: 'No, cancelar',
}).then((result) => {
    if (result.value) {
    \t\t\$.ajax({
                        url: '{{ constant(\"URLROOT2\") }}/educadores/notas_del/'+id,
                        cache: false,
                        type: \"POST\",
                data: {id:id,_method: 'delete', token :token},
                success: function(datos){
                //alert(datos);
                if(datos==\"NOPUEDEBORRAR\"){
                toastr[\"error\"](\"EL REGISTRO NO PUEDE SER ELIMINADO\", \"IMPORTANTE...\")
                }else{
                location.reload();
                }
                }
                });
    }
})
});


\$(document).ready(function() {
\$('#add_nt').submit(function(e){
e.preventDefault();
//procesando();
}).validate({
debug: false,
rules: {
fecha: {required: true},
objetivo: {required: true},
},
messages: {
fecha: {
required:  'Introduce una fecha'},
objetivo: {
required: 'Introduce un objetivo'},
},
submitHandler: function(form){
procesando();
form.submit();
}
});
});

</script>
{% endblock %}", "educadores/notas_agregar.html.twig", "/home/sircone1/domains/sirconet.com.ve/public_html/adiestra/edutec/app/views/educadores/notas_agregar.html.twig");
    }
}
