
<?php $__env->startSection('title'); ?> Paramêtres <?php $__env->stopSection(); ?>
<?php $__env->startSection('title_card',""); ?>
<?php $__env->startSection('subtitle_card',""); ?>


<?php $__env->startSection('content'); ?>
    <?php if(Session::has('message')): ?>
        <div class="alert alert-warning"><?php echo Session::get('message'); ?></div>
    <?php endif; ?>

    <?php if($errors): ?>
        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class='bg-danger alert'><?php echo $error; ?></div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php endif; ?>

    <?php if(Session::has('success')): ?>
        <div class="alert alert-success"><?php echo \Session::get('success'); ?></div>
    <?php endif; ?>
    
    <div class="card ">
        <div class="card-header bg-warning">
            <h4>Saisie des Paramètres - <?php echo $title; ?></h4>
        </div>
        <?php if($page): ?>
            <div class="card-body ">
                <?php echo e(html()->modelForm($parametres, 'PUT', url('parametres_detail/'.$page))->open()); ?>

                    <?php echo html()->hidden( "page",$page); ?>

                    <div class="tab-content"> 
                            <?php echo $__env->make("param.content_".$page, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    </div>
                    <?php if( ($user->can("PAR_MAJ")) || $user->HasRole("ADMINISTRATEUR")): ?> 
                    <div class="row form-group">
                        <?php echo html()->button('Enregistrer')->value('Enregistrer')->type('submit')->attributes(['class' => 'btn btn-primary','id'=>'btn_save']); ?>

                    </div>
                    <?php endif; ?>
                <?php echo e(html()->form()->close()); ?>

            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>



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

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


<?php $__env->startSection('scripts'); ?>
<script>
    $(document).ready(function() {

        <?php if($page=="taux"): ?>
            $('#_table').dataTable( {
            	"width": "10%",
                "bAutoWidth": false,
                "bPaginate": false,
                "bInfo": false,
                "bFilter": false,
                } );
            } );


        <?php endif; ?>

        <?php if($page=="messages"): ?>
            $('.summernote').summernote();
            
            $('#btn_save').click(function() {
                <?php $__currentLoopData = $parametres; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $parametre): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if(substr($parametre->ref,0,3)=='MSG'): ?>
                        var html = $('#summernote_<?php echo e($parametre->ref); ?>').summernote('code');
                        $("#<?php echo e($parametre->ref); ?>").val(html);
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                return true;
            });
        <?php endif; ?>
    })
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dash', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre2\resources\views/param/index.blade.php ENDPATH**/ ?>