<?php $__env->startSection('content'); ?>
    <div class="content-page">
        <div class="content">
            <!-- Start Content-->
            <div class="container-fluid">

                <!-- start page title -->
                <div class="row">
                    <div class="col-12">
                        <div class="page-title-box">
                            <div class="page-title-right">
                                <ol class="breadcrumb m-0">
                                    <a href="#" class="btn btn-sm btn-dark waves-effect">
                                        <i class="dripicons-reply me-1"></i> About Page
                                    </a>
                                </ol>
                            </div>
                            <h4 class="page-title">About Page</h4>
                        </div>
                    </div>
                </div>

                <!-- end page title -->

                <div class="card">
                    <div class="card-body">
                        <?php if(isset($aboutpage) && isset($aboutpage->id)): ?>
                            <form action="<?php echo e(route('aboutpage.update', $aboutpage->id)); ?>" method="POST"
                                enctype="multipart/form-data" class="needs-validation" novalidate>
                                <?php echo method_field('PUT'); ?>
                            <?php else: ?>
                                <form action="<?php echo e(route('aboutpage.store')); ?>" method="POST" enctype="multipart/form-data"
                                    class="needs-validation" novalidate>
                        <?php endif; ?>

                        <?php echo csrf_field(); ?>

                        <div class="row">

                            <div class="mb-3 col-md-12">
                                <label class="form-label"> About</label>
                                <textarea class="ckeditor" name="about_text" rows="8"><?php echo e(old('about_text', optional($aboutpage)->about_text)); ?></textarea>
                            </div>

                            <div class="mb-3 col-md-12">
                                <label class="form-label"> Mission</label>
                                <textarea class="ckeditor" name="mission" rows="8"><?php echo e(old('mission', optional($aboutpage)->mission)); ?></textarea>
                            </div>

                            <div class="mb-3 col-md-12">
                                <label class="form-label"> Vision</label>
                                <textarea class="ckeditor" name="vision" rows="8"><?php echo e(old('vision', optional($aboutpage)->vision)); ?></textarea>
                            </div>

                            <div class="mb-3 col-md-12">
                                <label class="form-label"> Values</label>
                                <textarea class="ckeditor" name="value" rows="8"><?php echo e(old('value', optional($aboutpage)->value)); ?></textarea>
                            </div>

                            <div class="mb-3 col-md-3">
                                <label class="form-label" for="validationCustom05">About</label>
                                <input type="file" id="about_image" name="about_image" class="form-control">

                                <img class="mt-2" id="about_img"
                                    src="<?php echo e(URL::asset('backend/images/about/' . old('about_image', optional($aboutpage)->about_image))); ?>"
                                    onerror="this.onerror=null; this.src='../backend/images/no_image.png'"
                                    style="width: 35%;" />

                            </div>

                            <div class="mb-3 col-md-3">
                                <label class="form-label">Mission</label>
                                <input type="file" name="mission_image" id="mission_image" class="form-control">

                                <img class="mt-2" id="mission_img"
                                    src="<?php echo e(URL::asset('backend/images/about/' . old('mission_image', optional($aboutpage)->mission_image))); ?>"
                                    onerror="this.onerror=null; this.src='../backend/images/no_image.png'"
                                    style="width: 35%;" />

                            </div>

                            <div class="mb-3 col-md-3">
                                <label class="form-label">Vision</label>
                                <input type="file" name="vision_image" id="vision_image" class="form-control">

                                <img class="mt-2" id="vision_img"
                                    src="<?php echo e(URL::asset('backend/images/about/' . old('vision_image', optional($aboutpage)->vision_image))); ?>"
                                    onerror="this.onerror=null; this.src='../backend/images/no_image.png'"
                                    style="width: 35%;" />

                            </div>

                            <div class="mb-3 col-md-3">
                                <label class="form-label">Value</label>
                                <input type="file" name="value_image" id="value_image" class="form-control">

                                <img class="mt-2" id="value_img"
                                    src="<?php echo e(URL::asset('backend/images/about/' . old('value_image', optional($aboutpage)->value_image))); ?>"
                                    onerror="this.onerror=null; this.src='../backend/images/no_image.png'"
                                    style="width: 35%;" />

                            </div>

                            <div class="mb-3 col-md-12">
                                <button class="btn btn-primary" type="submit">Submit</button>
                            </div>

                        </div>

                        </form>

                    </div>
                </div>
            </div>
        </div>

    </div>
    <!-- container -->
    <script>
        about_image.onchange = evt => {
            const [file] = about_image.files
            if (file) {
                about_img.src = URL.createObjectURL(file)
            }
        }

        mission_image.onchange = evt => {
            const [file] = mission_image.files
            if (file) {
                mission_img.src = URL.createObjectURL(file)
            }
        }


        vision_image.onchange = evt => {
            const [file] = vision_image.files
            if (file) {
                vision_img.src = URL.createObjectURL(file)
            }
        }

        value_image.onchange = evt => {
            const [file] = value_image.files
            if (file) {
                value_img.src = URL.createObjectURL(file)
            }
        }
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\tpl-groups\resources\views/backend/about/index.blade.php ENDPATH**/ ?>