Viewing file: 4385716ab29ba8052f45de70b076c456.php (11.12 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> <?php echo e(trans('admin.about_section')); ?> <?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-css'); ?>
<link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')); ?>">
<link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')); ?>">
<link href="https://cdn.jsdelivr.net/npm/summernote/dist/summernote-bs4.min.css" rel="stylesheet">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<section class="content">
<div class="row">
<div class="col-12 mx-auto col-sm-10 mt-3">
<div class="card">
<div class="card-header">
<h2 class="card-title"><?php echo e(trans('admin.about_section')); ?> </h2>
</div>
<form method="post" role="form" id="welcomesectionForm" action="<?php echo e(route('admin.theme.about.section.store')); ?>" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<div class="card-body">
<?php
$about_section=json_decode(get_settings('about_section'));
$cv_sections = isset($about_section->cv_sections)?$about_section->cv_sections:[];
?>
<div class="form-group">
<label for="title"><?php echo e(trans('Sub Title')); ?></label>
<input value="<?php echo e(isset($about_section->sub_title)?$about_section->sub_title:''); ?>" type="text" name="sub_title" class="form-control" id="title"
placeholder="<?php echo e(trans('Sub Title')); ?>">
</div>
<div class="form-group">
<label for="title"><?php echo e(trans('Title')); ?></label>
<input value="<?php echo e(isset($about_section->title)?$about_section->title:''); ?>" type="text" name="title" class="form-control" id="title"
placeholder="<?php echo e(trans('Title')); ?>">
</div>
<div class="form-group">
<label for="image"><?php echo e(trans('admin.image')); ?></label>
<input type="hidden" name="pre_image" value="<?php echo e(isset($about_section->image)?$about_section->image:''); ?>">
<input value="<?php echo e(isset($about_section->image)?$about_section->image:''); ?>" type="file" name="about_image" class="form-control" id="image"
placeholder="<?php echo e(trans('admin.image')); ?>">
</div>
<div class="form-group">
<label for="download_file"><?php echo e(trans('admin.download_file')); ?></label>
<input type="hidden" name="pre_download_file" value="<?php echo e(isset($about_section->pre_download_file)?$about_section->pre_download_file:''); ?>">
<input type="file" name="download_file" class="form-control" id="download_file"
placeholder="<?php echo e(trans('admin.download_file')); ?>">
</div>
<div class="form-group">
<label for="description"><?php echo app('translator')->get('admin.description'); ?></label>
<textarea name="description" id="description" class="form-control description"
placeholder="<?php echo e(trans('admin.description')); ?>"><?php echo e(isset($about_section->description)?$about_section->description:''); ?></textarea>
</div>
<div class="row">
<div class="col-lg-12">
<label for="">For CV</label>
</div>
</div>
<?php if(isset($cv_sections) && $cv_sections): ?>
<?php
$counter = 999;
?>
<div class="row">
<div class="col-lg-12">
<button type="button" class="btn btn-info btn-sm add-activity-img mt-4 float-right">+</button>
</div>
</div>
<?php $__currentLoopData = $cv_sections; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cv_section): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$counter++;
?>
<div class="row align-items-center" id="form_column_<?php echo e($counter); ?>">
<div class="col-lg-5">
<div class="form-group">
<label for="title">Year</label>
<input value="<?php echo e(isset($cv_section->year)?$cv_section->year:''); ?>" type="text" name="years[]" class="form-control" id="topic"
placeholder="Enter Year">
</div>
</div>
<div class="col-lg-5">
<div class="form-group">
<label for="title">Short Description</label>
<input value="<?php echo e(isset($cv_section->short_description)?$cv_section->short_description:''); ?>" type="text" name="short_description[]" class="form-control" id="recomended"
placeholder="Enter Short Description">
</div>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-danger btn-sm remove-activity-img mt-4" data-id="<?php echo e($counter); ?>">X</button>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<div class="row align-items-center">
<div class="col-lg-5">
<div class="form-group">
<label for="title">Year</label>
<input type="text" name="years[]" class="form-control" id="topic"
placeholder="Enter Year">
</div>
</div>
<div class="col-lg-5">
<div class="form-group">
<label for="title">Short Description</label>
<input value="" type="text" name="short_description[]" class="form-control" id="recomended"
placeholder="Enter Short Description">
</div>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-info btn-sm add-activity-img mt-4">+</button>
</div>
</div>
<?php endif; ?>
<div id="activity-add-new-section">
</div>
</div>
<div class="card-footer text-right">
<button type="submit" class="btn btn-primary"><?php echo e(trans('admin.submit')); ?></button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?>
<script src="<?php echo e(asset('plugins/datatables/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(asset('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js')); ?>"></script>
<script src="<?php echo e(asset('plugins/datatables-responsive/js/dataTables.responsive.min.js')); ?>"></script>
<script src="<?php echo e(asset('plugins/datatables-responsive/js/responsive.bootstrap4.min.js')); ?>"></script>
<script src="https://cdn.jsdelivr.net/npm/summernote/dist/summernote-bs4.min.js"></script>
<script>
$(document).ready(function() {
$('.description').summernote();
});
</script>
<script>
let i = 3934;
$(document).on("click", ".add-activity-img", function (e) {
i++
let html = `<div class="row align-items-center" id="form_column_${i}">
<div class="col-lg-5">
<div class="form-group">
<label for="title">Year</label>
<input type="text" name="years[]" class="form-control" id="topic"
placeholder="Enter Year">
</div>
</div>
<div class="col-lg-5">
<div class="form-group">
<label for="title">Short Description</label>
<input type="text" name="short_description[]" class="form-control" id="recomended"
placeholder="Enter Short Description">
</div>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-danger btn-sm remove-activity-img" data-id="${i}">X</button>
</div>
</div>`;
$("#activity-add-new-section").append(html);
});
$(document).on('click', '.remove-activity-img', function (e) {
const id = $(this).attr('data-id');
console.log(id);
$('#form_column_' + id).remove();
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/guest/Desktop/picotech -project/latest_protfolio_001/resources/views/admin/about_section/create.blade.php ENDPATH**/ ?>
|