<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css" rel="stylesheet">
<?php $__env->startSection('content'); ?>

    <div class="content-header row">
        <div class="content-header-left col-md-6 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-inline-block">تعديل بيانات نبذة عن الشركة:</h3>
        </div>
    </div>
    <div class="content-body">
        <!-- Striped row layout section start -->
        <section id="striped-row-form-layouts">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-header">
                            <h4 class="card-title" id="horz-layout-icons">تعديل بيانات نبذة عن الشركة: </h4>
                            <a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
                            <div class="heading-elements">
                                <ul class="list-inline mb-0">
                                    <li><a data-action="collapse"><i class="ft-minus"></i></a></li>
                                    <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                                    <li><a data-action="expand"><i class="ft-maximize"></i></a></li>
                                    <li><a data-action="close"><i class="ft-x"></i></a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="card-content collpase show">
                            <div class="card-body">
                                <form class="form form-horizontal striped-rows form-bordered" method="POST" action="<?php echo e(route('about.update')); ?>" enctype="multipart/form-data">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('PATCH'); ?>
                                    <div class="form-body">

                                        

                                        <div class="form-group row">
                                            <label class="col-md-3 label-control" for="ar_description">نبذة عن الشركة بالعربي</label>
                                            <div class="col-md-9">
                                                <div class="position-relative has-icon-left">
                                                    <textarea id="summernote-ar" class="form-control" rows="4" name="ar_description"><?php echo e($about->ar_description); ?></textarea>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group row">
                                            <label class="col-md-3 label-control" for="en_description">نبذة عن الشركة بالانجليزي</label>
                                            <div class="col-md-9">
                                                <div class="position-relative has-icon-left">
                                                    <textarea id="summernote-en" class="form-control" rows="4" name="en_description"><?php echo e($about->en_description); ?></textarea>
                                                </div>
                                            </div>
                                        </div>

                                        <?php if($about->image): ?>
                                        <div class="form-group row">
                                            <label class="col-md-3 label-control" for="current_photo">الصورة الحالية</label>
                                            <div class="col-md-9">
                                                <div class="position-relative has-icon-left">
                                                    <img src="<?php echo e(asset('About_image/'.$about->image)); ?>" alt="صورة" style="height:100px; width:200px;" />
                                                </div>
                                            </div>
                                        </div>
                                        <?php endif; ?>

                                        <div class="form-group row">
                                            <label class="col-md-3 label-control" for="photo">صورة جديدة</label>
                                            <div class="col-md-9">
                                                <div class="position-relative has-icon-left">
                                                    <input type="file" id="photo" class="form-control" name="image">
                                                    <div class="form-control-position">
                                                        <i class="la la-file-image-o"></i>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                    <div class="form-actions right">
                                        <button type="submit" class="btn btn-primary">
                                            <i class="la la-check-square-o"></i> تعديل
                                        </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?> <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    $('#summernote-ar').summernote({
        placeholder: 'الوصف بالعربي',
        tabsize: 2,
        height: 300, // زيادة الارتفاع هنا
        toolbar: [
            ['style', ['bold', 'italic', 'underline', 'clear']],
            ['font', ['strikethrough', 'superscript', 'subscript', 'fontname', 'color', 'fontsize', 'insertTable']],
            ['para', ['ul', 'ol', 'paragraph']],
            ['insert', ['link', 'picture', 'video']],
            ['view', ['codeview', 'help']]
        ],
        callbacks: {
            onImageUpload: function(files) {
                for (let i = 0; i < files.length; i++) {
                    let reader = new FileReader();
                    reader.onload = (e) => {
                        $('#summernote-ar').summernote('insertImage', e.target.result);
                    };
                    reader.readAsDataURL(files[i]);
                }
            }
        }
    });

    $('#summernote-en').summernote({
        placeholder: 'الوصف بالإنجليزي',
        tabsize: 2,
        height: 300, // زيادة الارتفاع هنا
        toolbar: [
            ['style', ['bold', 'italic', 'underline', 'clear']],
            ['font', ['strikethrough', 'superscript', 'subscript', 'fontname', 'color', 'fontsize', 'insertTable']],
            ['para', ['ul', 'ol', 'paragraph']],
            ['insert', ['link', 'picture', 'video']],
            ['view', ['codeview', 'help']]
        ],
        callbacks: {
            onImageUpload: function(files) {
                for (let i = 0; i < files.length; i++) {
                    let reader = new FileReader();
                    reader.onload = (e) => {
                        $('#summernote-en').summernote('insertImage', e.target.result);
                    };
                    reader.readAsDataURL(files[i]);
                }
            }
        }
    });
});
</script>
<?php $__env->stopSection(); ?>

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