
<?php $__env->startSection('title', 'Nova notícia'); ?>
<?php $__env->startSection('content'); ?>
    <script src="https://cdn.tiny.cloud/1/rcjw03tjfu0hq8dkm2bkb8qcwhd4nyavx70mdvyk6t6a8uzl/tinymce/6/tinymce.min.js"
        referrerpolicy="origin"></script>
    <div class="row match-height">
        <div class="col-md-12 col-12">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title text-primary">Cadastrando Notícia</h4>
                    <p class="text-muted">Cadastrando Notícia no Sistema</p>
                    <a class="btn btn-outline-primary btn-block d-grid gap-2" type="button"
                        href="<?php echo e(route('noticias.index')); ?>" role="button">Ver todas</a>
                </div>
                <div class="card">
                    <div class="card-body">
                        <form action="<?php echo e(route('noticias.store')); ?>" method="POST" class="form-horizontal"
                            enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div class="box box-info">
                                <input type="text" name="total_visualizacoes" value="0" hidden>
                                <div class="form-group">
                                    <label class="col-form-label">Título da notícia <span>*</span></label>
                                    <input type="text" name="titulo" value="<?php echo e(old('titulo')); ?>"
                                        class="form-control <?php $__errorArgs = ['titulo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="col-form-label">Slug <span>*</span></label>
                                    <input type="text" name="slug" value="<?php echo e(old('slug')); ?>" class="form-control"
                                        placeholder="Esse campo será preenchido automaticamente pelo sistema" disabled>
                                </div>

                                <div class="form-group" id="showPageContent">
                                    <label class="col-form-label">Conteúdo </label>
                                    <textarea type="textarea" class="form-control <?php $__errorArgs = ['conteudo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="conteudo"
                                        value="<?php echo e(old('conteudo')); ?>"></textarea>
                                </div>

                                <div class="form-group">
                                    <label class="col-form-label">Foto principal <span>*</span></label>
                                    <input type="file" name="foto" value="<?php echo e(old('foto')); ?>"
                                        class="form-control <?php $__errorArgs = ['foto'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                </div>

                                <div class="row">
                                    <div class="form-group col-md-6">
                                        <label class="col-form-label">Data <span>*</span></label>
                                        <input type="date" name="data" value="<?php echo e(old('data')); ?>"
                                            class="form-control <?php $__errorArgs = ['data'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    </div>

                                    <div class="col-md-6">
                                        <label class="form-label">Categoria</label>
                                        <select class="form-control <?php $__errorArgs = ['id_categoria'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            name="id_categoria" value="<?php echo e(old('id_categoria')); ?>">
                                            <option value="">Selecione uma categoria</option>
                                            <?php $__currentLoopData = $secretarias; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $secretaria): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($secretaria->id); ?>"><?php echo e($secretaria->nome); ?>

                                                </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="form-group col-md-6">
                                        <label class="col-form-label">Publicador <span>*</span></label>
                                        <input type="text" name="publicador" value="<?php echo e(old('publicador')); ?>"
                                            class="form-control <?php $__errorArgs = ['publicador'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" disabled>
                                    </div>
                                    <div class="form-group col-md-1">
                                        <label class="col-form-label">Covid-19</label>
                                        <select name="covid" class="form-control <?php $__errorArgs = ['covid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            value="<?php echo e(old('covid')); ?>">
                                            <option value="N">Não</option>
                                            <option value="S">Sim</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-1">
                                        <label class="col-form-label">Concurso</label>
                                        <select name="concurso" class="form-control <?php $__errorArgs = ['concurso'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            value="<?php echo e(old('concurso')); ?>">
                                            <option value="N">Não</option>
                                            <option value="S">Sim</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-1">
                                        <label class="col-form-label">Empreendedor</label>
                                        <select name="empreendedor"
                                            class="form-control <?php $__errorArgs = ['empreendedor'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            value="<?php echo e(old('empreendedor')); ?>">
                                            <option value="N">Não</option>
                                            <option value="S">Sim</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-1">
                                        <label class="col-form-label">Lei Paulo Gustavo</label>
                                        <select name="paulogustavo"
                                            class="form-control <?php $__errorArgs = ['paulogustavo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            value="<?php echo e(old('paulogustavo')); ?>">
                                            <option value="N">Não</option>
                                            <option value="S">Sim</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-1">
                                        <label class="col-form-label">Período Eleitoral</label>
                                        <select name="periodo_eleitoral"
                                            class="form-control <?php $__errorArgs = ['periodo_eleitoral'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            value="<?php echo e(old('periodo_eleitoral')); ?>">
                                            <option value="N">Não</option>
                                            <option value="S">Sim</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-1">
                                        <label class="col-form-label">CACS</label>
                                        <select name="cacs" class="form-control <?php $__errorArgs = ['cacs'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            value="<?php echo e(old('cacs')); ?>">
                                            <option value="N">Não</option>
                                            <option value="S">Sim</option>
                                        </select>
                                    </div>
                                </div>

                                <h3 class="seo-info">SEO Informações</h3>
                                <div class="form-group">
                                    <label class="col-form-label">Meta Título </label>
                                    <input type="text" class="form-control <?php $__errorArgs = ['meta_titulo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                        name="meta_titulo" value="<?php echo e(old('meta_titulo')); ?>"
                                        placeholder="Esse campo será preenchido automaticamente pelo sistema" disabled>
                                </div>

                                <div class="form-group">
                                    <label class="col-form-label">Meta Keywords </label>
                                    <input type="text" type="text"
                                        class="form-control <?php $__errorArgs = ['meta_keyword'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                        name="meta_keyword" rows="2" value="<?php echo e(old('meta_keyword')); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="col-form-label">Meta Descrição </label>
                                    <input type="text"
                                        class="form-control <?php $__errorArgs = ['meta_descricao'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                        name="meta_descricao" rows="2" value="<?php echo e(old('meta_descricao')); ?>">
                                </div>
                                <br>
                                <div class="form-group">
                                    <button type="submit" class="btn btn-outline-success btn-sm btn-block w-100"
                                        name="form1">Gravar</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        tinymce.init({
            selector: 'textarea',
            height: 300,
            menubar: false,
            plugins: ['link', 'table', 'image', 'autosize', 'list'],
            toolbar_mode: 'undo redo | formatselect | bold italic backcolor | link image | table | bullist numlist',
        });
    </script>

    </div>

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

<?php echo $__env->make('admin.layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\portalmunicipal\resources\views/admin/noticias/create.blade.php ENDPATH**/ ?>