<div class="">
    <div class="page-title">
        <div class="title_left">
            <h3>Calendarización</h3>
        </div>
    </div>

    <div class="clearfix"></div>

    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    <h2>Actualizar una calendarización de evaluación </h2>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    <form id="form-nueva" data-parsley-validate class="form-horizontal form-label-left">
                        <div class="mb-2 row">
                            <div class="col-form-label col-md-5 col-sm-4 col-xs-12 text-left text-md-right">
                                <label class="text-sm-left" for="periodo">Periodo
                                    <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-sm-12 col-xs-12">
                                <select id="periodo" name="periodo" required="required"
                                    class="form-control form-control-sm" disabled>
                                    <option value="{{ $calen->id }}">{{ $calen->periodos->nombre }}</option>
                                </select>
                            </div>
                            <div class="col-md-3 col-sm-4 col-xs-12">
                                <div class="alert alert-danger" role="alert" id="a_periodo" style="display: none">
                                </div>
                            </div>
                        </div>
                        <div class="mb-2 row">
                            <div class="col-form-label col-md-5 col-sm-6 col-xs-12 text-left text-md-right">
                                <label class="text-sm-left" for="segU">Fecha de
                                    inicio de
                                    clases
                                    <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-xs-12">
                                <input type="date" id="fecha_inicio" name="fecha_inicio"
                                    class="form-control form-control-sm" value="{{ $calen->fechaIni_caleneval }}"
                                    required="required">
                            </div>
                            <div class="col-md-3 col-sm-4 col-xs-12">
                                <div class="alert alert-danger" role="alert" id="a_fechaIni" style="display: none">
                                </div>
                            </div>
                        </div>
                        <div class="mb-2 row">
                            <div class="col-form-label col-md-5 col-sm-6 col-xs-12 text-left text-md-right">
                                <label class="text-sm-left" for="segU">Fecha de
                                    fin de clases
                                    <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-xs-12">
                                <input type="date" id="fecha_fin" name="fecha_fin"
                                    class="date-picker form-control form-control-sm"
                                    value="{{ $calen->fechaFin_caleneval }}" required="required">
                            </div>

                            <div class="col-md-3 col-sm-4 col-xs-12">
                                <div class="alert alert-danger" role="alert" id="a_fechaFin" style="display: none">
                                </div>
                            </div>
                        </div>
                        <div class="mb-2 row">
                            <div class="col-form-label col-md-5 col-sm-8 col-xs-12 text-left text-md-right">
                                <label class="text-sm-left" for="segU">Primer
                                    seguimiento por
                                    departamento <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-xs-12">
                                <select id="segU" name="segU" required="required"
                                    class="form-control form-control-sm">
                                    <option value="">--Seleccione--</option>
                                    @for ($i = 1; $i <= 16; $i++)
                                        @if ($i == $calen->primerSeg_caleneval)
                                            <option value="{{ $i }}" selected>Semana {{ $i }}
                                            </option>
                                        @else
                                            <option value="{{ $i }}">Semana {{ $i }}
                                            </option>
                                        @endif
                                    @endfor
                                </select>
                            </div>
                            <div class="col-md-3 col-sm-4 col-xs-12">
                                <div class="alert alert-danger" role="alert" id="a_seguno" style="display: none">
                                </div>
                            </div>
                        </div>

                        <div class="mb-2 row">
                            <div class="col-form-label col-md-5 col-sm-8 col-xs-12 text-left text-md-right">
                                <label class="text-sm-left" for="segD">Segundo
                                    seguimiento por departamento <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-xs-12">
                                <select id="segD" name="segD" required="required"
                                    class="form-control form-control-sm">
                                    <option value="">--Seleccione--</option>
                                    @for ($i = 1; $i <= 16; $i++)
                                        @if ($i == $calen->segundoSeg_caleneval)
                                            <option value="{{ $i }}" selected>Semana {{ $i }}
                                            </option>
                                        @else
                                            <option value="{{ $i }}">Semana {{ $i }}
                                            </option>
                                        @endif
                                    @endfor
                                </select>
                            </div>
                            <div class="col-md-3 col-sm-4 col-xs-12">
                                <div class="alert alert-danger" role="alert" id="a_segdos" style="display: none">
                                </div>
                            </div>
                        </div>

                        <div class="mb-2 row">
                            <div class="col-form-label col-md-5 col-sm-8 col-xs-12 text-left text-md-right">
                                <label class="text-sm-left" for="segT">Tercer
                                    seguimiento por
                                    departamento <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-xs-12">
                                <select id="segT" name="segT" required="required"
                                    class="form-control form-control-sm ">
                                    <option value="">--Seleccione--</option>
                                    @for ($i = 1; $i <= 16; $i++)
                                        @if ($i == $calen->tercerSeg_caleneval)
                                            <option value="{{ $i }}" selected>Semana {{ $i }}
                                            </option>
                                        @else
                                            <option value="{{ $i }}">Semana {{ $i }}
                                            </option>
                                        @endif
                                    @endfor
                                </select>
                            </div>
                            <div class="col-md-3 col-sm-4 col-xs-12">
                                <div class="alert alert-danger" role="alert" id="a_segtres" style="display: none">
                                </div>
                            </div>
                        </div>
                        <div class="ln_solid"></div>
                        <div class="mb-2 row">
                            <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="update_calendarizacion(this.form,{{ $calen->cve_caleneval }})"
                                            class="btn btn-success btn-block" form="form-nueva"><i
                                                class=" fa fa-pencil"></i> Actualizar</button>
                                    </div>
                                    <div class="col">
                                        <button class="btn btn-dark btn-block" type="button"
                                            onclick="listado_calendarizacion()"><i class="fa fa-times"></i>
                                            Cancelar</button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3 col-sm-12"></div>
                        </div>
                </div>
                </form>
                <br>

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