<?php $__env->startSection('content'); ?>

    <!-- Form row -->
    <div class="row">
        <div class="col-xl-12 box-margin height-card">
            <div class="card card-body">
                <div class="d-md-flex justify-content-between align-items-center mb-20">
                    <h4 class="card-title"><?php echo e(__('content.edit_testimonial')); ?>

                        <!-- Button -->
                        <a id="hoverButton" class="iyzi-btn"><i class="fas fa-camera"></i> <?php echo e(__('content.view_draft')); ?></a>
                        <!-- Modal -->
                        <div id="imageModal" class="border border-success iyzi-modal">
                            <img class="img-fluid " src="<?php echo e(asset('uploads/img/dummy/style/testimonial-'.$item->style.'.jpg')); ?>" alt="draft image">
                        </div>
                    </h4>
                    <div>
                        <a href="<?php echo e(url()->previous()); ?>"  class="btn btn-primary"><i class="fas fa-angle-left"></i> <?php echo e(__('content.back')); ?></a>
                    </div>
                </div>
            <?php if($demo_mode == "on"): ?>
                <!-- Include Alert Blade -->
                    <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php else: ?>
                <form action="<?php echo e(route('testimonial.update', $item->id)); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo method_field('PUT'); ?>
                    <?php echo csrf_field(); ?>
                    <?php endif; ?>

                    <input type="hidden" name="style" value="<?php echo e($item->style); ?>">

                    <div class="row">
                        <div class="col-md-12">
                                <div class="form-group">
                                    <label for="section_image"><?php echo e(__('content.image')); ?> (<?php echo e(__('content.size')); ?> 70 x 70) (.svg, .jpg, .jpeg, .png, .webp, .gif)</label>
                                    <input type="file" name="section_image" class="form-control-file" id="section_image">
                                    <small class="form-text text-muted"><?php echo e(__('content.please_use_recommended_sizes')); ?></small>
                                </div>
                                <div class="height-card box-margin">
                                    <div class="card">
                                        <div class="card-body">
                                            <div class="avatar-area text-center">
                                                <div class="media">
                                                    <?php if(!empty($item->section_image)): ?>
                                                        <a  class="d-block mx-auto" href="#" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo e(__('content.current_image')); ?>">
                                                            <img src="<?php echo e(asset('uploads/img/testimonial/'.$item->section_image)); ?>" alt="testimonial image" class="rounded w-25">
                                                        </a>
                                                    <?php else: ?>
                                                        <a  class="d-block mx-auto" href="#" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo e(__('content.current_image')); ?>">
                                                            <img src="<?php echo e(asset('uploads/img/dummy/no-image.jpg')); ?>" alt="no image" class="rounded w-25">
                                                        </a>
                                                    <?php endif; ?>
                                                </div>
                                                <?php if(!empty($item->section_image)): ?>
                                                    <a class="mt-3 d-block" href="#" data-toggle="modal" data-target="#deleteModal<?php echo e($item->id); ?>">
                                                        <i class="fa fa-trash text-danger font-18"></i>
                                                    </a>
                                                <?php endif; ?>
                                            </div>
                                            <!--end card-body-->
                                        </div>
                                    </div>
                                    <!--end card-->
                                </div>
                                <!--end col-->
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="name"><?php echo e(__('content.name')); ?> </label>
                                <input type="text" name="name" class="form-control" id="name" value="<?php echo e($item->name); ?>">
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="job"><?php echo e(__('content.job')); ?> </label>
                                <input type="text" name="job" class="form-control" id="job" value="<?php echo e($item->job); ?>">
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="description"><?php echo e(__('content.description')); ?> </label>
                                <textarea type="text" name="description" class="form-control" id="description" rows="3"><?php echo e($item->description); ?></textarea>
                            </div>
                        </div>
                        <?php if($item->style == 'style3'): ?>
                        <input type="hidden" name="star" value="1">
                        <?php else: ?>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="star" class="col-form-label"><?php echo e(__('content.star')); ?></label>
                                <select class="form-control" name="star" id="star">
                                    <option value="5" selected><?php echo e(__('content.select_your_option')); ?></option>
                                    <option value="1" <?php echo e($item->star == 1 ? 'selected' : ''); ?>>1</option>
                                    <option value="2" <?php echo e($item->star == 2 ? 'selected' : ''); ?>>2</option>
                                    <option value="3" <?php echo e($item->star == 3 ? 'selected' : ''); ?>>3</option>
                                    <option value="4" <?php echo e($item->star == 4 ? 'selected' : ''); ?>>4</option>
                                    <option value="5" <?php echo e($item->star == 5 ? 'selected' : ''); ?>>5</option>
                                </select>
                            </div>
                        </div>
                        <?php endif; ?>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="order"><?php echo e(__('content.order')); ?></label>
                                <input type="number" name="order" class="form-control" id="order" value="<?php echo e($item->order); ?>">
                            </div>
                        </div>
                        <div class="col-md-12">
                            <button type="submit" class="btn btn-primary mr-2"><?php echo e(__('content.submit')); ?></button>
                        </div>
                    </div>
                </form>

                <!-- Modal -->
                <div class="modal fade" id="deleteModal<?php echo e($item->id); ?>" tabindex="-1" role="dialog" aria-labelledby="messageModalCenterTitle" aria-hidden="true">
                    <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title" id="messageModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                            <div class="modal-body text-center">
                                <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                            </div>
                            <div class="modal-footer">
                                <?php if($demo_mode == "on"): ?>
                                    <!-- Include Alert Blade -->
                                    <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                <?php else: ?>
                                    <form class="d-inline-block" action="<?php echo e(route('testimonial.destroy_image', $item->id)); ?>" method="POST">
                                        <?php echo method_field('DELETE'); ?>
                                        <?php echo csrf_field(); ?>
                                        <?php endif; ?>

                                    <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                    <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- end row -->

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

<?php echo $__env->make('layouts.admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/lltrusti/casinonexus.online/ajay/resources/views/admin/sections/testimonial/edit.blade.php ENDPATH**/ ?>