<?php $__env->startSection('content'); ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.18/css/bootstrap-select.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.18/js/bootstrap-select.min.js"></script>

<main id="main" class="main">
    <?php if( Session::get('permissions.user_type') == 'A' || Session::get('permissions.user_type') == 'SA'): ?>
        <div class="page-breadcrumb">
            <div class="row">
                <div class="col-12 d-flex no-block align-items-center justify-content-between px-4 mb-2">
                    <h4 class="page-title">Addon</h4>
                    <div class="ml-auto text-right">
                        <a href="<?php echo e(route('admin.addon.addon')); ?>" class="btn btn-outline-info">Back</a>
                    </div>
                </div>
            </div>
        </div>

        <div class="container-fluid">
            <!-- ============================================================== -->
            <!-- Start Page Content -->
            <!-- ============================================================== -->
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <?php $__currentLoopData = ['danger', 'warning', 'success', 'info']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $msg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php if(Session::has('alert-' . $msg)): ?>
                                <h4 class="font-weight-light alert alert-<?php echo e($msg); ?>"><?php echo e(Session::get('alert-' . $msg)); ?></h4>
                            <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <form action="<?php echo e(route('admin.addon.addon_add')); ?>" method="POST" class="form-horizontal" id="formadd" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div class="card-body">
                                <h4 class="card-title">Addon Add</h4>
                                
                                
                                
                                <div class="form-group m-t-20">
                                    <label>New Addon FNID</label>*</span></label>
                                    <input type="text" class="form-control" id="fnid" name="fnid" placeholder="Enter New Addon FNID" required>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>Old ID</label>*</span></label>
                                    <input type="text" class="form-control" id="oldid" name="oldid" placeholder="Enter Old ID" required>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>Addon Title</label>*</span></label>
                                    <input type="text" class="form-control" id="addon_title" name="addon_title" placeholder="Enter Addon Title" required>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>Price</label>*</span></label>
                                    <input type="number" class="form-control" id="price" name="price" placeholder="Enter Price" required>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>MRP</label>
                                    <input type="number" class="form-control" id="mrp" name="mrp" placeholder="Enter MRP">
                                </div>
                                <div class="col-md-6">
                                    <label>Delivery Type : </label><br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="radio" name="delivery_type" value="H" required>
                                        <label class="form-check-label" for="">Hand Delivery</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="radio" name="delivery_type" value="C">
                                        <label class="form-check-label" for="">Courier </label>
                                    </div>
                                </div>
                            </div>
                            <div class="border-top">
                                <div class="card-body">
                                    <input class="btn btn-primary" type="submit" value="CREATE">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?> 
</main>   

<script type="text/javascript">
    $.validator.setDefaults({
            submitHandler: function(form) {
                form.submit();
            }
    });

    // $(function() {

    //     // validate the comment form when it is submitted

    //     $("#formadd").validate({

    //         ignore: [],

    //         errorPlacement: function(label, element) {

    //             label.addClass('mt-2 text-danger');

    //             label.insertAfter(element);

    //         },

    //         highlight: function(element, errorClass) {

    //             $(element).parents('.form-group').addClass('has-danger')

    //             $(element).addClass('form-control-danger')

    //         }

    //       });

    // });

    // CKEDITOR.replace("cbcontenttop");
    // CKEDITOR.replace("cbcontentbottom");

    // $('#title').on('blur', function(){
    //     var title = $.trim($(this).val());
    //     if(title != ''){
    //         //if($.trim($('#slug').val()) == ''){
    //             $('#slug').val(title.replace(/ /g,"-").toLowerCase());
    //             $('#slug-error').hide();
    //         //}
    //     }
    // });

    // $('.ctype').click(function(){
    //     if(this.value == 'P'){
    //         $('.price-range').show();
    //         $('#from_price').attr('required', true);
    //         $('#to_price').attr('required', true);
    //         $('#equation').attr('required', true);
    //     }else{
    //         $('.price-range').hide();
    //         $('#from_price').removeattr('required', true);
    //         $('#to_price').removeattr('required', true);
    //         $('#equation').removeattr('required', true);
    //     }
    // });

</script>    

<?php $__env->stopSection(); ?>


<?php echo $__env->make('layouts.admin.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/rightflorist/public_html/ofadmin.rightflorist.org/resources/views/admin/addon/addon_add.blade.php ENDPATH**/ ?>