<div class="">
    <div class="page-title">
        <div class="title_left">
            <h3>Materia</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 materia</h2>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    <form id="form-nueva" data-parsley-validate class="form-horizontal form-label-left"
                        enctype="multipart/form-data">
                        <div class="mb-1 row">
                            <div class="control-form-label col-md-4 col-sm-4 col-xs-12 text-left text-sm-right">
                                <label class=" label-align" for="nombre">Nombre <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-sm-4 col-xs-12">
                                <input type="text" id="nombre" name="nombre" required="required" class="form-control"
                                    value="<?php echo e($mat->nom_mat); ?>">
                            </div>
                        </div>
                        <div class="mb-1 row">
                            <div class="control-form-label col-md-4 col-sm-4 col-xs-12 text-left text-sm-right">
                                <label class=" label-align" for="clave">Clave
                                    <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-sm-4 col-xs-12">
                                <input type="text" id="clave" name="clave" required="required" class="form-control"
                                    value="<?php echo e($mat->clave_mat); ?>">
                            </div>
                        </div>
                        <div class="mb-1 row">
                            <div class="control-form-label col-md-4 col-sm-4 col-xs-12 text-left text-sm-right">
                                <label class=" label-align" for="carrera">Carrera <span
                                        class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-sm-4 col-xs-12">
                                <select id="carrera" name="carrera" required="required" class="form-control">
                                    <option value="">--Seleccione--</option>
                                    <?php $__currentLoopData = $car; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($c->cve_car); ?>"> <?php echo e($c->nom_car); ?> - <?php if($c->tipo_car == 'M'): ?>
                                                Maestría
                                            <?php else: ?>
                                                Licenciatura
                                            <?php endif; ?>
                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <div class="col-md-1 col-sm-2 col-xs-12 m-1">
                                <button type="button" class="btn btn-block btn-outline-secondary"
                                    onclick="mas_carreras()"><i class="fa fa-plus"></i>
                                </button>
                            </div>
                        </div>

                        <div id="contenedor_anterior" style="display: none;">

                        </div>
                        <div id="contenedor_carreras">

                            <?php $__currentLoopData = $mat->MateriaCarrera; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($mc->status_matcar == '1'): ?>
                                    <div class="item form-group row_carrera" id="row_<?php echo e($mc->cve_car); ?>">
                                        <input type="hidden" class="carrera_id" value="<?php echo e($mc->cve_car); ?>">
                                        <label
                                            class="quitar_pq control-form-label col-md-4 col-sm-2 col-xs-2 label-align"
                                            for="carrera"></label>
                                        <div class="col-md-4 col-sm-4 col-xs-12">
                                            <label for=" label-align"><?php echo e($mc->carrera->nom_car); ?> -
                                                <?php if($mc->tipo_car == 'L'): ?>
                                                    Licenciatura
                                                <?php else: ?>
                                                    Maestría
                                                <?php endif; ?>
                                            </label>
                                        </div>
                                        <div class="col-md-4 col-sm-2 col-xs-12"><button type="button"
                                                class="btn btn-outline-danger  btn-sm"
                                                onclick="menos_carreras('row_<?php echo e($mc->cve_car); ?>')"><i
                                                    class="fa fa-trash"></i></button></div>
                                    </div>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div class="mb-1 row">
                            <div class="control-form-label col-md-4 col-sm-4 col-xs-12 text-left text-sm-right">
                                <label class=" label-align" for="planestudios">Plan de estudios
                                    <span class="required">*</span>
                                </label>
                            </div>
                            <div class="col-md-4 col-sm-4 col-xs-12">
                                <select id="planestudios" name="planestudios" required="required"
                                    class="form-control">
                                    <option value="">--Seleccione--</option>
                                    <?php $__currentLoopData = $plan; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php if($p->claveOfi_planest == $mat->planestudios->claveOfi_planest): ?>
                                            <option value="<?php echo e($p->cve_planest); ?>" selected>
                                                <?php echo e($p->claveOfi_planest); ?>

                                            </option>
                                        <?php else: ?>
                                            <option value="<?php echo e($p->cve_planest); ?>"><?php echo e($p_claveOfi_planest); ?>

                                            </option>
                                        <?php endif; ?>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                        <div class="ln_solid"></div>
                        <div class="mb-1 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 class="btn btn-outline-dark btn-block" type="button"
                                            onclick="listado_materia()"><i class="fa far fa-reply"></i>
                                            Regresar</button>
                                    </div>
                                    <div class="col">
                                        <button type="button"
                                            onclick="update_materia(this.form, <?php echo e($mat->cve_mat); ?>)"
                                            class="btn btn-outline-success btn-block" form="form-nueva">Guardar <i
                                                class=" fa fas fa-paper-plane"></i></button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3 col-sm-12"></div>
                        </div>
                    </form>
                    <br>

                </div>
            </div>
        </div>
    </div>
</div>
<?php /**PATH C:\xampp\htdocs\laravel_curso\laravel_7_curso\resources\views/materia/modificar.blade.php ENDPATH**/ ?>