

<?php $__env->startSection('title', 'Tuyển Sinh DGNL'); ?>

<?php $__env->startSection('content'); ?>

<main>
    <div class="container" id="container">
        <h1 class="post-title">ĐĂNG KÝ XÉT TUYỂN ĐẠI HỌC BẰNG KẾT QUẢ LỚP 12</h1>
        <p class="post-subtitle">THỜI GIAN: NGÀY 05/01/2024</p>

        <form action="<?php echo e(route('user.storeHB12')); ?>" class="form-xet-tuyen" id="form-xet-tuyen" method="post" enctype="multipart/form-data" onsubmit="return onSubmitPressed();">
            <?php echo csrf_field(); ?>

            <?php if(session()->has('success')): ?>
            <div id="success-message" class="alert alert-success card " role="alert">
                <div class='upper-side'>
                    <div class="status">
                        <?php echo e(session()->get('success')); ?>

                    </div>
                    <div>
                        <button type="button" class="close Btn" data-dismiss="alert" aria-label="Close" onclick="document.getElementById('success-message').style.display='none';">
                            <span>&times;</span>
                        </button>
                    </div>
                </div>
            </div>
            <?php endif; ?>

            <?php if(session()->has('error')): ?>
            <div class="alert alert-error" role="alert">
                <?php echo e(session()->get('error')); ?>

                <button type="button" class="close" data-dismiss="alert" aria-label="Close" onclick="this.parentElement.style.display='none';">
                    <span>&times;</span>
                </button>
            </div>
            <?php endif; ?>

            <section class="form-section">
                <h2 class="form-section-title">THÔNG TIN HỌC SINH</h2>
                <div class="form-field-container">
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="hoVaTen">Họ và tên học
                            sinh</label>
                        <input type="text" placeholder="Họ và tên" size="0" class="form-field-input" name="hoVaTen" value="<?php echo e(session()->has('success') ? '' : old('hoVaTen')); ?>" required>
                        <?php $__errorArgs = ['hoVaTen'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="gioiTinh">Giới
                            tính</label>
                        <select size="0" class="form-field-input" name="gioiTinh" required>
                            <option selected>Chọn giới tính</option>
                            <option value="1">Nam</option>
                            <option value="0">Nữ</option>
                        </select>
                        <?php $__errorArgs = ['gioiTinh'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="ngaySinh">Ngày
                            sinh</label>
                        <input type="date" requied size="0" class="form-field-input" name="ngaySinh" value="<?php echo e(session()->has('success') ? '' : old('ngaySinh')); ?>" max="<?php echo date('Y-m-d'); ?>" required>
                        <?php $__errorArgs = ['ngaySinh'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="cccd">Số CCCD</label>
                        <input type="number" placeholder="Số CCCD" size="0" class="form-field-input" name="cccd" required>
                        <?php $__errorArgs = ['cccd'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="email">Địa chỉ email</label>
                        <input type="email" placeholder="Địa chỉ email" size="0" class="form-field-input" name="email" value="<?php echo e(session()->has('success') ? '' : old('email')); ?>" required>
                        <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="soDienThoai">Số điện
                            thoại</label>
                        <input type="tel" placeholder="Số điện thoại" size="0" class="form-field-input" name="soDienThoai" value="<?php echo e(session()->has('success') ? '' : old('soDienThoai')); ?>" pattern=".{10,12}" title="Vui lòng nhập từ 10 đến 12 ký tự" required>
                        <?php $__errorArgs = ['soDienThoai'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="diaChi">Địa chỉ liên
                            lạc</label>
                        <input type="text" placeholder="Nơi nhận giấy báo trúng tuyển" size="0" class="form-field-input" name="diaChi" value="<?php echo e(session()->has('success') ? '' : old('diaChi')); ?>" required>
                        <?php $__errorArgs = ['diaChi'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="tinh">Tỉnh/Thành
                            phố</label>
                        <select id="tinh" size="0" class="form-field-input" name="tinh" required>
                            <option selected>Chọn Tỉnh/TP</option>
                            <?php $__currentLoopData = $tinhs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tinh): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($tinh->MaTinh); ?>"><?php echo e($tinh->TenTinh); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['tinh'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div id="container-truong" class="form-field">
                        <label class="form-field-label form-field-label--required" for="truongTHPT">Trường
                            THPT</label>
                        <select id="truong" size="0" class="form-field-input" name="truongTHPT" required>
                            <option selected>Chọn trường THPT</option>
                        </select>
                        <?php $__errorArgs = ['truongTHPT'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        <p class="form-field-note">
                            (Ghi chú: Nếu là thí sinh tự do thì bạn chọn trường THPT đã tốt nghiệp trước đó)
                        </p>
                    </div>
                </div>
            </section>
            <section class="form-section">
                <h2 class="form-section-title">THÔNG TIN ĐĂNG KÝ</h2>
                <div class="form-field-container">
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="bacHoc">Bậc học</label>
                        <select size="0" class="form-field-input" name="bacHoc" required>
                            <option selected>Đại học</option>
                        </select>
                    </div>
                    <div class="form-field">
                        <label class="form-field-label form-field-label--required" for="nganhHoc">Ngành
                            học</label>
                        <select id="nganh-hoc" size="0" class="form-field-input" name="nganhHoc">
                            <option selected>Chọn ngành học</option>
                            <?php $__currentLoopData = $nganhHocs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nganhHoc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($nganhHoc->MaNganhHoc); ?>"><?php echo e($nganhHoc->TenNganhHoc); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['nganhHoc'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        <p class="form-field-note">(Ghi chú: Thí sinh được phép chuyển đổi ngành phù hợp sau 1
                            Học kỳ đến 1 Năm học theo quy chế của Bộ Giáo dục và Đào tạo.)</p>
                    </div>
                    <div id="container-khoi-xet-tuyen" class="form-field">
                        <label class="form-field-label form-field-label--required" for="khoiXetTuyen">Khối xét
                            tuyển</label>
                        <select id="khoi-xet-tuyen" size="0" class="form-field-input" name="khoiXetTuyen">
                            <option selected>Chọn khối xét tuyển</option>
                        </select>
                        <?php $__errorArgs = ['khoiXetTuyen'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        <label class="form-field-label" for="nguyenVongDuHoc">Nguyện vọng du học</label>
                        <input type="checkbox" class="form-field-input form-field-input--checkbox" name="nguyenVongDuHoc" value="0">
                    </div>
                    <div class="form-field form-field-grade">
                        <label class="form-field-label form-field-label--required">Nhập kết quả học tập</label>
                        <table id="mon-hoc" class="form-table-input form-table-input--hoc-ba-12" border="1">
                            <thead>
                                <tr>
                                    <th width="50%">Môn học</th>
                                    <th width="50%">Điểm TB</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td data-label="Môn học">
                                        <label id='mon-1' for="mon1" name="monHocMot"></label>
                                    </td>
                                    <td data-label="Điểm TB">
                                        <input type="number" name="diemMon1" size="0" placeholder="Nhập điểm..." required min="0" max="10" step="0.01" oninput="tinhDiemTong()">
                                    </td>
                                </tr>
                                <tr>
                                    <td data-label="Môn học">
                                        <label id='mon-2' for="mon2" name="monHocHai"></label>
                                    </td>
                                    <td data-label="Điểm TB">
                                        <input type="number" name="diemMon2" size="0" placeholder="Nhập điểm..." required min="0" max="10" step="0.01" oninput="tinhDiemTong()">
                                    </td>
                                </tr>
                                <tr>
                                    <td data-label="Môn học">
                                        <label id='mon-3' for="mon3" name="monHocBa"></label>
                                    </td>
                                    <td data-label="Điểm TB">
                                        <input type="number" name="diemMon3" size="0" placeholder="Nhập điểm..." required min="0" max="10" step="0.01" oninput="tinhDiemTong()">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <?php $__errorArgs = ['diemMon1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        <?php $__errorArgs = ['diemMon2'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        <?php $__errorArgs = ['diemMon3'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-field form-field-grade">
                        <label class="form-field-label" id="tongDiem"></label>
                    </div>
                    <div class="form-field" id="namTotNghiepField">
                        <label class="form-field-label" for="namTotNghiep">Năm tốt nghiệp (có thể bỏ qua nếu chưa tốt nghiệp)</label>
                        <input type="number" placeholder="Năm tốt nghiệp" size="0" class="form-field-input" name="namTotNghiep">
                        <?php $__errorArgs = ['namTotNghiep'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span style="color: red"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="form-field" id="fileUploadField">
                        <label class="form-field-label" for="fileUpload">
                            File học bạ (hình, hoặc scan)
                            <span class="form-field-input--file-button">
                                <img src="./assets/img/websiteInterface/user/icons/cloud-computing.png" class="form-field-input--file-icon">Chọn file
                            </span>
                        </label>
                        <input type="file" id="fileUpload" placeholder="Năm tốt nghiệp" size="0" class="form-field-input form-field-input--file" name="fileUpload[]" multiple>
                        <span id="fileUploadError" style="color: red;"></span>
                        <span id="fileUploadSuccess" style="color: green;"></span>
                        <p class="form-field-note" style="margin-top: 10px;">(Ghi chú: Vui lòng chọn một lúc nhiều <br> file chứ không chọn lần lượt từng file.)</p>
                    </div>

                    <div class="form-submit">
                        <span class="form-submit-bar"></span>
                        <input type="submit" class="form-submit-button" id="submit" size="0" value="Đăng ký xét tuyển">
                        <span class="form-submit-bar"></span>
                    </div>
                </div>
            </section>
        </form>
    </div>
</main>

<style>
    .card {
        position: relative;
        width: 320px;
        display: block;
        margin: 40px auto;
        text-align: center;
    }

    .upper-side {
        padding: 3em;
        background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
        display: block;
        color: #000000;
        font-weight: 600;
        border-radius: 12px;
    }


    .status {
        text-transform: uppercase;
        letter-spacing: 2px;
        font-size: 1em;
        margin-top: -.2em;
        margin-bottom: 0;
    }

    .Btn {
        position: relative;
        top: 1.5em;
        background: #fff;
        color: #000;
        margin: auto;
        padding: 10px 20px;
        border-radius: 50px;
    }

    .alert-success {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #155724;
        border-color: #c3e6cb;
        padding: 15px;
        border: 1px solid transparent;
        border-radius: .25rem;
    }

    .alert-success .close {
        color: #155724;
        position: absolute;
        top: 0;
        right: 0px;
    }


    .alert {
        padding: 15px;
        margin-bottom: 20px;
        border: 1px solid transparent;
        border-radius: 4px;
    }


    .alert-error {
        color: #ffffff;
        background-color: #a02321;
        border-color: #d6e9c6;
    }

    .close {
        cursor: pointer;
        float: right;
        font-size: 20px;
        font-weight: bold;
        color: #000;
    }
</style>

<script>
    // Lấy trường học thông qua tỉnh
    document.addEventListener('DOMContentLoaded', function() {
        var tinhSelect = document.getElementById('tinh');
        var truongHocSelect = document.getElementById('truong');

        tinhSelect.addEventListener('change', function() {
            var maTinh = this.value;

            fetch(`/get-truong-hoc/${maTinh}`)
                .then(response => response.json())
                .then(data => {
                    truongHocSelect.innerHTML = '<option value="">Chọn trường THPT</option>';

                    Object.keys(data).forEach(function(MaTruong) {
                        var option = document.createElement('option');
                        option.text = data[MaTruong];
                        option.value = MaTruong;
                        truongHocSelect.appendChild(option);
                    });

                });
        });
        tinhSelect.addEventListener('change', function() {
            truongHocSelect.innerHTML = '<option value="">Chọn trường THPT</option>';
        });
    });

    // Lấy khối xét tuyển thông qua ngành học
    document.addEventListener('DOMContentLoaded', function() {
        var nganhHocSelect = document.getElementById('nganh-hoc');
        var khoiXetTuyenSelect = document.getElementById('khoi-xet-tuyen');

        nganhHocSelect.addEventListener('change', function() {
            var maNganhHoc = this.value;

            fetch(`/get-khoi-xet-tuyen/${maNganhHoc}`)
                .then(response => response.json())
                .then(data => {
                    khoiXetTuyenSelect.innerHTML = '<option value="">Chọn khối xét tuyển</option>';

                    Object.keys(data).forEach(function(MaKhoiXetTuyen) {
                        var option = document.createElement('option');
                        option.text = data[MaKhoiXetTuyen];
                        option.value = MaKhoiXetTuyen;
                        khoiXetTuyenSelect.appendChild(option);
                    });

                });
        });
        nganhHocSelect.addEventListener('change', function() {
            truongHocSelect.innerHTML = '<option value="">Chọn khối xét tuyển</option>';
        });
    });

    // Lấy môn học thông qua khối xét tuyển
    document.addEventListener('DOMContentLoaded', function() {
        var khoiXetTuyenSelect = document.getElementById('khoi-xet-tuyen');
        khoiXetTuyenSelect.addEventListener('change', function() {
            var maKhoiXetTuyen = this.value;
            fetch(`/get-mon-hoc/${maKhoiXetTuyen}`)
                .then(response => response.json())
                .then(data => {
                    Object.keys(data).forEach(function(MaMonHoc, index) {
                        var labelId = 'mon-' + (index + 1);
                        var monLabel = document.getElementById(labelId);
                        monLabel.innerHTML = data[MaMonHoc];
                        monLabel.setAttribute('value', MaMonHoc);
                    });
                });
        });
    });

    // Tính toán điểm
    function tinhDiemTong() {
        var diem10 = parseFloat(document.getElementsByName("diemMon1")[0].value);
        var diem11 = parseFloat(document.getElementsByName("diemMon2")[0].value);
        var diem12 = parseFloat(document.getElementsByName("diemMon3")[0].value);

        var tongDiemLabel = document.getElementById('tongDiem');
        var tongDiem = 0;

        if (!isNaN(diem10) && !isNaN(diem11) && !isNaN(diem12)) {
            var tongDiem = diem10 + diem11 + diem12;
            tongDiemLabel.innerText = "Tổng điểm: " + tongDiem.toFixed(2);
        }
    }

    // Upload file hình ảnh 
    document.getElementById('fileUpload').addEventListener('change', function() {
        var fileInput = this;
        var files = fileInput.files;
        var totalSize = 0;

        if (files.length === 0) {
            document.getElementById('fileUploadError').innerText = "Vui lòng chọn ít nhất một tệp.";
            document.getElementById('fileUploadError').style.display = "block";
            return;
        }

        var allowedFormats = ['image/png', 'image/jpeg', 'application/pdf'];
        var maxSizeKB = 10240;
        var successMessages = [];

        for (var i = 0; i < files.length; i++) {
            var file = files[i];

            if (!allowedFormats.includes(file.type)) {
                document.getElementById('fileUploadError').innerText = "Định dạng tệp không hợp lệ. Chỉ chấp nhận các định dạng: PNG, JPG, JPEG, PDF.";
                document.getElementById('fileUploadError').style.display = "block";
                return;
            }

            totalSize += file.size;

            if (file.size > maxSizeKB * 1024) {
                document.getElementById('fileUploadError').innerText = "Kích thước tệp quá lớn. Kích thước tối đa cho mỗi tệp là 10MB.";
                document.getElementById('fileUploadError').style.display = "block";
                return;
            }

            successMessages.push("Đã chọn thành công file " + file.name);
        }

        if (totalSize > 20 * 1024 * 1024) {
            document.getElementById('fileUploadError').innerText = "Tổng dung lượng của các tệp không được vượt quá 20MB.";
            document.getElementById('fileUploadError').style.display = "block";
            return;
        }

        var fileUploadSuccessElement = document.getElementById('fileUploadSuccess');
        fileUploadSuccessElement.innerText += successMessages.join("\n") + "\n";
        fileUploadSuccessElement.style.display = "block";

        document.getElementById('fileUploadError').innerText = "";
    });

    // Click chọn checkbox
    var checkboxes = document.querySelectorAll('input[type="checkbox"]');
    checkboxes.forEach(function(checkbox) {
        checkbox.value = '0';
        checkbox.addEventListener('change', function() {
            this.value = this.checked ? '1' : '0';
        });
    });

    // Hiển thị thông báo xét tuyển
    document.addEventListener('DOMContentLoaded', function() {
        var registerForm = document.getElementById('form-xet-tuyen');
        var successMessage = document.getElementById('success-message');

        if (successMessage) {
            document.getElementById('container').appendChild(successMessage);
            successMessage.style.display = 'block';
        }
    });
</script>


<?php $__env->stopSection(); ?>
<?php echo $__env->make('masterUser', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\tuyensinh\resources\views/users/tuyenSinhHB12.blade.php ENDPATH**/ ?>