<?php echo csrf_field(); ?>        
<form id='form-nuevo'>

  <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" required 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="number" class="form-control form-control-sm" placeholder="" id="duracion" name="duracion" required value="{{ $c->duracion }}">
            <span class="input-group-addon" id="">minutos</span>
          </div>
        </div>
      </div>

      <div class="text-center mt-4"><h2>Periodo para enviar comprobantes de pago</h2></div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-4 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='inicio_financieros'>Inicio:</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="inicio_financieros" name="inicio_financieros" required="required" min="{{ Carbon\Carbon::now()->format('Y-m-d\TH:i') }}" value="{{ $c->inicio_pago->format('Y-m-d\TH:i') }}" 
            @if ($c->inicio_pago->format('Y-m-d H:i') < Carbon\Carbon::now()->format('Y-m-d\TH:i')) 
              readonly
            @endif
          />
        </div>
      </div>

      <div class="row form-group">
        <div class="col-lg-4 col-md-4 col-sm-12 text-md-right text-sm-left font-weight-bolder"><label class="pt-1" for='fin_financieros'>Termino:</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="fin_financieros" name="fin_financieros" required="required" min="{{ Carbon\Carbon::now()->format('Y-m-d\TH:i') }}" value="{{ $c->cierre_pago->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-4">
    <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" onclick="javascript:confi_ubicacion_alumno_validar(this.form, 'confi_ubicacion_alumno_validar_upd');" class="btn btn-success btn-block"><i class="fa fa-save"></i> Guardar</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>
        