<?php $__env->startSection('page-title'); ?> <?php if(empty($model->ID)): ?> New <?php else: ?> Edit <?php endif; ?> <?php echo e($model->getLabel()); ?> <?php $__env->stopSection(); ?>

<?php $__env->startSection('tag-title'); ?> <?php if(empty($model->ID)): ?> New <?php else: ?> Edit <?php endif; ?>  <?php echo e($model->getLabel()); ?> <?php $__env->stopSection(); ?>

<?php $__env->startSection('page-sub-title'); ?>

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

<?php $__env->startSection('main-content'); ?>
    <div class="row">
        <div class="<?php echo e($model->getFormSize()); ?>">
            <div class="card">
                <div class="card-body">
                    <form method="POST"   action="<?php if(empty($model->getViewFormPostUrl())): ?><?php echo e(url(Request::path())); ?><?php else: ?><?php echo e(url($model->getViewFormPostUrl())); ?><?php endif; ?>" enctype="multipart/form-data" class="form-horizontal form-label-left input_mask">
                        <?php echo e(csrf_field()); ?>

                        <div class="row">
                            <?php
                            $fields = $model->getFields();
                            $primaryKey = $model->getPrimaryKey();
                            ?>
                            <input type="hidden" value="<?php if($model->$primaryKey!=0): ?><?php echo e($model->$primaryKey); ?><?php else: ?><?php echo e(0); ?><?php endif; ?>" id="_id" name="_id">
                            <?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name=>$title): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php
                                if($model->getInputByLine()==1)$div_class = 'col-sm-12';
                                if($model->getInputByLine()==2)$div_class = 'col-sm-6';
                                if($model->getInputByLine()==3)$div_class = 'col-sm-4';
                                ?>
                                <?php echo $__env->make('inc.cruds.form_item', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            <div class="col-sm-12">
                                <button type="submit"  class="btn btn-success action-btn  float-right">Save</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <style>
        label{
            font-weight: bold;
        }
    </style>
<?php $__env->stopSection(); ?>


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

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

<?php $__env->startSection('page-script'); ?>
    <script !src="">
        $(function(e) {
            <?php $__currentLoopData = $model->getFormRequireds(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $input_required): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                $("label[for='<?php echo e($input_required); ?>']").append('<span class="required"> *</span>');
                <?php if(!in_array($input_required, $model->getRichTexts()) && !in_array($input_required, $model->getFiles())): ?>
                    $('#<?php echo e($input_required); ?>').attr('required', true);
                <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('template', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\UTILISATEUR\Desktop\Fidelisations\loyalty-system\loyalty-app\resources\views/inc/cruds/simple_form.blade.php ENDPATH**/ ?>