|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/sld.edukrypt.app/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<!-- begin::main content -->
<main class="main-content">
<div class="container">
<!-- begin::page header -->
<div class="page-header">
<h3>Edit Content</h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo e($contents->contents); ?></li>
</ol>
</nav>
</div>
<!-- end::page header -->
<div class="row">
<div class="col-md-12">
<?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
<div class="card">
<div class="card-header">
<a href="<?php echo e(asset('admin/pages/')); ?>"
class="btn btn-primary pull-right text-white"><i class="fa fa-list"></i> Contents</a>
</div>
<div class="card-body">
<form enctype="multipart/form-data" autocomplete="off"
action="<?php echo e(asset('admin/edit-page/' . Request::segment(3))); ?>"
method="post">
<?php echo csrf_field(); ?>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="type">Type <span class="text-danger">*</span></label>
<select class="form-control" name="type" id="type">
<option <?php echo e($contents->type == 'about_us' ? 'selected' : ''); ?> value="about_us">
About
</option>
<option <?php echo e($contents->type == 'curriculum' ? 'selected' : ''); ?> value="curriculum">
Curriculum</option>
<option <?php echo e($contents->type == 'score' ? 'selected' : ''); ?> value="score">
Score</option>
<option <?php echo e($contents->type == 'dashboard' ? 'selected' : ''); ?> value="dashboard">
Dashboard</option>
<option <?php echo e($contents->type == 'termsconditions' ? 'selected' : ''); ?> value="termsconditions">
Terms & Conditions</option>
<option <?php echo e($contents->type == 'privacypolicy' ? 'selected' : ''); ?> value="privacypolicy">
Privacy & Policy</option>
</select>
<?php if($errors->has('type')): ?>
<div class="error">
<?php echo e($errors->first('type')); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="form-group">
<label for="description_en">Description In English</label>
<textarea class="form-control" name="description_en" id="description_en" cols="30" rows="10"><?php echo e($contents->content); ?></textarea>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="image">Thumbnail</label>
<input class="form-control" type="file" name="image" id="image">
</div>
<div class="form-group">
<img style="width: 80px;"
src="<?php echo e(asset('public/uploads/content/' . $contents->image)); ?>"
alt="$contents->slug">
</div>
</div>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<script src="https://cdn.tiny.cloud/1/hau95x3ztvsrdr65m4zb9kd3e3l24vbxynk72xtkh84z3rol/tinymce/5/tinymce.min.js"
referrerpolicy="origin"></script>
<script type="text/javascript">
tinymce.init({
selector: 'textarea',
plugins: 'code anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount',
toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table | align lineheight | numlist bullist indent outdent | emoticons charmap | removeformat',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }',
height: 300,
menubar: true,
images_reuse_filename: true,
block_unsupported_drop: true,
file_picker_types: 'image',
images_upload_handler: function image_upload_handler(blobInfo, success, failure, progress) {
var xhr, formData;
xhr = new XMLHttpRequest();
xhr.withCredentials = false;
xhr.open("POST", "<?php echo e(asset('admin/add-contents-image')); ?>");
var token = $('meta[name="csrf-token"]').attr('content');
xhr.setRequestHeader("X-CSRF-Token", token);
xhr.onload = function() {
var json;
if (xhr.status === 403) {
failure('HTTP Error: ' + xhr.status, {
remove: true
});
return;
}
if (xhr.status < 200 || xhr.status >= 300) {
failure('HTTP Error: ' + xhr.status);
return;
}
json = JSON.parse(xhr.responseText);
if (!json || typeof json.location != 'string') {
failure('Invalid JSON: ' + xhr.responseText);
return;
}
success(json.location);
};
xhr.onerror = function() {
failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);
};
formData = new FormData();
formData.append('image', blobInfo.blob(), blobInfo.filename());
xhr.send(formData);
},
file_picker_callback: function(callback, value, meta) {
// Provide file and text for the link dialog
if (meta.filetype == 'file') {
callback('mypage.html', {
text: 'My text'
});
}
// Provide image and alt text for the image dialog
if (meta.filetype == 'image') {
callback('myimage.jpg', {
alt: 'My alt text'
});
}
// Provide alternative source and posted for the media dialog
if (meta.filetype == 'media') {
callback('movie.mp4', {
source2: 'alt.ogg',
poster: 'image.jpg'
});
}
}
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('admin.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/sld.edukrypt.app/resources/views/admin/pages/edit.blade.php ENDPATH**/ ?>