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

<div class="side-title">
    <h3><?php echo e($head ?? ''); ?></h3>
</div>

<div class="border-item">
    <form class="form-row" method="post" action="<?php echo e($action); ?>">
        <?php if($field ?? ''  && $field->id): ?>
            <?php echo method_field('PUT'); ?>
        <?php endif; ?>
        <?php echo csrf_field(); ?>
<?php if($field ?? ''  && $field->id): ?>
    <div class="form-group col-lg-6">
            <label><?php echo e(meta('name', getCurrentLocale()) ?? __('fields.name')); ?> </label>
            <input type="text" class="form-control" name="name" placeholder="<?php echo e(meta('name', getCurrentLocale()) ??__('fields.name')); ?>" value='<?php echo e(old("name", $field->name ?? "")); ?>'/>
            
        </div>

        <?php else: ?>
 <?php $__currentLoopData = $language; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('name', getCurrentLocale()) ?? __('fields.name')); ?> </label>
            <?php $error ='field.'.$lang->local.'.name';  ?>
            <input type="text" class="form-control <?php echo e($errors->has($error) ? 'is-invalid' : ''); ?>" name="field[<?php echo e($lang->local); ?>][name]" placeholder="<?php echo e(meta('name', getCurrentLocale()) ??__('fields.name')); ?>" value='<?php echo e(old("$error", $field->name ?? "")); ?>'/>
            <input type="hidden" name="field[<?php echo e($lang->local); ?>][language_id]" value="<?php echo e($lang->id); ?>">
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php endif; ?>

        <div class="text-center mt-5 col-12">
            <button class="butn"><span><?php echo e(__('dashboard.save')); ?></span></button>
        </div>
    </form>
</div>

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

<?php $__env->startSection('inner_js'); ?>
    <!-- Editor JS files -->

            <script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            imagePath = "<?php echo e(asset('')); ?>";
    </script>
    <script src="<?php echo e(asset('assets/admin/js/editor.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/lfm.js')); ?>"></script>
<?php $__env->stopSection(); ?>

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