<?php echo csrf_field(); ?>

<form id='form-update'>
  <input type="hidden" name="configuracion" id="configuracion" value="{{ $c->id }}">
  <div class="row form-group">
    <div class="col-lg-3 col-md-1 col-sm-12"></div>
    <div class="col-lg-6 col-md-10 col-sm-12">

      <div class="text-center"><h2>Aplicación del Examen</h2></div>
      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='periodo'>Periodo:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <select class="form-control form-control-sm" id="periodo" name="periodo" readonly>
            <option value>.:Seleccione:.</option>
            @foreach ($periodos as $p)
              <option value='{{ $p->id }}' {{ $p->id==$c->periodo_id ? 'selected' : '' }}>{{ $p->periodo }}</option>
            @endforeach
          </select>
        </div>
      </div>
      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='fecha'>Fecha de aplicación:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="date" class="form-control form-control-sm" required="required" id="fecha" name="fecha" required="required" value="{{ $c->fecha->format('Y-m-d') }}" />
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='inicio'>Hora de Inicio:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="time" class="form-control form-control-sm" required="required" id='inicio' name="inicio" required="required" value='{{ $c->hora_inicio }}' />
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='cierre'>Hora de Cierre:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="time" class="form-control form-control-sm" required="required" id='cierre' name="cierre" required="required" value='{{ $c->hora_cierre }}' />
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='duracion'>Duración:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <div class="input-group">
            <input type="text" class="form-control form-control-sm" placeholder="" id="duracion" name="duracion" value="{{ $c->duracion }}">
            <span class="input-group-addon" id="">minutos</span>
          </div>
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='publicacion'>Publicación de grupos:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="date" class="form-control form-control-sm" required id="publicacion" name="publicacion" value="{{ $c->fecha_grupo->format('Y-m-d') }}" />
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='enlace'>Enlace de Zoom:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="text" class="form-control form-control-sm" required id="enlace" name="enlace" value="{{ $c->url }}" />
        </div>
      </div>

    
      <div class="text-center">
        <div class="row">
          <div class="col-lg-11 col-md-11 col-sm-11">
            <h2>Disponibilidad de Mensaje </h2>     
          </div>  
          <div class="col-lg-1 col-md-1 col-sm-1">
            <button type="button" class="btn btn-outline-info btn-sm float-right" data-toggle="modal" data-target="#m_mensaje" title="Ver ejemplo"><i class="fa fa-eye"></i></button>    
          </div>  
        </div>

        <div class="modal fade" id="m_mensaje" tabindex="-1" role="dialog" aria-labelledby="m_mensajeLabel" aria-hidden="true">
          <div class="modal-dialog modal-xl" role="document">
            <div class="modal-content">
              <div class="modal-header bg-green text-white" style="padding: 6px 16px;">
                <h5 class="modal-title" id="myModalLabel2">Mensaje que visualizan los alumnos de nuevo ingreso cuando acceden por primera vez al apartado de Lenguas Extranjeras.</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
                </button>
              </div>
              <div class="modal-body">
                <img width="100%" src=" {{ asset('docs/ingles/img/mensaje_bienvenida.png') }}">
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='mostrar'>Fecha para mostrar:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="datetime-local" class="form-control form-control-sm" required="required" id="mostrar" name="mostrar" required="required" value="{{ $c->fecha_mostrar->format('Y-m-d\TH:i') }}" 
            @if ($c->fecha_mostrar->format('Y-m-d H:i') < $date) 
              readonly
            @endif
           />
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-3 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='ocultar'>Fecha para ocultar:</label></div>
        <div class="col-lg-8 col-md-8 col-sm-12">
          <input type="datetime-local" class="form-control form-control-sm" required="required" id="ocultar" name="ocultar" required="required" value="{{ $c->fecha_ocultar->format('Y-m-d\TH:i') }}" />
        </div>
      </div>
        
    </div>
    <div class="col-lg-3 col-md-1 col-sm-12"></div>
    
  </div>


  <div class="row mt-5">
    <div class="col-md-3 col-sm-12"></div>
    <div class="col-md-6 col-sm-12">
      <div class="row">
        <div class="col">
          <button type="button" class="btn btn-success btn-block" onclick="javascript:ngl_validar_xmn(this.form, 'ngl_update_xmn');"><i class="fa fa-save" ></i> Actualizar</button>
        </div>
        <div class="col">
          <button type="button" class="btn btn-warning btn-block" onclick="javascript:ngl_consulta_regresar();" style="color: #fff;"><i class="fa fa-times"></i> Cancelar</button>
        </div>
      </div>
    </div>
    <div class="col-md-3 col-sm-12"></div>
  </div>

</form>

