
<?php $__env->startSection('novedades','active'); ?>
<?php $__env->startSection('novedades_true','true'); ?>
<?php $__env->startSection('novedades_show','show'); ?>
<?php $__env->startSection('novedades_collapsed','collapsed'); ?>
<?php $__env->startSection('form'); ?>

<style>
    form{
        margin-bottom: 40px !important;
        height: 100%;
    }
    main{
        max-height: none;
    }
</style>

<div class="container">
    <div class="row">
        <div class="col-12">
            <h2>Agregar novedad</h2>
        </div>
        <div class="col-12">
            <form method="POST" action="<?= route('createNovedad') ?>" enctype="multipart/form-data">
    <?php echo csrf_field(); ?>
    <div class="mb-3">
        <label for="inputOrden" class="form-label">Orden</label>
        <input type="text" class="form-control" id="inputOrden" name="orden" required>
    </div>
    <div class="mb-3">
        <label for="inputTitulo" class="form-label">T&iacute;tulo</label>
        <input type="text" class="form-control" id="inputTitulo" name="titulo" required>
    </div>
    <div class="mb-3">
        <label for="descripcion_corta" class="form-label">Descripci&oacute;n corta</label>
        <input type="text" class="form-control" id="descripcion_corta" name="descripcion_corta" required>
    </div>
    <div class="mb-3">
        <label for="descripcion_larga" class="form-label">Descripci&oacute;n larga</label>
        <textarea class="form-control" name="descripcion_larga" id="descripcion_larga" cols="30" rows="10"></textarea>
    </div>
    <div class="form-check">
        <input class="form-check-input" name="destacado" type="checkbox" id="flexCheckDefault">
        <label class="form-check-label" for="flexCheckDefault">
            Destacar novedad
        </label>
    </div>
    <div class="col-md-6  mb-3">
        <label for="categoria" class="form-label">Selecciona la categor&iacute;a</label>
        <select class="form-select" name="categoria_id" id="categoria" aria-label="Default select example" required>
            <?php foreach($categorias as $categoria){ ?>
                <option value="<?= $categoria->id ?>"><?= $categoria->nombre ?></option>
            <?php } ?>
        </select>
    </div>
    <div class="mb-3">
        <label for="formFile" class="form-label">Imagen(Tama&ntilde;o recomendado: 1080 x 1080 px)</label>
        <input class="form-control" type="file" id="formFile" name="foto" required>
    </div>
    <button type="submit" class="btn btn-primary">Agregar novedad</button>
</form>
        </div>
    </div>
</div>



<script>
  $(document).ready(function() {
       $('textarea').summernote({
           height: 200,
  toolbar: [
    // [groupName, [list of button]]
    ['style', ['bold', 'italic', 'underline', 'clear']],
    ['font', ['strikethrough', 'superscript', 'subscript']],
    ['fontsize', ['fontsize']],
    ['color', ['color']],
    ['para', ['ul', 'ol', 'paragraph']],
    ['height', ['height']],
    ['view', ['fullscreen', 'codeview', 'help']],
],
});
   });

</script>

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

<?php echo $__env->make('adm.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/d11osolecom/public_html/grupohelmont/resources/views/adm/novedades/create.blade.php ENDPATH**/ ?>