
<?php $__env->startSection('title'); ?>
<title><?php echo e($websiteLang->where('lang_key','google_analytic')->first()->custom_text); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin-content'); ?>
    <!-- DataTales Example -->
    <div class="row">
        <div class="col-md-8">
            <div class="card shadow mb-4">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-primary"><?php echo e($websiteLang->where('lang_key','google_analytic')->first()->custom_text); ?></h6>
                </div>
                <div class="card-body">
                    <form action="<?php echo e(route('admin.google.analytic.update')); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <div class="form-group">
                            <label for=""><?php echo e($websiteLang->where('lang_key','allow_analytic')->first()->custom_text); ?></label>
                            <select name="google_analytic" id="google_analytic" class="form-control">
                                <option <?php echo e($setting->google_analytic==1 ? 'selected':''); ?> value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                                <option <?php echo e($setting->google_analytic==0 ? 'selected':''); ?> value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                            </select>
                        </div>

                        <?php if($setting->google_analytic !=1): ?>
                        <div class="form-group d-none" id="hidden_link">
                            <label for="google_analytic_code"><?php echo e($websiteLang->where('lang_key','analytic_id')->first()->custom_text); ?></label>
                            <input type="text" class="form-control" name="google_analytic_code" id="google_analytic_code" value="<?php echo e($setting->google_analytic_code); ?>">
                        </div>
                        <?php endif; ?>

                        <?php if($setting->google_analytic==1): ?>
                            <div class="form-group" id="hidden_link">
                                <label for="google_analytic_code"><?php echo e($websiteLang->where('lang_key','analytic_id')->first()->custom_text); ?></label>
                                <input type="text" class="form-control" name="google_analytic_code" id="google_analytic_code" value="<?php echo e($setting->google_analytic_code); ?>">
                            </div>
                        <?php endif; ?>



                        <button type="submit" class="btn btn-success"><?php echo e($websiteLang->where('lang_key','update')->first()->custom_text); ?></button>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script>
        (function($) {
        "use strict";
        $(document).ready(function () {
            $("#google_analytic").on("change",function(e){
                var id=$(this).val()
                if(id==1){
                    $("#hidden_link").removeClass('d-none');
                }else{
                    $("#hidden_link").addClass('d-none');
                }
            })

        });

        })(jQuery);
    </script>

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

<?php echo $__env->make('layouts.admin.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/cloudelite/imobi.eliteteclda.com/resources/views/admin/settings/google-analytic/index.blade.php ENDPATH**/ ?>