<?php $__env->startSection('title', 'Add News/Podcast'); ?> <?php $__env->startPush('custom_css'); ?> <link rel="stylesheet" href="<?php echo e(asset('assets/js/loader/waitMe.css')); ?>"> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <div class="col-12"> <div class="page-title-box d-sm-flex align-items-center justify-content-between"> <h4 class="mb-sm-0">Add News & Podcasts</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="<?php echo e(route('admin.dashboard')); ?>">Dashboard</a></li> <li class="breadcrumb-item active">Add News & Podcasts</li> </ol> </div> </div> </div> </div> <div class="card"> <div class="card-header align-items-center d-flex"> <h4 class="card-title mb-0 flex-grow-1">Add News & Podcasts</h4> </div><!-- end card header --> <div class="card-body"> <form method="post" data-post-uri="<?php echo e(route('admin.news_podcasts.store')); ?>" id="podcast_form" data-type="add"> <div class="row gy-4 mb-3"> <div class="col-md-6"> <div> <label for="placeholderInput" class="form-label">Type</label> <select class="form-select mb-3" aria-label="Default select example" name="type" id="select_type"> <option value="1">News</option> <option value="2">Podcasts</option> </select> </div> </div> <div class="col-md-6"> <div> <label for="placeholderInput" class="form-label">Headline</label> <input type="text" class="form-control" placeholder="Enter headline" name="title"> </div> </div> <!--end col--> </div> <div id="audio_area"> </div> <div> <div> <label for="placeholderInput" class="form-label">Description</label> <textarea id="editor"></textarea> </div> </div> <div class="mt-3"> <button type="submit" class="btn btn-primary news_btn" id="submit">Submit</button> </div> </form> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('custom_scripts'); ?> <script src="<?php echo e(asset('assets/js/loader/waitMe.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/custom/news_podcasts.js')); ?>"></script> <script> $("#select_type").on('change', function () { if ($(this).val() == 2) { $('#audio_area').html('<div class="row gy-4 align-items-end d-flex mb-3"> ' + '<div class="col-md-12"> <div> <label for="placeholderInput" class="form-label">Upload Audio</label> ' + '<input class="form-control" type="file" accept="audio/*" id="audio">' + ' <input class="form-control" type="text" name="audio_file" hidden> ' + '</div> ' + '</div> ' + '</div>') $('#audio').on('change', function () { getBase64($(this)[0].files[0]).then( data => $('input[name="audio_file"]').val(data) ) }) } else $('#audio_area').html('') }) </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('admin.layout.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp8\htdocs\radio-kaya\resources\views/admin/news_podcasts/add.blade.php ENDPATH**/ ?>