OwlCyberSecurity - MANAGER
Edit File: 97dac72768ed97a2e510612de8121784.php
<?php $__env->startSection('content'); ?> <style> .error_div { background-color: #ffc8c8; border-radius: 4px; padding: 0.4rem; padding-left: 1rem; color: #f11a1a; border: 1px solid #ff2a2a; } .success_div { background-color: #aedcaf; border-radius: 4px; padding: 0.4rem; padding-left: 1rem; color: #1f6d26; border: 1px solid #248526; } </style> <div class="row p-2"> <div class="col-12"> <h3>Add Blog</h3> </div> </div> <div class="row p-2"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="row"> <?php if(!empty($errors->all())): ?> <div class="col-12 error_div"> <?php echo e($errors->first()); ?> </div> <?php endif; ?> <?php if(session()->has('message')): ?> <div class="col-12 error_div"> <?php echo e(session()->get('message')); ?> </div> <?php endif; ?> <?php if(session()->has('success')): ?> <div class="col-12 success_div"> <?php echo e(session()->get('success')); ?> </div> <?php endif; ?> </div> <form action="<?php echo e(route('add_blog.add_blogs')); ?>" method="POST" autocomplete="off" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="row"> <div class="col-lg-6 col-md-6 col-sm-12"> <div class="form-group"> <label for="title" class="form-label">Title</label> <input type="text" name="title" id="title" class="form-control" autofocus value="<?php echo e(old('title') ? old('title') : ''); ?>"> </div> <div class="form-group"> <label for="slug" class="form-label">Slug</label> <input type="text" name="slug" id="slug" class="form-control" autofocus value="<?php echo e(old('slug') ? old('slug') : ''); ?>"> </div> <div class="form-group"> <label for="short_description" class="form-label">Short Description</label> <textarea name="short_description" id="short_description"><?php if(old('short_description')): ?><?php echo e(old('short_description')); ?><?php endif; ?></textarea> </div> <div class="form-group"> <label for="content" class="form-label">Content</label> <textarea name="content" id="content"><?php if(old('content')): ?><?php echo e(old('content')); ?><?php endif; ?></textarea> </div> <div class="form-group"> <label for="meta_title" class="form-label">Meta Title</label> <input type="text" name="meta_title" id="meta_title" class="form-control" autofocus value="<?php echo e(old('meta_title') ? old('meta_title') : ''); ?>"> </div> <div class="form-group"> <label for="meta_description" class="form-label">Meta Description</label> <textarea name="meta_description" id="meta_description"><?php if(old('meta_description')): ?><?php echo e(old('meta_description')); ?><?php endif; ?></textarea> </div> <div class="form-group"> <label for="meta_keywords" class="form-label">Meta Keywords</label> <textarea name="meta_keywords" id="meta_keywords"><?php if(old('meta_keywords')): ?><?php echo e(old('meta_keywords')); ?><?php endif; ?></textarea> </div> </div> <div class="col-lg-6 col-md-6 col-sm-12"> <div class="row mt-2"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="status" class="form-label">Status</label> <br> <label><input type="radio" name="status" <?php echo e((old('status') != null && old('status') == 1 ? 'checked' : '')); ?> value="1" style="vertical-align: middle;" checked> Active </label> <label><input type="radio" name="status" <?php echo e((old('status') != null && old('status') == 0 ? 'checked' : '')); ?> value="0" style="vertical-align: middle;"> Inactive</label> </div> </div> <div class="form-group"> <label for="is_featured" class="form-label">Authentications</label> <br> <label><input type="checkbox" name="is_featured" <?php echo e(old('is_featured') == 1 ? 'checked' : ''); ?> value="1" style="vertical-align: middle;"> Is Featured? </label> </div> <div class="form-group"> <label class="form-label">Show In</label> <br> <label><input type="checkbox" name="show_in_slider" <?php echo e(old('show_in_slider') == 1 ? 'checked' : ''); ?> value="1" style="vertical-align: middle;"> Slider </label> <label><input type="checkbox" name="show_in_sidebar" <?php echo e(old('show_in_sidebar') == 1 ? 'checked' : ''); ?> value="1" style="vertical-align: middle;"> Side menu </label> </div> <div class="form-group"> <label>Category</label> <select name="category_id" id="category_id" class="form-control"> <option value="0">Select</option> <?php foreach ($categories as $catid => $cat_name) { ?> <option <?php echo e((old('category_id') == $catid ? 'selected' : '')); ?> value="<?php echo e($catid); ?>"><?php echo e($cat_name); ?></option> <?php } ?> </select> </div> <div class="form-group"> <label for="external_link" class="form-label">External Link</label> <input type="text" name="external_link" id="external_link" class="form-control" autofocus value="<?php echo e(old('external_link') ? old('external_link') : ''); ?>"> </div> <div class="form-group"> <label>Link Target</label> <select name="link_target" class="form-control"> <option value="0">Select</option> <option value="1" selected>_self</option> <option value="2">_blank</option> </select> </div> <div class="form-group"> <label for="image" class="form-label">Header Image</label> <div> <input type="file" name="image" id="image"> </div> <small>(Max image size: 1 MB; Max Dimension: 1132 x 250 pixels; Image types allowed: jpg, jpeg, gif, png.)</small> </div> <div class="form-group"> <button type="submit" class="custom-blue-btn width-5-rem ">Add</button> <a href="<?php echo e(route('get_categories_index.view_categories')); ?>"><button type="button" class="custom-grey-btn width-5-rem">Cancel</button></a> </div> </div> </div> </form> </div> </div> </div> </div> <script> // document ready start $(document).ready(function() { $('#slug').change(function() { var str = $(this).val(); str = str.replace(/\s+/g, '-').toLowerCase(); $('#slug').val(str); }); $('#short_description, #content').summernote({ placeholder: '<small>Description...</small>', tabsize: 2, height: 200, // toolbar: [ // // [groupName, [list of button]] // ['style', ['bold', 'italic', 'underline']], // ['font', ['strikethrough']], // ['fontsize', ['fontsize']], // ['color', ['color']], // ], disableDragAndDrop: false, callbacks: { onImageUpload: function(data) { data.pop(); } }, }); // $('#category_id').select2(); }); // document ready end // error and success div timouts setTimeout(() => { $('.error_div').fadeOut('slow'); $('.success_div').fadeOut('slow'); }, 3000); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('master.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/makmfewe/dingomo.com/resources/views/blog/add.blade.php ENDPATH**/ ?>