<!DOCTYPE html>
<html>

<head>
    <?php echo $__env->make('partials.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('partials.head-css', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('partials.title-meta', ['title' => 'Notification'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/libs/twitter-bootstrap-wizard/prettify.css')); ?>">

    <!-- Select2 CSS -->
    <link href="<?php echo e(asset('assets/libs/select2/css/select2.min.css')); ?>" rel="stylesheet" type="text/css" />

    <!-- Dropzone CSS -->
    <link href="<?php echo e(asset('assets/libs/dropzone/min/dropzone.min.css')); ?>" rel="stylesheet" type="text/css" />

</head>
<style>
    .card-body {
        padding: 6.25rem 1.25rem !important;
    }

    .mb-2 {
        margin-top: -92px;
    }

    .user-sidebar {
        background-color: #f14e4e !important;
    }

    .page-title-box {
        background-color: #f14e4e !important;
    }
</style>

<body>

    <div id="layout-wrapper">

        <?php echo $__env->make('partials.menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <!-- ============================================================== -->
        <!-- Start right Content here -->
        <!-- ============================================================== -->
        <div class="main-content">

            <div class="page-content">

                <?php echo $__env->make('partials.page-title', ['pagetitle' => 'Form', 'subtitle' => 'Codissa', 'title' => 'Add Notification'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


                <div class="container-fluid">

                    <div class="page-content-wrapper">

                        <div class="row">
                            <div class="col-lg-12">
                                <div class="card">
                                    <div class="card-body">

                                        <div id="addproduct-nav-pills-wizard" class="twitter-bs-wizard">

                                            <!-- ebd ul -->
                                            <div>

                                                <div>
                                                    <h4 class="header-title">Notification</h4>
                                                    <p class="card-title-desc">Fill all information below</p>


                                                    <form action="<?php echo e(route('notification.store')); ?>" method="POST">
                                                        <?php echo csrf_field(); ?>

                                                        <div class="row">
                                                            <div class="col-sm-4">
                                                                <div class="mb-3">
                                                                    <label class="form-label" for="name">Name<span class="text-danger"> *</span></label>
                                                                    <input id="name" name="name" type="text" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Enter name" value="<?php echo e(old('name')); ?>">
                                                                    <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <div class="invalid-feedback">
                                                                        <?php echo e($message); ?>

                                                                    </div>
                                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                                </div>
                                                            </div><!-- end col -->
                                                            <div class="col-sm-4">
                                                                <div class="mb-3">
                                                                    <label class="form-label" for="event_date_from">Date<span class="text-danger"> *</span></label>
                                                                    <input id="date" name="date" type="date" class="form-control <?php $__errorArgs = ['date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Enter the date" value="<?php echo e(old('date')); ?>">
                                                                    <?php $__errorArgs = ['date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <div class="invalid-feedback">
                                                                        <?php echo e($message); ?>

                                                                    </div>
                                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                                </div>
                                                            </div>

                                                            <div class="col-sm-4">
                                                                <div class="mb-3">
                                                                    <label class="form-label" for="name">Description</label>
                                                                    <input id="description" name="description" type="text" class="form-control <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Enter the description" value="<?php echo e(old('description')); ?>">
                                                                    <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <div class="invalid-feedback">
                                                                        <?php echo e($message); ?>

                                                                    </div>
                                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                                </div>

                                                            </div>

                                                            <div class="row">
                                                                <div class="col-sm-4">
                                                                    <div class="mb-3">
                                                                        <label class="form-label" for="status">Status<span class="text-danger"> *</span></label>
                                                                        <select id="statusmember" name="status" class="form-control <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                                                           
                                                                            <option value="1" <?php echo e(old('status') == '1' ? 'selected' : ''); ?>>Active</option>
                                                                            <option value="0" <?php echo e(old('status') == '0' ? 'selected' : ''); ?>>Inactive</option>
                                                                        </select>

                                                                        <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                        <div class="invalid-feedback">
                                                                            <?php echo e($message); ?>

                                                                        </div>
                                                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                                                    </div>
                                                                </div>

                                                                <div class="col-sm-6">
                                                                    <div class="mb-3">

                                                                        <label class="form-label" for="image">Image</label>
                                                                        <input type="file" class="form-control" id="image" name="image" accept="image/*" />
                                                                    </div>
                                                                </div>



                                                            </div>
                                                            <!-- end row -->


                                                            <ul class="pager wizard twitter-bs-wizard-pager-link">
                                                                <li class="float-end">
                                                                    <button type="submit" class="btn btn-primary" style="background-color:red;border-color:red">Save Changes <i class="mdi mdi-arrow-right ms-1"></i></button>
                                                                </li>
                                                            </ul>
                                                    </form>


                                                    <!-- end ul -->
                                                </div>
                                                <!-- end tabpane -->
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- end row -->

                    </div>


                </div> <!-- container-fluid -->
            </div>
            <!-- End Page-content -->



            <?php echo $__env->make('partials.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        </div>
        <!-- end main content-->

    </div>
    <!-- End Page-content -->



    </div>
    <?php echo $__env->make('partials.vendor-scripts', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('partials.right-sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


    <script src="<?php echo e(asset('assets/libs/twitter-bootstrap-wizard/jquery.bootstrap.wizard.min.js')); ?>"></script>

    <!-- Prettify JS -->
    <script src="<?php echo e(asset('assets/libs/twitter-bootstrap-wizard/prettify.js')); ?>"></script>

    <!-- Select2 Plugin JS -->
    <script src="<?php echo e(asset('assets/libs/select2/js/select2.min.js')); ?>"></script>

    <!-- Dropzone Plugin JS -->
    <script src="<?php echo e(asset('assets/libs/dropzone/min/dropzone.min.js')); ?>"></script>

    <!-- Init JS -->
    <script src="<?php echo e(asset('assets/js/pages/ecommerce-add-product.init.js')); ?>"></script>

    <!-- App JS -->
    <script src="<?php echo e(asset('assets/js/app.js')); ?>"></script>
    <script>
        $(document).ready(function() {
            // Capture the form submit event
            $("form").on("submit", function(e) {
                e.preventDefault(); // Prevent the form from submitting normally

                var formData = new FormData(this); // Get the form data

                $.ajax({
                    url: $(this).attr("action"), // Form action (the URL to which the data is sent)
                    type: $(this).attr("method"), // POST method
                    data: formData, // Send the form data
                    processData: false, // Prevent jQuery from processing the data
                    contentType: false, // Prevent jQuery from setting the content type
                    success: function(response) {
                        window.location.href = response.redirect_url;
                    },
                    error: function(xhr, status, error) {
                        // Handle the error response
                        var errors = xhr.responseJSON.errors;

                        // Clear previous error messages
                        $(".invalid-feedback").remove();

                        // Loop through the errors and display them next to the respective form fields
                        $.each(errors, function(field, messages) {
                            // Find the input field based on the field name
                            var inputField = $("input[name='" + field + "'], textarea[name='" + field + "']");

                            // Append the error message below the input field
                            inputField.addClass('is-invalid'); // Add the error class
                            inputField.after('<div class="invalid-feedback">' + messages[0] + '</div>'); // Display the first error message
                        });
                    }
                });
            });
        });
    </script>



</body>

</html><?php /**PATH C:\xampp\htdocs\codissa\resources\views/layouts/notification/add.blade.php ENDPATH**/ ?>