HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux Bradford-Sitios 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/informe-admision/storage/framework/views/b3eb078e17e6da4d61a146047301bda37e023776.php
<?php $__env->startSection('contenido'); ?>
    <div class="page-header d-flex align-items-center justify-content-between border-bottom mb-4">
        <h1 class="page-title"><?php echo e(isset($title) ? $title : 'SIN TITULO'); ?></h1>
        <div>
            <ol class="breadcrumb">
                <li class="breadcrumb-item">
                    <a href="<?php echo e(route('users')); ?>">Gestión de Usuarios</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page"><?php echo e(isset($title) ? $title : 'SIN TITULO'); ?></li>
            </ol>
        </div>
    </div>

    <!-- PAGE-HEADER END -->
    <!-- CONTAINER -->
    <div class="main-container container-fluid">
        <div class="row">
            <div class="col-xl-2 col-sm-2"></div>
            <div class="col-xl-8 col-sm-8">
                <div class="card p-3 border-20">
                    <div class="card-header bg-light">
                        <h5 class="text-center text-uppercase fs-14" style="margin: 0 auto;">
                            <b><?php echo e(isset($title_form) ? $title_form : 'Formulario de Registro'); ?></b>
                        </h5>
                    </div>
                    <div class="card-body">
                        <form action="<?php echo e(route('user-store')); ?>" method="POST" id="form">
                            <?php echo e(csrf_field()); ?>

                            <div class="alert alert-primary py-2 px-3 mb-4 mb-20 fs-13 text-center">
                                <i class="fa fa-circle-info me-2"></i> IMPORTANTE:</b> <br>El correo electrónico debe ser
                                válido para que el usuario pueda recibir los pasos de confirmación de cuenta
                            </div>
                            <div>
                                <?php if(session()->has('warning_message') || session()->has('danger_message')): ?>
                                    <div class="msg-error alert alert-danger py-2 px-3 mb-3 fs-14 text-center">
                                        <i class="fa fa-circle-exclamation me-2"></i>
                                        <?php echo session()->get('warning_message'); ?><?php echo session()->get('danger_message'); ?>

                                    </div>
                                <?php endif; ?>
                            </div>
                            <div class="row g-3">
                                <div class="col-md-6 p-1">
                                    <div class="form-group">
                                        <label for="rut" class="">RUT <span class="text-danger">*</span></label>
                                        <input class="form-control" id="rut" name="rut" type="text"
                                            placeholder="Ingrese rut..." value="<?php echo e(old('rut')); ?>" maxlength="12">
                                        <small id="invalid_rut" class="text-danger ml-2"></small>
                                    </div>
                                </div>
                                <div class="col-md-6 p-1">
                                    <div class="form-group">
                                        <label for="name" class="">NOMBRE COMPLETO <span
                                                class="text-danger">*</span></label>
                                        <input type="text" id="name" name="name" value="<?php echo e(old('name')); ?>"
                                            class="form-control" placeholder="Ingrese Nombre...">
                                        <small id="invalid_name" class="text-danger fs-12"></small>
                                    </div>
                                </div>
                                <div class="col-md-6 p-1">
                                    <div class="form-group">
                                        <label for="email" class="">CORREO ELECTRÓNICO <span
                                                class="text-danger">*</span></label>
                                        <input type="email" id="email" name="email" value="<?php echo e(old('email')); ?>"
                                            class="form-control" placeholder="Ingrese Correo electrónico...">
                                        <small id="invalid_email" class="text-danger fs-12"></small>
                                    </div>
                                </div>

                                <div class="col-md-6 p-1">
                                    <div class="form-group">
                                        <label for="profile" class="">PERFIL <span
                                                class="text-danger">*</span></label>
                                        <select class="form-select" id="profile" name="profile">
                                            <option value="">Seleccione...</option>
                                            <?php $__currentLoopData = $profiles_data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <?php if($key->id >= auth()->user()->profile_id): ?>
                                                    <option value="<?= $key->id ?>"
                                                        <?php echo e(old('profile') != null ? (old('profile') == $key->id ? 'selected' : '') : ''); ?>>
                                                        <?php echo e($key->profile); ?>

                                                    </option>
                                                <?php endif; ?>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                        <small id="invalid_profile" class="text-danger fs-12"></small>
                                    </div>
                                </div>

                                <div class="col-12 d-flex justify-content-center border-top">
                                    <div class="btn-box mt-3">
                                        <a href="<?php echo e(route('users')); ?>" class="btn btn-md btn-secondary">
                                            <i class="fa fa-reply"></i>
                                            Volver
                                        </a>
                                        <button class="btn btn-primary" type="submit" id="btn_submit">
                                            <i class="fa fa-save"></i> Guardar
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('js_content'); ?>
    <?php echo $__env->make('validator-rut', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('validator', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <script nonce="<?php echo e(app('csp_nonce')); ?>">
        $(document).ready(function() {
            validateField($('#rut').val(), 'rut', 'rut', true);
            validateField($('#name').val(), 'name', 'names', true);
            validateEmail($('#email').val(), 'email');
            validateField($('#profile').val(), 'profile', 'select', true, 'Seleccione perfil...');
        });

        $('#rut').keyup(function() {
            validateField($('#rut').val(), 'rut', 'rut');
        });

        $('#name').keyup(function() {
            validateField($('#name').val(), 'name', 'names', true);
        });

        $('#email').keyup(function() {
            validateEmail($('#email').val(), 'email', 'Ingrese un Correo Válido')
        });

        $('#profile').change(function() {
            validateField($('#profile').val(), 'profile', 'select', true, 'Seleccione perfil...');
        });

        $("#form").submit(function(e) {
            e.preventDefault();
            let rut = validateField($('#rut').val(), 'rut', 'rut');
            let name = validateField($('#name').val(), 'name', 'names', true);
            let email = validateEmail($('#email').val(), 'email');
            let profile = validateField($('#profile').val(), 'profile', 'select', true, 'Seleccione perfil');
            if (rut == 1 && name == 1 && email == 1 && profile == 1) {
                $("#btn_submit").attr('disabled', true);
                $("#btn_submit").html(
                    `<span class="spinner-border spinner-border-sm" id="sign_spinner"></span> Validando...`);
                setTimeout(function() {
                    document.getElementById("form").submit();
                }, 400);
            } else {
                toastr["error"](`Se encontraron 1 o más Campos con Problemas. Corrija e Intente nuevamente`,
                    "Error de Validación")
            }
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.layout_admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\javom\Documents\proyectos\informe-admision\resources\views/admin/users/users_new.blade.php ENDPATH**/ ?>