<?php $__env->startSection('title', 'Edit 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">Edit 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">Edit 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">Edit News & Podcasts</h4> </div><!-- end card header --> <div class="card-body"> <form method="post" data-post-uri="<?php echo e(route('admin.news_podcasts.update',$thisNews->id)); ?>" id="podcast_form" data-type="edit"> <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" disabled> <option <?php if($thisNews->type == 1): ?>selected <?php endif; ?> value="1">News</option> <option <?php if($thisNews->type == 2): ?>selected <?php endif; ?> 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" value="<?php echo e($thisNews->title); ?>"> </div> </div> <!--end col--> </div> <div id="audio_area"> </div> <div> <div> <label for="placeholderInput" class="form-label">Description</label> <textarea id="editor"><?php echo e($thisNews->description); ?></textarea> </div> </div> <div class="mt-3"> <button type="submit" class="btn btn-primary" 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> if ($("#select_type").val() == 2) { addAudioFile() } function addAudioFile() { $('#audio_area').html('<div class="row gy-4 align-items-end d-flex mb-3"> ' + '<div class="col-md-6"> <div> <label for="placeholderInput" class="form-label">Change Audio</label> ' + '<input class="form-control" type="file" accept="audio/*" id="audio" value="<?php echo e(route('image', ['news_podcasts/audios', $thisNews->audio_file])); ?>">' + ' <input class="form-control" type="text" name="audio_file" hidden> ' + '</div> ' + '</div> ' + '<div class="col-md-6"> <div> <label for="placeholderInput" class="form-label">Current Audio</label><br> ' + ' <audio controls="controls" style="height: 35px;">'+ ' <source src="<?php echo e(route('image', ['news_podcasts', $thisNews->audio_file])); ?>" type="audio/mpeg" />'+ ' Your browser does not support the audio element.'+ ' </audio>' + '</div> ' + '</div> ' + '</div>') $('#audio').on('change', function () { getBase64($(this)[0].files[0]).then( data => $('input[name="audio_file"]').val(data) ) }) } </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/edit.blade.php ENDPATH**/ ?>